孔祥富
2021-03-01 1c7cb9c300fda246db57ef5c43d118c7eaef22d6
febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/mapper/EmpBaseInfoMapper.xml
@@ -18,7 +18,7 @@
        IF (t.dimissionType = '4', 1, NULL)
        ) gsct
        FROM
        t_emp_baseinfo t where 1=1 and t.delFlag=0
        t_emp_baseinfo t where 1=1 and t.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') &gt;= #{btime}  and date_format(t.createTime,'%Y-%m-%d') &lt;= #{etime}
@@ -40,12 +40,12 @@
    </select>
    <select id="countBaseInfoList" resultType="java.util.Map">
        SELECT
            count(IF(t.empStatus = 0, 1, NULL)) zzyg,
            count(IF(t.empStatus = 0 and t.empType = '1', 1, NULL)) zsyg,
            count(IF(t.empStatus = 0 and t.empType = '2', 1, NULL)) lsyg,
            count(1) zzyg,
            count(IF(t.empType = '1', 1, NULL)) zsyg,
            count(IF(t.empType = '2', 1, NULL)) lsyg,
        count( if(t.sex is not null and t.age !=0 and t.sex=1 and t.age&gt;=${manOld},1,null))+count( if(t.sex is not null and t.age !=0 and t.sex=2 and t.age&gt;=${womanOld},1,null)) clyg
        FROM
            t_emp_baseinfo t where 1=1 and t.delFlag=0
            t_emp_baseinfo t where 1=1 and t.delFlag=0 and t.empStatus = 0
    </select>
@@ -458,13 +458,13 @@
                SELECT
                t.*
                FROM
                t_emp_baseinfo t left join t_dept t2 on t.deptId=t2.DEPT_ID where 1=1 and t.delFlag=0  and t.sex is not null and t.age !=0 and t.sex=1 and t.age&gt;=${manOld}
                t_emp_baseinfo t left join t_dept t2 on t.deptId=t2.DEPT_ID where 1=1 and t.empStatus = 0 and t.delFlag=0  and t.sex is not null and t.age !=0 and t.sex=1 and t.age&gt;=${manOld}
                UNION
                SELECT
                t.*
                FROM
                t_emp_baseinfo t left join t_dept t2 on t.deptId=t2.DEPT_ID where 1=1 and t.delFlag=0  and t.sex is not null and t.age !=0 and t.sex=2 and t.age&gt;=${womanOld}
                t_emp_baseinfo t left join t_dept t2 on t.deptId=t2.DEPT_ID where 1=1 and t.empStatus = 0 and t.delFlag=0  and t.sex is not null and t.age !=0 and t.sex=2 and t.age&gt;=${womanOld}
        ) t1 where 1=1
        <if test="name!= 'undefined' and name!=null and name!=''">
            and (t1.empNumb like CONCAT('%',#{name},'%') or t1.empName like CONCAT('%',#{name},'%') or
@@ -586,7 +586,7 @@
    <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
        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 t.empStatus='1'
        <choose>
            <when test="number==8">
               and t1.dimissionType = '1'
@@ -1021,7 +1021,7 @@
        FROM
        t_emp_baseinfo t right JOIN t_emp_jobChange t1 on t.empId=t1.empId where 1=1 and t.delFlag=0 and t1.delFlag=0
        <if test="name!= 'undefined' and name!=null and name!=''">
            and t1.empName like CONCAT('%',#{name},'%'
            and t1.empName like CONCAT('%',#{name},'%')
        </if>
        <choose>
            <when test="btime!='undefined' and btime!=null and btime!='' and etime!='undefined' and etime!=null and etime!=''">