From d885ffc9f9ed909b0f7cb27da26e8b8fff1f89ea Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期五, 24 十一月 2023 20:26:09 +0800
Subject: [PATCH] 20:25 我的待办分页查询条件修改,处置表单 修改

---
 ycl-platform/src/main/resources/mapper/caseHandler/DisposeRecordMapper.xml |   32 +++++++++++++++++++++++++++++---
 1 files changed, 29 insertions(+), 3 deletions(-)

diff --git a/ycl-platform/src/main/resources/mapper/caseHandler/DisposeRecordMapper.xml b/ycl-platform/src/main/resources/mapper/caseHandler/DisposeRecordMapper.xml
index ab8ce5a..48e4729 100644
--- a/ycl-platform/src/main/resources/mapper/caseHandler/DisposeRecordMapper.xml
+++ b/ycl-platform/src/main/resources/mapper/caseHandler/DisposeRecordMapper.xml
@@ -27,43 +27,69 @@
         select distinct * from (
         SELECT
         t3.event_source,
+        t5.region_name source,
         t3.category,
         t2.step_name,
         t3.`id` caseId,
         t3.`code`,
         t2.create_time,
-        t2.limit_time
+        t2.limit_time,
+        t4.url picture
         FROM
         ums_admin_role_relation t1
         left JOIN ums_dispose_record t2 ON t1.role_id = t2.handler_role_id
         left JOIN ums_base_case t3 ON t2.base_case_id=t3.id
+        left JOIN ums_image_resources t4 ON t2.base_case_id=t4.belong_to_id
+        inner join ums_sccg_region t5 on t5.id = t3.community_id
         <where>
             t1.admin_id = #{id} and t3.`code` is not null
             AND t2.state = 0
             <if test="code!='' and code!=null">
                 and t3.`code` LIKE CONCAT('%',#{code},'%')
             </if>
+            <if test="alarmTimeStart!=null and alarmTimeEnd!=null">
+                and t3.alarm_time <![CDATA[ <= ]]> #{alarmTimeEnd} and t3.alarm_time >= #{alarmTimeStart}
+            </if>
+            <if test="type !=null">
+                and t3.category = #{type}
+            </if>
+            <if test="source !=null">
+                and t5.parent_id = #{source}
+            </if>
         </where>
         union all
         SELECT
         t3.event_source,
+        t5.region_name source,
         t3.category,
         t2.step_name,
         t3.`id` caseId,
         t3.`code`,
         t2.create_time,
-        t2.limit_time
+        t2.limit_time,
+        t4.url picture
         FROM
         ums_dispose_record t2
         LEFT JOIN ums_base_case t3 ON t2.base_case_id = t3.id
+        left JOIN ums_image_resources t4 ON t2.base_case_id=t4.belong_to_id
+        inner join ums_sccg_region t5 on t5.id = t3.community_id
         <where>
             t2.handler_id = #{id}
             AND t2.state = 0
             <if test="code!='' and code!=null">
                 and t3.`code` LIKE CONCAT('%',#{code},'%')
             </if>
+            <if test="alarmTimeStart!=null and alarmTimeEnd!=null">
+                and t3.alarm_time <![CDATA[ <= ]]> #{alarmTimeEnd} and t3.alarm_time >= #{alarmTimeStart}
+            </if>
+            <if test="type !=null">
+                and t3.category = #{type}
+            </if>
+            <if test="source !=null">
+                and t5.parent_id = #{source}
+            </if>
         </where>
         ) as t
-         order by create_time
+         order by create_time desc
     </select>
 </mapper>

--
Gitblit v1.8.0