From ddf6452d487465e6fdfabc154bc46e0d2d0c6823 Mon Sep 17 00:00:00 2001
From: linwei <872216696@qq.com>
Date: Thu, 18 Jan 2024 12:26:21 +0800
Subject: [PATCH] bug 修复
---
src/main/java/org/springblade/modules/task/mapper/TaskReportForRepairsMapper.xml | 34 +++++++++++++++++++++++-----------
1 files changed, 23 insertions(+), 11 deletions(-)
diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskReportForRepairsMapper.xml b/src/main/java/org/springblade/modules/task/mapper/TaskReportForRepairsMapper.xml
index 7fdab1b..87b7aff 100644
--- a/src/main/java/org/springblade/modules/task/mapper/TaskReportForRepairsMapper.xml
+++ b/src/main/java/org/springblade/modules/task/mapper/TaskReportForRepairsMapper.xml
@@ -174,11 +174,12 @@
<if test="vo.confirmFlag != null">
AND jtrfr.confirm_flag = #{vo.confirmFlag}
</if>
- <if test="vo.confirmUserId != null">
- AND jtrfr.confirm_user_id = #{vo.confirmUserId}
- </if>
+
<if test="vo.status != null">
AND jtrfr.status = #{vo.status}
+ </if>
+ <if test="vo.addressCode != null">
+ AND jtrfr.address_code = #{vo.addressCode}
</if>
<if test="vo.viewType != null">
AND jtrfr.view_type = #{vo.viewType}
@@ -187,19 +188,21 @@
AND jtrfr.create_time BETWEEN #{vo.startTime} and #{vo.endTime}
</if>
<if test="vo.regionCode != null and vo.regionCode !='' ">
- and jg.community_code like concat('%',#{vo.regionCode},'%')
+ and jg.community_code like concat(#{vo.regionCode},'%')
</if>
<if test="vo.roleName!=null and vo.roleName!=''">
<if test="vo.roleName=='网格员'">
<choose>
<when test="list != null and list.size()>0">
- and jda.address_code in
- <foreach collection="list" item="houseCode" separator ="," open="(" close=")">
+ and (jda.address_code in
+ <foreach collection="list" item="houseCode" separator="," open="(" close=")">
#{houseCode}
</foreach>
+ or jtrfr.confirm_user_id = #{vo.confirmUserId})
</when>
<otherwise>
- and jda.address_code in ('')
+ and (jda.address_code in ('')
+ or jtrfr.confirm_user_id = #{vo.confirmUserId})
</otherwise>
</choose>
</if>
@@ -252,13 +255,22 @@
<select id="getStatisticsCount" resultType="org.springblade.modules.task.vo.TaskReportStatistics">
- SELECT
- COUNT( 1 ) AS total,
- ifnull(SUM( CASE WHEN STATUS = 10 THEN 1 ELSE 0 END ),0) AS handle
- FROM jczz_task_report_for_repairs
+ ELECT
+ count( 1 ) AS total,
+ ifnull( sum( CASE WHEN STATUS = 10 THEN 1 ELSE 0 END ), 0 ) AS handle
+ FROM
+ jczz_task_report_for_repairs jtrfr
+ LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jtrfr.address_code
WHERE is_deleted = 0
<if test="userId != null">
and create_user = #{userId}
+
+ </if>
+ <if test="houseCode != null and houseCode != ''">
+ and address_code = #{houseCode}
+ </if>
+ <if test="neiCode != null and neiCode != ''">
+ AND jda.nei_code LIKE concat( #{neiCode}, '%' )
</if>
</select>
--
Gitblit v1.9.3