From a1272d78844574b86645149a0d8ca257c2b8fe91 Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Thu, 26 Dec 2024 09:43:14 +0800
Subject: [PATCH] 风险源统计等级空的设置为其他
---
src/main/java/org/springblade/modules/yw/mapper/RescueTeamMapper.xml | 33 +++++++++++++++++++++++++++------
1 files changed, 27 insertions(+), 6 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 39e4d92..957e849 100644
--- a/src/main/java/org/springblade/modules/yw/mapper/RescueTeamMapper.xml
+++ b/src/main/java/org/springblade/modules/yw/mapper/RescueTeamMapper.xml
@@ -16,20 +16,41 @@
</resultMap>
<!--自定义分页查询-->
- <select id="selectRescueTeamPage" resultMap="rescueTeamResultMap">
- select * from yw_rescue_team where is_deleted = 0
+ <select id="selectRescueTeamPage" resultType="org.springblade.modules.yw.vo.RescueTeamVO">
+ select
+ yrt.*,
+ yfi.name as firmName
+ from
+ yw_rescue_team yrt
+ left join yw_firm_info yfi on yfi.id = yrt.firm_id and yfi.is_deleted = 0
+ where yrt.is_deleted = 0
+ <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>
+ <if test="rescueTeam.perInChaPho!=null and rescueTeam.perInChaPho!=''">
+ and yrt.per_in_cha_pho like concat('%',#{rescueTeam.perInChaPho},'%')
+ </if>
</select>
<!--自定义分页查询-->
<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