From 8d43111bd0e598bc0b2014cbfa69a32e74959dff Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Wed, 15 Dec 2021 19:24:05 +0800
Subject: [PATCH] ftp sql 同步封装
---
src/main/java/org/springblade/modules/dispatcher/mapper/DispatcherMapper.xml | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 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 bded045..0edfe32 100644
--- a/src/main/java/org/springblade/modules/dispatcher/mapper/DispatcherMapper.xml
+++ b/src/main/java/org/springblade/modules/dispatcher/mapper/DispatcherMapper.xml
@@ -15,7 +15,7 @@
<!--派遣记录分页数据-->
<select id="selectDispatcherPage" resultType="org.springblade.modules.dispatcher.vo.DispatcherVO">
select
- sd.*,bu.real_name securityName,sdu.name dispatcherCompany,bu.cardid idCardNo
+ sd.*,bu.real_name securityName,sdu.name dispatcherCompany,bu.cardid idCardNo,bd.dept_name deptName
from
sys_dispatcher sd
left join
@@ -27,10 +27,16 @@
on
bu.id = sd.user_ids
left join
+ blade_dept bd
+ on
+ bd.id = bu.dept_id
+ left join
sys_jurisdiction sj
on
sj.id = sdu.jurisdiction
where 1=1
+ and bu.status =1
+ and bu.is_deleted = 0
<if test="dispatcher.jurisdiction!=null and dispatcher.jurisdiction!='' and dispatcher.jurisdiction!='1372091709474910209'">
and (sj.id = #{dispatcher.jurisdiction} or sj.parent_id = #{dispatcher.jurisdiction})
</if>
@@ -41,7 +47,6 @@
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!=''">
@@ -52,6 +57,9 @@
</if>
<if test="dispatcher.securityName!=null and dispatcher.securityName!=''">
and bu.real_name like concat('%', #{dispatcher.securityName},'%')
+ </if>
+ <if test="dispatcher.deptName!=null and dispatcher.deptName!=''">
+ and bd.dept_name like concat('%', #{dispatcher.deptName},'%')
</if>
<if test="dispatcher.cardid!=null and dispatcher.cardid!=''">
and sd.cardid like concat('%', #{dispatcher.cardid},'%')
@@ -89,6 +97,7 @@
where
1=1
and dispatcher_unit_id = #{dispatcherUnitVO1.id}
+ and status = 0
</select>
<!--查询用的派遣信息-->
@@ -105,4 +114,8 @@
and sd.status = 0
</select>
+ <update id="updateEndtime">
+ update sys_dispatcher set end_time =#{endTime} where dispatcher_unit_id =#{disId}
+ </update>
+
</mapper>
--
Gitblit v1.9.3