From 995bfe22378bf960682dfac6ced9774c20e762fc Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Sat, 11 Sep 2021 16:56:13 +0800
Subject: [PATCH] 装备字段类型修改

---
 src/main/java/org/springblade/modules/dispatcher/mapper/DispatcherMapper.xml |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 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 54c87ed..70a6e28 100644
--- a/src/main/java/org/springblade/modules/dispatcher/mapper/DispatcherMapper.xml
+++ b/src/main/java/org/springblade/modules/dispatcher/mapper/DispatcherMapper.xml
@@ -26,6 +26,10 @@
             blade_user bu
         on
             bu.id = sd.user_ids
+        left join
+            sys_information si
+        on
+            si.departmentid = bu.dept_id
         where 1=1
         <if test="dispatcher.dispatcherUnitId!=null">
             and sd.dispatcher_unit_id = #{dispatcher.dispatcherUnitId}
@@ -33,8 +37,15 @@
         <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.jurisdiction!=null and  dispatcher.jurisdiction!='' and  dispatcher.jurisdiction!='1372091709474910209' ">
+            and si.jurisdiction = #{dispatcher.jurisdiction}
         </if>
         <if test="dispatcher.name!=null and  dispatcher.name!=''">
             and sd.name like concat('%', #{dispatcher.name},'%')
@@ -77,4 +88,18 @@
         and dispatcher_unit_id = #{dispatcherUnitVO1.id}
     </select>
 
+    <!--查询用的派遣信息-->
+    <select id="getDispatcherInfoByUserId" resultType="org.springblade.modules.dispatcher.vo.DispatcherVO">
+        select
+            sd.*
+        from
+            sys_dispatcher sd
+        left join
+            sys_dispatcher_unit sdu
+        on
+            sdu.id = sd.dispatcher_unit_id
+        where sd.user_ids = #{userId}
+        and sd.status = 0
+    </select>
+
 </mapper>

--
Gitblit v1.9.3