From 09a73af712366265c9b7d200e1dac2fa83c82b9a Mon Sep 17 00:00:00 2001
From: tangzy <tangzy123456>
Date: Wed, 15 Sep 2021 09:12:53 +0800
Subject: [PATCH] 1.接口调整

---
 src/main/java/org/springblade/modules/dispatcher/mapper/DispatcherMapper.xml |   25 +++++++++++++++++++++----
 1 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/src/main/java/org/springblade/modules/dispatcher/mapper/DispatcherMapper.xml b/src/main/java/org/springblade/modules/dispatcher/mapper/DispatcherMapper.xml
index 843ce83..942e603 100644
--- a/src/main/java/org/springblade/modules/dispatcher/mapper/DispatcherMapper.xml
+++ b/src/main/java/org/springblade/modules/dispatcher/mapper/DispatcherMapper.xml
@@ -16,19 +16,30 @@
     <!--派遣记录分页数据-->
     <select id="selectDispatcherPage" resultType="org.springblade.modules.dispatcher.vo.DispatcherVO">
         select
-            sd.*,sdu.name dispatcherCompany
+        sd.*,bu.real_name securityName,sdu.name dispatcherCompany,bu.cardid idCardNo
         from
-            sys_dispatcher sd
+        sys_dispatcher sd
         left join
-            sys_dispatcher_unit sdu
+        sys_dispatcher_unit sdu
         on
-            sdu.id = sd.dispatcher_unit_id
+        sdu.id = sd.dispatcher_unit_id
+        left join
+        blade_user bu
+        on
+        bu.id = sd.user_ids
         where 1=1
         <if test="dispatcher.dispatcherUnitId!=null">
             and sd.dispatcher_unit_id = #{dispatcher.dispatcherUnitId}
         </if>
         <if test="dispatcher.deptId!=null">
             and sd.dept_id = #{dispatcher.deptId}
+        </if>
+        <if test="dispatcher.dispatch!=null and dispatcher.dispatch!=''">
+            and bu.dispatch = #{dispatcher.dispatch}
+            and sd.status = #{dispatcher.dispatch}
+        </if>
+        <if test="dispatcher.userIds!=null and  dispatcher.userIds!=''">
+            and sd.user_ids like concat('%', #{dispatcher.userIds},'%')
         </if>
         <if test="dispatcher.name!=null and  dispatcher.name!=''">
             and sd.name like concat('%', #{dispatcher.name},'%')
@@ -39,6 +50,12 @@
         <if test="dispatcher.dispatcherCompany!=null and  dispatcher.dispatcherCompany!=''">
             and sdu.name like concat('%', #{dispatcher.dispatcherCompany},'%')
         </if>
+        <if test="dispatcher.beginTime!=null or dispatcher.overTime!=null">
+            <if test="dispatcher.beginTime!='' or dispatcher.overTime!=''">
+                and sd.end_time &lt;= #{dispatcher.overTime} and sd.end_time &gt;= #{dispatcher.beginTime}
+                or ( sd.dispatcherTime &lt;= #{dispatcher.overTime} and sd.dispatcherTime &gt;= #{dispatcher.beginTime})
+            </if>
+        </if>
     </select>
 
     <!--派遣记录详情-->

--
Gitblit v1.9.3