From a0e0eca428f47c4d796f1d0917041b072b8e7aac Mon Sep 17 00:00:00 2001 From: lohir <3399054449@qq.com> Date: 星期二, 22 十月 2024 17:33:38 +0800 Subject: [PATCH] 完成运维考核-工单白名单-列表展示 --- ycl-server/src/main/resources/mapper/zgyw/CalculateReportMapper.xml | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/ycl-server/src/main/resources/mapper/zgyw/CalculateReportMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/CalculateReportMapper.xml index 21c56ba..2f3ec80 100644 --- a/ycl-server/src/main/resources/mapper/zgyw/CalculateReportMapper.xml +++ b/ycl-server/src/main/resources/mapper/zgyw/CalculateReportMapper.xml @@ -20,6 +20,7 @@ <select id="page" resultMap="BaseResultMap"> SELECT + tcr.contract_id, tyu.unit_name, tc.name, tcr.id, @@ -38,6 +39,9 @@ AND tcr.deleted = 0 AND tc.deleted = 0 AND tyu.deleted = 0 <if test="query.unitName != null and query.unitName != '' "> AND tyu.unit_name like concat('%', #{query.unitName}, '%') + </if> + <if test="query.unitId != null"> + AND tyu.id = #{query.unitId} </if> </where> </select> @@ -99,4 +103,15 @@ WHERE tcr.id = #{id} </select> + <select id="exportData" resultType="com.ycl.platform.domain.excel.CalculateExport"> + SELECT + a.rule_name, + COUNT(b.id) AS num, + IFNULL(-SUM(score), 0) AS score + FROM t_calculate_rule a + LEFT JOIN t_contract_score b ON b.rule_id = a.id AND auditing_status = 'PASS' AND b.deleted = 0 + WHERE a.contract_id = #{contractId} AND a.deleted = 0 + GROUP BY a.rule_name + </select> + </mapper> -- Gitblit v1.8.0