From 60d52f83688b0eb5b2c8bff6752a0370111a275d Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Fri, 14 Jun 2024 19:43:40 +0800
Subject: [PATCH] 同步数据,并且设置好网格及警格

---
 src/main/java/org/springblade/modules/eCallEventTwo/mapper/EcCallEventTwoMapper.xml |   91 ++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 80 insertions(+), 11 deletions(-)

diff --git a/src/main/java/org/springblade/modules/eCallEventTwo/mapper/EcCallEventTwoMapper.xml b/src/main/java/org/springblade/modules/eCallEventTwo/mapper/EcCallEventTwoMapper.xml
index 1236bf0..e62b436 100644
--- a/src/main/java/org/springblade/modules/eCallEventTwo/mapper/EcCallEventTwoMapper.xml
+++ b/src/main/java/org/springblade/modules/eCallEventTwo/mapper/EcCallEventTwoMapper.xml
@@ -8,7 +8,7 @@
 
 
     <select id="selectECallEventTwoPage" resultMap="eCallEventTwoResultMap">
-        select * from jczz_e_call_event_two
+        select jecet.* from jczz_e_call_event_two jecet
         <where>
             <if test="eCallEventTwo.orderId != null "> and order_id = #{eCallEventTwo.orderId}</if>
             <if test="eCallEventTwo.orderCode != null  and eCallEventTwo.orderCode != ''"> and order_code like concat('%',#{eCallEventTwo.orderCode},'%') </if>
@@ -44,16 +44,85 @@
             <if test="eCallEventTwo.directFeed != null  and eCallEventTwo.directFeed != ''"> and direct_feed = #{eCallEventTwo.directFeed}</if>
             <if test="eCallEventTwo.directFeedHandler != null  and eCallEventTwo.directFeedHandler != ''"> and direct_feed_handler = #{eCallEventTwo.directFeedHandler}</if>
             <if test="eCallEventTwo.directFeedTime != null "> and direct_feed_time = #{eCallEventTwo.directFeedTime}</if>
-            <if test="eCallEventTwo.images != null  and eCallEventTwo.images != ''"> and images = #{eCallEventTwo.images}</if>
-            <if test="eCallEventTwo.status != null  and eCallEventTwo.status != ''"> and status = #{eCallEventTwo.status}</if>
-            <if test="eCallEventTwo.tagApply != null  and eCallEventTwo.tagApply != ''"> and tag_apply = #{eCallEventTwo.tagApply}</if>
-            <if test="eCallEventTwo.tagDelay != null  and eCallEventTwo.tagDelay != ''"> and tag_delay = #{eCallEventTwo.tagDelay}</if>
-            <if test="eCallEventTwo.tagDoing != null  and eCallEventTwo.tagDoing != ''"> and tag_doing = #{eCallEventTwo.tagDoing}</if>
-            <if test="eCallEventTwo.tagResp != null  and eCallEventTwo.tagResp != ''"> and tag_resp = #{eCallEventTwo.tagResp}</if>
-            <if test="eCallEventTwo.tagDone != null  and eCallEventTwo.tagDone != ''"> and tag_done = #{eCallEventTwo.tagDone}</if>
-            <if test="eCallEventTwo.tagCheck != null  and eCallEventTwo.tagCheck != ''"> and tag_check = #{eCallEventTwo.tagCheck}</if>
-            <if test="eCallEventTwo.tagChkTel != null  and eCallEventTwo.tagChkTel != ''"> and tag_chk_tel = #{eCallEventTwo.tagChkTel}</if>
-            <if test="eCallEventTwo.tagRedo != null  and eCallEventTwo.tagRedo != ''"> and tag_redo = #{eCallEventTwo.tagRedo}</if>
+            <if test="eCallEventTwo.images != null  and eCallEventTwo.images != ''">and images =
+                #{eCallEventTwo.images}
+            </if>
+            <if test="eCallEventTwo.status != null  and eCallEventTwo.status != ''">and status =
+                #{eCallEventTwo.status}
+            </if>
+            <if test="eCallEventTwo.tagApply != null  and eCallEventTwo.tagApply != ''">and tag_apply =
+                #{eCallEventTwo.tagApply}
+            </if>
+            <if test="eCallEventTwo.tagDelay != null  and eCallEventTwo.tagDelay != ''">and tag_delay =
+                #{eCallEventTwo.tagDelay}
+            </if>
+            <if test="eCallEventTwo.tagDoing != null  and eCallEventTwo.tagDoing != ''">and tag_doing =
+                #{eCallEventTwo.tagDoing}
+            </if>
+            <if test="eCallEventTwo.tagResp != null  and eCallEventTwo.tagResp != ''">and tag_resp =
+                #{eCallEventTwo.tagResp}
+            </if>
+            <if test="eCallEventTwo.tagDone != null  and eCallEventTwo.tagDone != ''">and tag_done =
+                #{eCallEventTwo.tagDone}
+            </if>
+            <if test="eCallEventTwo.tagCheck != null  and eCallEventTwo.tagCheck != ''">and tag_check =
+                #{eCallEventTwo.tagCheck}
+            </if>
+            <if test="eCallEventTwo.tagChkTel != null  and eCallEventTwo.tagChkTel != ''">and tag_chk_tel =
+                #{eCallEventTwo.tagChkTel}
+            </if>
+            <if test="eCallEventTwo.tagRedo != null  and eCallEventTwo.tagRedo != ''">and tag_redo =
+                #{eCallEventTwo.tagRedo}
+            </if>
+            <if test="isAdministrator==2">
+                <choose>
+                    <when test="eCallEventTwo.roleName != null and eCallEventTwo.roleName != ''">
+                        <if test="eCallEventTwo.roleName=='wgy'">
+                            <choose>
+                                <when test="gridCodeList !=null and gridCodeList.size()>0">
+                                    and jecet.grid_code in
+                                    <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
+                                        #{code}
+                                    </foreach>
+                                </when>
+                                <otherwise>
+                                    and jecet.grid_code in ('')
+                                </otherwise>
+                            </choose>
+                        </if>
+                        <if test="eCallEventTwo.roleName=='mj'">
+                            <choose>
+                                <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
+                                    and jecet.jw_grid_code in
+                                    <foreach collection="regionChildCodesList" item="code" open="(" close=")"
+                                             separator=",">
+                                        #{code}
+                                    </foreach>
+                                </when>
+                                <otherwise>
+                                    and jecet.jw_grid_code in ('')
+                                </otherwise>
+                            </choose>
+                        </if>
+                    </when>
+                    <otherwise>
+                        <choose>
+                            <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
+                                and
+                                (
+                                jecet.grid_code in
+                                <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
+                                    #{code}
+                                </foreach>
+                                )
+                            </when>
+                            <otherwise>
+                                and  ( jecet.grid_code in ('')  )
+                            </otherwise>
+                        </choose>
+                    </otherwise>
+                </choose>
+            </if>
         </where>
         order by order_id desc
     </select>

--
Gitblit v1.9.3