From a09e361bfcb68a809e9143eca87bed2d66af2216 Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Mon, 25 Nov 2024 11:35:23 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/main/java/org/springblade/modules/yw/mapper/RescueTeamMapper.xml | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/springblade/modules/yw/mapper/RescueTeamMapper.xml b/src/main/java/org/springblade/modules/yw/mapper/RescueTeamMapper.xml
index 67790f7..957e849 100644
--- a/src/main/java/org/springblade/modules/yw/mapper/RescueTeamMapper.xml
+++ b/src/main/java/org/springblade/modules/yw/mapper/RescueTeamMapper.xml
@@ -27,6 +27,9 @@
<if test="rescueTeam.firmId!=null">
and yrt.firm_id = #{rescueTeam.firmId}
</if>
+ <if test="rescueTeam.type!=null">
+ and yrt.type = #{rescueTeam.type}
+ </if>
<if test="rescueTeam.perInCha!=null and rescueTeam.perInCha!=''">
and yrt.per_in_cha like concat('%',#{rescueTeam.perInCha},'%')
</if>
@@ -38,13 +41,16 @@
<!--自定义分页查询-->
<select id="getStatisticData" resultType="java.util.Map">
SELECT
- case when type=1 then '园区'
- when type =2 then '企业'
- end as type,
+ team_name as type,
count(*) AS num
FROM
yw_rescue_team
- GROUP BY type
+ <where>
+ <if test="rescueTeam.type!=null">
+ and type = #{rescueTeam.type}
+ </if>
+ </where>
+ GROUP BY team_name
</select>
</mapper>
--
Gitblit v1.9.3