From 7293f04d18fb2e882e152f962c3aa1d8fcb1f93e Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Wed, 17 Nov 2021 15:46:35 +0800
Subject: [PATCH] 证书打印信息导出修改
---
src/main/java/org/springblade/modules/dispatcher/mapper/DispatcherMapper.xml | 44 ++++++++++++++++++++++++++++++++++++++------
1 files changed, 38 insertions(+), 6 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 ddc31d2..6ae05c6 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
+ sd.*,bu.real_name securityName,sdu.name dispatcherCompany,bu.cardid idCardNo
from
sys_dispatcher sd
left join
@@ -26,12 +26,23 @@
blade_user bu
on
bu.id = sd.user_ids
+ left join
+ sys_jurisdiction sj
+ on
+ sj.id = sdu.jurisdiction
where 1=1
+ <if test="dispatcher.jurisdiction!=null and dispatcher.jurisdiction!='' and dispatcher.jurisdiction!='1372091709474910209'">
+ and (sj.id = #{dispatcher.jurisdiction} or sj.parent_id = #{dispatcher.jurisdiction})
+ </if>
<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},'%')
@@ -39,17 +50,20 @@
<if test="dispatcher.name!=null and dispatcher.name!=''">
and sd.name like concat('%', #{dispatcher.name},'%')
</if>
+ <if test="dispatcher.securityName!=null and dispatcher.securityName!=''">
+ and bu.real_name like concat('%', #{dispatcher.securityName},'%')
+ </if>
<if test="dispatcher.cardid!=null and dispatcher.cardid!=''">
and sd.cardid like concat('%', #{dispatcher.cardid},'%')
</if>
<if test="dispatcher.dispatcherCompany!=null and dispatcher.dispatcherCompany!=''">
and sdu.name like concat('%', #{dispatcher.dispatcherCompany},'%')
</if>
- <if test="dispatcher.beginTime!=null and dispatcher.beginTime!=''">
- and sd.dispatcherTime > #{dispatcher.beginTime}
- </if>
- <if test="dispatcher.overTime!=null and dispatcher.overTime!=''">
- and sd.end_time < #{dispatcher.overTime}
+ <if test="dispatcher.beginTime!=null or dispatcher.overTime!=null">
+ <if test="dispatcher.beginTime!='' or dispatcher.overTime!=''">
+ and sd.end_time <= #{dispatcher.overTime} and sd.end_time >= #{dispatcher.beginTime}
+ or ( sd.dispatcherTime <= #{dispatcher.overTime} and sd.dispatcherTime >= #{dispatcher.beginTime})
+ </if>
</if>
</select>
@@ -77,4 +91,22 @@
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>
+
+ <update id="updateEndtime">
+ update sys_dispatcher set end_time =#{endTime} where dispatcher_unit_id =#{disId}
+ </update>
+
</mapper>
--
Gitblit v1.9.3