From 615af82c9ea47993e78b00e9c64e887e063474f8 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期三, 04 九月 2024 22:08:50 +0800
Subject: [PATCH] 点位修改增加部级标签设置
---
ycl-server/src/main/resources/mapper/zgyw/CalculateReportMapper.xml | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/ycl-server/src/main/resources/mapper/zgyw/CalculateReportMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/CalculateReportMapper.xml
index a5e761d..2f3ec80 100644
--- a/ycl-server/src/main/resources/mapper/zgyw/CalculateReportMapper.xml
+++ b/ycl-server/src/main/resources/mapper/zgyw/CalculateReportMapper.xml
@@ -40,6 +40,9 @@
<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>
@@ -102,13 +105,13 @@
<select id="exportData" resultType="com.ycl.platform.domain.excel.CalculateExport">
SELECT
- SUBSTRING_INDEX(rule_name, '/', 1) AS rule_name,
- COUNT(*) AS num,
- SUM(score) AS score,
- (100 - SUM(score)) AS surplusScore
- FROM t_contract_score
- WHERE contract_id = #{contractId} AND auditing_status = 'PASS' AND deleted = 0
- GROUP BY SUBSTRING_INDEX(rule_name, '/', 1)
+ 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