From 741430702be88bd14b33fb15a7c14494e4648be5 Mon Sep 17 00:00:00 2001 From: zhanglei <lei.zhang@kingtroldata.com> Date: Wed, 26 Mar 2025 18:26:44 +0800 Subject: [PATCH] fix(ajh): 修改安全隐患统计查询的日期字段 - 将查询条件中的 rec_ord_whenlong 字段改为 rec_ord_report_date 字段 - 这个修改更准确地反映了报告日期,提高了查询结果的准确性 --- sk-module-biz/src/main/java/com/skua/modules/ajh/mapper/xml/AjhRectificationInfoMapper.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sk-module-biz/src/main/java/com/skua/modules/ajh/mapper/xml/AjhRectificationInfoMapper.xml b/sk-module-biz/src/main/java/com/skua/modules/ajh/mapper/xml/AjhRectificationInfoMapper.xml index fcbda8a..5b01910 100644 --- a/sk-module-biz/src/main/java/com/skua/modules/ajh/mapper/xml/AjhRectificationInfoMapper.xml +++ b/sk-module-biz/src/main/java/com/skua/modules/ajh/mapper/xml/AjhRectificationInfoMapper.xml @@ -6,9 +6,9 @@ <select id="topCensus" resultType="java.util.Map"> select '年度安全隐患统计(起)' as 'name','yh' as 'code', - ifnull( SUM( CASE WHEN LEFT ( sr.rec_ord_whenlong, 7 ) = #{nowMonth} THEN 1 ELSE 0 END ),0) as now, - ifnull( SUM( CASE WHEN LEFT ( sr.rec_ord_whenlong, 4 ) = #{nowYear} THEN 1 ELSE 0 END),0) as nowYear, - ifnull( SUM( CASE WHEN LEFT ( sr.rec_ord_whenlong, 4 ) = #{lastYear} THEN 1 ELSE 0 END ),0) as last_year + ifnull( SUM( CASE WHEN LEFT ( sr.rec_ord_report_date, 7 ) = #{nowMonth} THEN 1 ELSE 0 END ),0) as now, + ifnull( SUM( CASE WHEN LEFT ( sr.rec_ord_report_date, 4 ) = #{nowYear} THEN 1 ELSE 0 END),0) as nowYear, + ifnull( SUM( CASE WHEN LEFT ( sr.rec_ord_report_date, 4 ) = #{lastYear} THEN 1 ELSE 0 END ),0) as last_year from ajh_rectification_info sr UNION select -- libgit2 0.24.0