From 6faaa71bf5384f68a405acc9770731c27d5898de Mon Sep 17 00:00:00 2001 From: liuwu <975499773@qq.com> Date: Wed, 21 Feb 2024 11:23:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9xml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/base/TAmentPartyAffairsMapper.xml | 24 +++++++++++++++++++ .../mapper/base/TAmentTradeMapper.xml | 6 +++-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/cyx-system/src/main/resources/mapper/base/TAmentPartyAffairsMapper.xml b/cyx-system/src/main/resources/mapper/base/TAmentPartyAffairsMapper.xml index 975e915..7d99d17 100644 --- a/cyx-system/src/main/resources/mapper/base/TAmentPartyAffairsMapper.xml +++ b/cyx-system/src/main/resources/mapper/base/TAmentPartyAffairsMapper.xml @@ -76,6 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and a.per_id = #{perId} and a.dept_id = #{deptId} and a.branch_id = #{branchId} + and DATE_FORMAT(a.finish_date,'%Y') = #{year} @@ -221,6 +222,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" finish_date and a.status = #{status} + and DATE_FORMAT(a.finish_date,'%Y') = #{year} @@ -352,6 +357,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" t_ament_party_affairs WHERE type = '党务及意识形态' + + AND DATE_FORMAT(finish_date, '%Y') = #{year} + GROUP BY shot_name @@ -365,6 +373,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" t_ament_party_affairs WHERE type = '党风廉政建设' + + AND DATE_FORMAT(finish_date, '%Y') = #{year} + GROUP BY shot_name @@ -377,6 +388,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" t_ament_party_affairs WHERE type = '日常考核指标' + + AND DATE_FORMAT(finish_date, '%Y') = #{year} + GROUP BY shot_name @@ -389,6 +403,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" t_ament_party_affairs WHERE type = '季度考核指标' + + AND DATE_FORMAT(finish_date, '%Y') = #{year} + GROUP BY shot_name @@ -403,6 +420,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" t_ament_party_affairs a LEFT JOIN sys_dept d on a.dept_id = d.dept_id WHERE a.type IN ( '日常考核指标', '季度考核指标' ) and a.dept_id != 100 + + AND DATE_FORMAT(finish_date, '%Y') = #{year} + GROUP BY a.dept_id, a.type @@ -417,6 +437,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ROUND(IF( SUM( now_score ), SUM( now_score ), 0 )/ SUM( score )*100) percent FROM t_ament_party_affairs + WHERE 1=1 + + AND DATE_FORMAT(finish_date, '%Y') = #{year} + GROUP BY type diff --git a/cyx-system/src/main/resources/mapper/base/TAmentTradeMapper.xml b/cyx-system/src/main/resources/mapper/base/TAmentTradeMapper.xml index 15c32fe..bebeb2f 100644 --- a/cyx-system/src/main/resources/mapper/base/TAmentTradeMapper.xml +++ b/cyx-system/src/main/resources/mapper/base/TAmentTradeMapper.xml @@ -42,8 +42,10 @@ GROUP_CONCAT( '{"label":"', trade_type, '","trade":', trade_mony, ',"count":', trade_count, '}' ) json FROM t_ament_trade - WHERE - month_of LIKE CONCAT( '%', DATE_FORMAT( NOW(), '%Y' ), '%' ) + WHERE 1=1 + + AND DATE_FORMAT(month_of, '%Y') = #{year} + GROUP BY month_of, type