From aae9bc1ebc7f65cebaec65ac7128f79ca6c827d1 Mon Sep 17 00:00:00 2001
From: linwei <872216696@qq.com>
Date: Wed, 07 Feb 2024 10:24:39 +0800
Subject: [PATCH] 代码优化

---
 src/main/java/org/springblade/modules/task/mapper/TaskMapper.xml |   30 ++++++++++++++++++++++++++++--
 1 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskMapper.xml b/src/main/java/org/springblade/modules/task/mapper/TaskMapper.xml
index 1d2bf3b..e3e6cfc 100644
--- a/src/main/java/org/springblade/modules/task/mapper/TaskMapper.xml
+++ b/src/main/java/org/springblade/modules/task/mapper/TaskMapper.xml
@@ -29,6 +29,8 @@
         br.town_code streetCode,
         jp.principal as realName,
         jp.principal_phone as phone,
+        jp.nine_type ,
+        jp.front_type ,
         jt.id,
         jt.NAME,
         jt.type,
@@ -147,8 +149,8 @@
                 AND jt.create_time BETWEEN #{task.startTime} and #{task.endTime}
             </if>
             <!-- 场所店铺 -->
-            <if test="task.reportType != null and task.reportType == 2 ">
-                and jt.report_type in (2,3,4,5,6,7,8)
+            <if test="task.reportType != null">
+                and jt.report_type = #{task.reportType}
             </if>
             <if test="task.reportType == null">
                 and jt.report_type in (2,3,4,5,6,7,8)
@@ -219,6 +221,30 @@
                     </choose>
                 </if>
             </if>
+            <if test="isAdministrator==2">
+                <choose>
+                    <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
+                        and
+                        (
+                        jg.grid_code in
+                        <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
+                            #{code}
+                        </foreach>
+                        or
+                        br.village_code in
+                        <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
+                            #{code}
+                        </foreach>
+                        )
+                    </when>
+                    <otherwise>
+                        and
+                        (
+                        jg.grid_code in ('') or br.village_code in ('')
+                        )
+                    </otherwise>
+                </choose>
+            </if>
             <if test="task.status != null and task.status != null">
                 and jt.status = #{task.status}
             </if>

--
Gitblit v1.9.3