From 0f8c4b7528e2b168c35a3ecbe366cf36730914b7 Mon Sep 17 00:00:00 2001
From: [1124498879] <[kongxf@daryun.com]>
Date: 星期一, 31 五月 2021 11:24:49 +0800
Subject: [PATCH] xx
---
febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/mapper/EmpBaseInfoMapper.xml | 38 +++++++++++++++++++-------------------
1 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/mapper/EmpBaseInfoMapper.xml b/febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/mapper/EmpBaseInfoMapper.xml
index 2474f48..ec5ce3e 100644
--- a/febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/mapper/EmpBaseInfoMapper.xml
+++ b/febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/mapper/EmpBaseInfoMapper.xml
@@ -19,31 +19,31 @@
<select id="countZcygBaseInfoList" resultType="java.util.Map">
SELECT
count(
- IF (t.dimissionType = '1', 1, NULL)
+ IF (t2.dimissionType = '6', 1, NULL)
) zclz,
count(
- IF (t.dimissionType = '2', 1, NULL)
+ IF (t2.dimissionType = '4', 1, NULL)
) zdlz,
count(
- IF (t.dimissionType = '4', 1, NULL)
+ IF (t2.dimissionType = '3', 1, NULL)
) gsct
- FROM
- t_emp_baseinfo t inner join t_dept t1 on t.deptId=t1.DEPT_ID ${ew.customSqlSegment} and t.delFlag=0 and t.empStatus='1'
+ FROM t_emp_dimissionlog t2 inner join
+ t_emp_baseinfo t on t2.empId=t.empId inner join t_dept t1 on t.deptId=t1.DEPT_ID ${ew.customSqlSegment} and t2.delFlag=0 and t.empStatus='1'
<choose>
<when test="btime!=null and btime!='' and etime!=null and etime!=''">
- and date_format(t.createTime,'%Y-%m-%d') >= #{btime} and date_format(t.createTime,'%Y-%m-%d') <= #{etime}
+ and date_format(t2.dimissionDate,'%Y-%m-%d') >= #{btime} and date_format(t2.dimissionDate,'%Y-%m-%d') <= #{etime}
</when>
<when test="index==0">
- and TO_DAYS(t.createTime) = TO_DAYS(NOW())
+ and TO_DAYS(t2.dimissionDate) = TO_DAYS(NOW())
</when>
<when test="index==1">
- and YEARWEEK(date_format(t.createTime,'%Y-%m-%d')) = YEARWEEK(now())
+ and YEARWEEK(date_format(t2.dimissionDate,'%Y-%m-%d')) = YEARWEEK(now())
</when>
<when test="index==2">
- and date_format(t.createTime,'%Y-%m') = date_format(now(),'%Y-%m')
+ and date_format(t2.dimissionDate,'%Y-%m') = date_format(now(),'%Y-%m')
</when>
<otherwise>
- and YEAR(t.createTime)=YEAR(NOW())
+ and YEAR(t2.dimissionDate)=YEAR(NOW())
</otherwise>
</choose>
@@ -655,20 +655,20 @@
<select id="zcbaseInfoList" resultType="cc.mrbird.febs.server.hr.entity.EmpBaseInfo">
- select t1.* from t_emp_baseinfo t1 left join t_dept t2 on t1.deptId=t2.DEPT_ID where 1=1 and t1.delFlag=0 and t1.empStatus='1'
+ select t1.* from t_emp_dimissionlog t inner join t_emp_baseinfo t1 on t.empId=t1.empId left join t_dept t2 on t1.deptId=t2.DEPT_ID where 1=1 and t.delFlag=0 and t1.empStatus='1'
and t2.DEPT_ID in
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
#{item}
</foreach>
<choose>
<when test="number==8">
- and t1.dimissionType = '1'
+ and t.dimissionType = '6'
</when>
<when test="number==9">
- and t1.dimissionType = '2'
+ and t.dimissionType = '4'
</when>
<when test="number==10">
- and t1.dimissionType = '4'
+ and t.dimissionType = '3'
</when>
<otherwise>
@@ -680,19 +680,19 @@
</if>
<choose>
<when test="btime!='undefined' and btime!=null and btime!='' and etime!='undefined' and etime!=null and etime!=''">
- and date_format(t1.createTime,'%Y-%m-%d') >= #{btime} and date_format(t1.createTime,'%Y-%m-%d') <= #{etime}
+ and date_format(t.dimissionDate,'%Y-%m-%d') >= #{btime} and date_format(t1.dimissionDate,'%Y-%m-%d') <= #{etime}
</when>
<when test="index==0">
- and TO_DAYS(t1.createTime) = TO_DAYS(NOW())
+ and TO_DAYS(t.dimissionDate) = TO_DAYS(NOW())
</when>
<when test="index==1">
- and YEARWEEK(date_format(t1.createTime,'%Y-%m-%d')) = YEARWEEK(now())
+ and YEARWEEK(date_format(t.dimissionDate,'%Y-%m-%d')) = YEARWEEK(now())
</when>
<when test="index==2">
- and date_format(t1.createTime,'%Y-%m') = date_format(now(),'%Y-%m')
+ and date_format(t.dimissionDate,'%Y-%m') = date_format(now(),'%Y-%m')
</when>
<otherwise>
- and YEAR(t1.createTime)=YEAR(NOW())
+ and YEAR(t.dimissionDate)=YEAR(NOW())
</otherwise>
</choose>
--
Gitblit v1.8.0