Alan
2021-02-21 c294865250a10b3b0f5661e1e2e7b127917552c7
提交首页查询Bug
3个文件已修改
302 ■■■■■ 已修改文件
febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/mapper/EmpBaseInfoMapper.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/mapper/EmpBaseInfoMapper.xml 270 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/service/impl/EmpBaseInfoServiceImpl.java 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/mapper/EmpBaseInfoMapper.java
@@ -196,4 +196,8 @@
    List<SysConfig> sysConfig();
    @SqlParser(filter=true)
    IPage<EmpBaseInfo> clbaseInfoList(@Param("page")Page<EmpBaseInfo> page,@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime,@Param("name") String name,@Param("manOld") String manOld,@Param("womanOld") String womanOld);
    @SqlParser(filter=true)
    Map<String, Object> countZcygBaseInfoList(@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime);
    @SqlParser(filter=true)
    Map<String, Object> countXqhtBaseInfoList(@Param("index") String index,@Param("btime") String btime,@Param("etime") String etime);
}
febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/mapper/EmpBaseInfoMapper.xml
@@ -3,32 +3,28 @@
<mapper namespace="cc.mrbird.febs.server.hr.mapper.EmpBaseInfoMapper">
    <select id="sysConfig" resultType="cc.mrbird.febs.common.core.entity.system.SysConfig">
           select * from sys_config where config_key in ("manOld","womanOld") ORDER BY config_key asc
           select * from sys_config where delFlag='0' and config_key in ("manOld","womanOld") ORDER BY config_key asc
    </select>
    <select id="countBaseInfoList" resultType="java.util.Map">
    <select id="countZcygBaseInfoList" resultType="java.util.Map">
        SELECT
            count(IF(t.empStatus = 0, 1, NULL)) zzyg,
            count(IF(t.empType = '1', 1, NULL)) zsyg,
            count(IF(t.empType = '2', 1, NULL)) lsyg,
            count(
                IF (t.dimissionType = '1', 1, NULL)
            ) zclz,
            count(
                IF (t.dimissionType = '2', 1, NULL)
            ) zdlz,
            count(
                IF (t.dimissionType = '4', 1, NULL)
            ) gsct,
        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
        count(
        IF (t.dimissionType = '1', 1, NULL)
        ) zclz,
        count(
        IF (t.dimissionType = '2', 1, NULL)
        ) zdlz,
        count(
        IF (t.dimissionType = '4', 1, NULL)
        ) gsct
        FROM
            t_emp_baseinfo t where 1=1
        t_emp_baseinfo t where 1=1 and t.delFlag=0
        <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}
            </when>
            <when test="index==0">
                    and TO_DAYS(t.createTime) = TO_DAYS(NOW())
                and TO_DAYS(t.createTime) = TO_DAYS(NOW())
            </when>
            <when test="index==1">
                and YEARWEEK(date_format(t.createTime,'%Y-%m-%d')) = YEARWEEK(now())
@@ -40,6 +36,16 @@
                and YEAR(t.createTime)=YEAR(NOW())
            </otherwise>
        </choose>
    </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( 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
    </select>
@@ -47,7 +53,7 @@
        SELECT
        count(1) xjyg
        FROM
        t_emp_baseinfo t where 1=1
        t_emp_baseinfo t where 1=1 and t.delFlag=0
        <choose>
            <when test="btime!=null and btime!='' and etime!=null and etime!=''">
                and date_format(t.entryDate,'%Y-%m-%d') &gt;= #{btime}  and date_format(t.entryDate,'%Y-%m-%d') &lt;= #{etime}
@@ -68,10 +74,10 @@
    </select>
    <select id="countLzygBaseInfoList" resultType="java.util.Map">
        SELECT
        count(1) lzyg,count(IF(t1.contractStatus = 3, 1, NULL)) jcht
        count(IF(t1.contractStatus = 3, 1, NULL)) jcht
        FROM
        t_emp_baseinfo t left JOIN t_emp_contractinfo t1 on t.empId=t1.empId where 1=1
        t_emp_baseinfo t left JOIN t_emp_contractinfo t1 on t.empId=t1.empId where 1=1 and t.delFlag=0
        <choose>
            <when test="btime!=null and btime!='' and etime!=null and etime!=''">
                and date_format(t.dimissionDate,'%Y-%m-%d') &gt;= #{btime}  and date_format(t.dimissionDate,'%Y-%m-%d') &lt;= #{etime}
@@ -94,7 +100,7 @@
        SELECT
        count(1) czyg
        FROM
        t_emp_baseinfo t INNER JOIN t_emp_resign t1 on t.empId=t1.empId where 1=1
        t_emp_baseinfo t INNER JOIN t_emp_resign t1 on t.empId=t1.empId where 1=1 and t.delFlag=0
        <choose>
            <when test="btime!=null and btime!='' and etime!=null and etime!=''">
                and date_format(t1.applayDate,'%Y-%m-%d') &gt;= #{btime}  and date_format(t1.applayDate,'%Y-%m-%d') &lt;= #{etime}
@@ -114,14 +120,13 @@
        </choose>
    </select>
    <select id="countYxhtBaseInfoList" resultType="java.util.Map">
    <select id="countXqhtBaseInfoList" resultType="java.util.Map">
        SELECT
        count(IF(t1.contractStatus = 1 or t1.contractStatus = 2, 1, NULL)) yxht,
        count(IF(t1.contractStatus = 1, 1, NULL)) xinqht,
        count(IF(t1.contractStatus = 2, 1, NULL)) xqht
        FROM
        t_emp_baseinfo t INNER JOIN t_emp_contractinfo t1 on t.empId=t1.empId where 1=1
        t_emp_baseinfo t INNER JOIN t_emp_contractinfo t1 on t.empId=t1.empId where 1=1 and t.delFlag=0
        <choose>
            <when test="btime!=null and btime!='' and etime!=null and etime!=''">
                and date_format(t1.signingDate,'%Y-%m-%d') &gt;= #{btime}  and date_format(t1.signingDate,'%Y-%m-%d') &lt;= #{etime}
@@ -139,6 +144,13 @@
                and YEAR(t1.signingDate)=YEAR(NOW())
            </otherwise>
        </choose>
    </select>
    <select id="countYxhtBaseInfoList" resultType="java.util.Map">
        SELECT
        count(IF(t1.contractStatus = 1 or t1.contractStatus = 2, 1, NULL)) yxht
        FROM
        t_emp_baseinfo t INNER JOIN t_emp_contractinfo t1 on t.empId=t1.empId where 1=1 and t.delFlag=0
    </select>
@@ -146,7 +158,7 @@
        SELECT
        count(IF(t1.contractStatus = 4, 1, NULL)) dqht
        FROM
        t_emp_baseinfo t INNER JOIN t_emp_contractinfo t1 on t.empId=t1.empId where 1=1
        t_emp_baseinfo t INNER JOIN t_emp_contractinfo t1 on t.empId=t1.empId where 1=1 and t.delFlag=0
        <choose>
            <when test="btime!=null and btime!='' and etime!=null and etime!=''">
                and date_format(t1.endDate,'%Y-%m-%d') &gt;= #{btime}  and date_format(t1.endDate,'%Y-%m-%d') &lt;= #{etime}
@@ -173,7 +185,7 @@
        ,count(IF(t1.absenteeism !=0 , 1, NULL)) ygkg
        FROM
        t_emp_baseinfo t right  JOIN t_emp_dimissionattend t1 on t.empId=t1.empId where 1=1
        t_emp_baseinfo t right  JOIN t_emp_dimissionattend t1 on t.empId=t1.empId where 1=1 and t.delFlag=0 and t1.delFlag=0
        <choose>
            <when test="btime!=null and btime!='' and etime!=null and etime!=''">
                and t1.attendMonth &gt;= #{btime}  and t1.attendMonth &lt;= #{etime}
@@ -225,7 +237,7 @@
        SELECT
        count(1) lzaj
        FROM
        t_emp_baseinfo t right  JOIN t_emp_labortrouble t1 on t.empId=t1.empId where 1=1
        t_emp_baseinfo t right  JOIN t_emp_labortrouble t1 on t.empId=t1.empId where 1=1 and t.delFlag=0 and t1.delFlag=0
        <choose>
            <when test="btime!=null and btime!='' and etime!=null and etime!=''">
                and date_format(t1.arbitrationDate,'%Y-%m-%d') &gt;= #{btime}  and date_format(t1.arbitrationDate,'%Y-%m-%d') &lt;= #{etime}
@@ -249,7 +261,7 @@
    <select id="countGsajBaseInfoList" resultType="java.util.Map">
        SELECT (SELECT  count(1)
        FROM
        t_emp_baseinfo t right  JOIN t_emp_accidentcases t1 on t.empId=t1.empId where 1=1
        t_emp_baseinfo t right  JOIN t_emp_accidentcases t1 on t.empId=t1.empId where 1=1 and t.delFlag=0 and t1.delFlag=0
        <choose>
            <when test="btime!=null and btime!='' and etime!=null and etime!=''">
                and date_format(t1.injuredTime,'%Y-%m-%d') &gt;= #{btime}  and date_format(t1.injuredTime,'%Y-%m-%d') &lt;= #{etime}
@@ -270,7 +282,7 @@
        SELECT
        count(1)
        FROM
        t_emp_baseinfo t right  JOIN t_emp_occupational t1 on t.empId=t1.empId where 1=1
        t_emp_baseinfo t right  JOIN t_emp_occupational t1 on t.empId=t1.empId where 1=1 and t.delFlag=0 and t1.delFlag=0
        <choose>
            <when test="btime!=null and btime!='' and etime!=null and etime!=''">
                and date_format(t1.injuredTime,'%Y-%m-%d') &gt;= #{btime}  and date_format(t1.injuredTime,'%Y-%m-%d') &lt;= #{etime}
@@ -297,7 +309,7 @@
        SELECT
        count(1) sbsq
        FROM
        t_emp_baseinfo t right  JOIN t_emp_insurance t1 on t.empId=t1.empId where 1=1
        t_emp_baseinfo t right  JOIN t_emp_insurance t1 on t.empId=t1.empId where 1=1 and t.delFlag=0 and t1.delFlag=0
        <choose>
            <when test="btime!=null and btime!='' and etime!=null and etime!=''">
                and date_format(t1.applayDate,'%Y-%m-%d') &gt;= #{btime}  and date_format(t1.applayDate,'%Y-%m-%d') &lt;= #{etime}
@@ -320,7 +332,7 @@
        SELECT
        count(1) syj
        FROM
        t_emp_baseinfo t right  JOIN t_emp_unemployment t1 on t.empId=t1.empId where 1=1
        t_emp_baseinfo t right  JOIN t_emp_unemployment t1 on t.empId=t1.empId where 1=1 and t.delFlag=0 and t1.delFlag=0
        <choose>
            <when test="btime!=null and btime!='' and etime!=null and etime!=''">
                and date_format(t1.applayDate,'%Y-%m-%d') &gt;= #{btime}  and date_format(t1.applayDate,'%Y-%m-%d') &lt;= #{etime}
@@ -343,7 +355,7 @@
        SELECT
        count(1) ygtj
        FROM
        t_emp_baseinfo t right  JOIN t_emp_physicalexam t1 on t.empId=t1.empId where 1=1
        t_emp_baseinfo t right  JOIN t_emp_physicalexam t1 on t.empId=t1.empId where 1=1 and t.delFlag=0 and t1.delFlag=0
        <choose>
            <when test="btime!=null and btime!='' and etime!=null and etime!=''">
                and date_format(t1.physicalExamDate,'%Y-%m-%d') &gt;= #{btime}  and date_format(t1.physicalExamDate,'%Y-%m-%d') &lt;= #{etime}
@@ -366,7 +378,7 @@
        SELECT
        count(1) sfz
        FROM
        t_emp_baseinfo t  where 1=1
        t_emp_baseinfo t  where 1=1 and t.delFlag=0
        <choose>
            <when test="btime!=null and btime!='' and etime!=null and etime!=''">
                and date_format(t.certificateValidity,'%Y-%m-%d') &gt;= #{btime}  and date_format(t.certificateValidity,'%Y-%m-%d') &lt;= #{etime}
@@ -390,7 +402,7 @@
        SELECT
        count(1) ygtg
        FROM
        t_emp_baseinfo t right  JOIN t_emp_jobChange t1 on t.empId=t1.empId where 1=1
        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
        <choose>
            <when test="index==0">
                and TO_DAYS(t1.changeDate) = TO_DAYS(NOW())
@@ -411,7 +423,7 @@
        SELECT
        count(1) bljl
        FROM
        t_emp_baseinfo t right  JOIN t_emp_badrecord t1 on t.empId=t1.empId where 1=1
        t_emp_baseinfo t right  JOIN t_emp_badrecord t1 on t.empId=t1.empId where 1=1 and t.delFlag=0 and t1.delFlag=0
        <choose>
            <when test="btime!=null and btime!='' and etime!=null and etime!=''">
                and date_format(t1.badDate,'%Y-%m-%d') &gt;= #{btime}  and date_format(t1.badDate,'%Y-%m-%d') &lt;= #{etime}
@@ -434,29 +446,11 @@
    <select id="zzbaseInfoList" 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 empStatus=0
        select t1.* from t_emp_baseinfo t1 left join t_dept t2 on t1.deptId=t2.DEPT_ID where empStatus=0 and t1.delFlag=0
        <if test="name!= 'undefined' and name!=null and name!=''">
            and (t1.empNumb like CONCAT('%',#{name},'%') or t1.empName like CONCAT('%',#{name},'%') or
            t1.certificateNumb like CONCAT('%',#{name},'%') or t2.DEPT_NAME like CONCAT('%',#{name},'%'))
        </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') &gt;= #{btime}  and date_format(t1.createTime,'%Y-%m-%d') &lt;= #{etime}
            </when>
            <when test="index==0">
                and TO_DAYS(t1.createTime) = TO_DAYS(NOW())
            </when>
            <when test="index==1">
                and YEARWEEK(date_format(t1.createTime,'%Y-%m-%d')) = YEARWEEK(now())
            </when>
            <when test="index==2">
                and date_format(t1.createTime,'%Y-%m') = date_format(now(),'%Y-%m')
            </when>
            <otherwise>
                and YEAR(t1.createTime)=YEAR(NOW())
            </otherwise>
        </choose>
    </select>
    <select id="clbaseInfoList" resultType="cc.mrbird.febs.server.hr.entity.EmpBaseInfo">
@@ -464,42 +458,24 @@
                SELECT
                t.*
                FROM
                t_emp_baseinfo t left join t_dept t2 on t.deptId=t2.DEPT_ID where 1=1 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.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.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.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
            t1.certificateNumb like CONCAT('%',#{name},'%') or t2.DEPT_NAME like CONCAT('%',#{name},'%'))
        </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') &gt;= #{btime}  and date_format(t1.createTime,'%Y-%m-%d') &lt;= #{etime}
            </when>
            <when test="index==0">
                and TO_DAYS(t1.createTime) = TO_DAYS(NOW())
            </when>
            <when test="index==1">
                and YEARWEEK(date_format(t1.createTime,'%Y-%m-%d')) = YEARWEEK(now())
            </when>
            <when test="index==2">
                and date_format(t1.createTime,'%Y-%m') = date_format(now(),'%Y-%m')
            </when>
            <otherwise>
                and YEAR(t1.createTime)=YEAR(NOW())
            </otherwise>
        </choose>
    </select>
    <select id="sfzbaseInfoList" 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
        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
        <if test="name!= 'undefined' and name!=null and name!=''">
            and (t1.empNumb like CONCAT('%',#{name},'%') or t1.empName like CONCAT('%',#{name},'%') or
            t1.certificateNumb like CONCAT('%',#{name},'%') or t2.DEPT_NAME like CONCAT('%',#{name},'%'))
@@ -524,7 +500,7 @@
    </select>
    <select id="xjbaseInfoList" 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
        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
        <if test="name!= 'undefined' and name!=null and name!=''">
            and (t1.empNumb like CONCAT('%',#{name},'%') or t1.empName like CONCAT('%',#{name},'%') or
            t1.certificateNumb like CONCAT('%',#{name},'%') or t2.DEPT_NAME like CONCAT('%',#{name},'%'))
@@ -552,83 +528,29 @@
    <select id="zsbaseInfoList" 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 empType='1'
        select t1.* from t_emp_baseinfo t1 left join t_dept t2 on t1.deptId=t2.DEPT_ID where empType='1' and t1.delFlag=0 and empStatus=0
        <if test="name!= 'undefined' and name!=null and name!=''">
            and (t1.empNumb like CONCAT('%',#{name},'%') or t1.empName like CONCAT('%',#{name},'%') or
            t1.certificateNumb like CONCAT('%',#{name},'%') or t2.DEPT_NAME like CONCAT('%',#{name},'%'))
        </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') &gt;= #{btime}  and date_format(t1.createTime,'%Y-%m-%d') &lt;= #{etime}
            </when>
            <when test="index==0">
                and TO_DAYS(t1.createTime) = TO_DAYS(NOW())
            </when>
            <when test="index==1">
                and YEARWEEK(date_format(t1.createTime,'%Y-%m-%d')) = YEARWEEK(now())
            </when>
            <when test="index==2">
                and date_format(t1.createTime,'%Y-%m') = date_format(now(),'%Y-%m')
            </when>
            <otherwise>
                and YEAR(t1.createTime)=YEAR(NOW())
            </otherwise>
        </choose>
    </select>
    <select id="lsbaseInfoList" 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 empType='2'
        select t1.* from t_emp_baseinfo t1 left join t_dept t2 on t1.deptId=t2.DEPT_ID where empType='2' and t1.delFlag=0 and empStatus=0
        <if test="name!= 'undefined' and name!=null and name!=''">
            and (t1.empNumb like CONCAT('%',#{name},'%') or t1.empName like CONCAT('%',#{name},'%') or
            t1.certificateNumb like CONCAT('%',#{name},'%') or t2.DEPT_NAME like CONCAT('%',#{name},'%'))
        </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') &gt;= #{btime}  and date_format(t1.createTime,'%Y-%m-%d') &lt;= #{etime}
            </when>
            <when test="index==0">
                and TO_DAYS(t1.createTime) = TO_DAYS(NOW())
            </when>
            <when test="index==1">
                and YEARWEEK(date_format(t1.createTime,'%Y-%m-%d')) = YEARWEEK(now())
            </when>
            <when test="index==2">
                and date_format(t1.createTime,'%Y-%m') = date_format(now(),'%Y-%m')
            </when>
            <otherwise>
                and YEAR(t1.createTime)=YEAR(NOW())
            </otherwise>
        </choose>
    </select>
    <select id="lzbaseInfoList" 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
        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 empStatus=1
        <if test="name!= 'undefined' and name!=null and name!=''">
            and (t1.empNumb like CONCAT('%',#{name},'%') or t1.empName like CONCAT('%',#{name},'%') or
            t1.certificateNumb like CONCAT('%',#{name},'%') or t2.DEPT_NAME like CONCAT('%',#{name},'%'))
        </if>
        <choose>
            <when test="btime!='undefined' and btime!=null and btime!='' and etime!='undefined' and etime!=null and etime!=''">
                and date_format(t1.dimissionDate,'%Y-%m-%d') &gt;= #{btime}  and date_format(t1.dimissionDate,'%Y-%m-%d') &lt;= #{etime}
            </when>
            <when test="index==0">
                and TO_DAYS(t1.dimissionDate) = TO_DAYS(NOW())
            </when>
            <when test="index==1">
                and YEARWEEK(date_format(t1.dimissionDate,'%Y-%m-%d')) = YEARWEEK(now())
            </when>
            <when test="index==2">
                and date_format(t1.dimissionDate,'%Y-%m') = date_format(now(),'%Y-%m')
            </when>
            <otherwise>
                and YEAR(t1.dimissionDate)=YEAR(NOW())
            </otherwise>
        </choose>
    </select>
@@ -637,7 +559,7 @@
        SELECT
        t.*,t1.applayDate,t1.reason,t1.reporter
        FROM
        t_emp_baseinfo t INNER JOIN t_emp_resign t1 on t.empId=t1.empId left join t_dept t2 on t.deptId=t2.DEPT_ID where 1=1
        t_emp_baseinfo t INNER JOIN t_emp_resign t1 on t.empId=t1.empId left join t_dept t2 on t.deptId=t2.DEPT_ID where 1=1 and t.delFlag=0 and t1.delFlag=0
        <if test="name!= 'undefined' and name!=null and name!=''">
            and (t.empNumb like CONCAT('%',#{name},'%') or t.empName like CONCAT('%',#{name},'%') or
            t.certificateNumb like CONCAT('%',#{name},'%') or t2.DEPT_NAME like CONCAT('%',#{name},'%'))
@@ -664,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
        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
        <choose>
            <when test="number==8">
               and t1.dimissionType = '1'
@@ -705,13 +627,47 @@
    <select id="yxbaseInfoList" resultType="cc.mrbird.febs.server.hr.entity.EmpBaseInfo">
        select t1.* from t_emp_baseinfo t left join t_dept t2 on t.deptId=t2.DEPT_ID INNER JOIN t_emp_contractinfo t1 on t.empId=t1.empId where 1=1
        select t1.* from t_emp_baseinfo t left join t_dept t2 on t.deptId=t2.DEPT_ID INNER JOIN t_emp_contractinfo t1 on t.empId=t1.empId where 1=1 and t.delFlag=0 and t1.delFlag=0
        <choose>
            <when test="number==14">
                and t1.contractStatus = '2'
                <choose>
                    <when test="btime!='undefined' and btime!=null and btime!='' and etime!='undefined' and etime!=null and etime!=''">
                        and date_format(t1.signingDate,'%Y-%m-%d') &gt;= #{btime}  and date_format(t1.signingDate,'%Y-%m-%d') &lt;= #{etime}
                    </when>
                    <when test="index==0">
                        and TO_DAYS(t1.signingDate) = TO_DAYS(NOW())
                    </when>
                    <when test="index==1">
                        and YEARWEEK(date_format(t1.signingDate,'%Y-%m-%d')) = YEARWEEK(now())
                    </when>
                    <when test="index==2">
                        and date_format(t1.signingDate,'%Y-%m') = date_format(now(),'%Y-%m')
                    </when>
                    <otherwise>
                        and YEAR(t1.signingDate)=YEAR(NOW())
                    </otherwise>
                </choose>
            </when>
            <when test="number==13">
                and t1.contractStatus = '1'
                <choose>
                    <when test="btime!='undefined' and btime!=null and btime!='' and etime!='undefined' and etime!=null and etime!=''">
                        and date_format(t1.signingDate,'%Y-%m-%d') &gt;= #{btime}  and date_format(t1.signingDate,'%Y-%m-%d') &lt;= #{etime}
                    </when>
                    <when test="index==0">
                        and TO_DAYS(t1.signingDate) = TO_DAYS(NOW())
                    </when>
                    <when test="index==1">
                        and YEARWEEK(date_format(t1.signingDate,'%Y-%m-%d')) = YEARWEEK(now())
                    </when>
                    <when test="index==2">
                        and date_format(t1.signingDate,'%Y-%m') = date_format(now(),'%Y-%m')
                    </when>
                    <otherwise>
                        and YEAR(t1.signingDate)=YEAR(NOW())
                    </otherwise>
                </choose>
            </when>
            <otherwise>
                and (t1.contractStatus = '1' or t1.contractStatus = '2')
@@ -721,23 +677,7 @@
            and (t.empNumb like CONCAT('%',#{name},'%') or t.empName like CONCAT('%',#{name},'%') or
            t.certificateNumb like CONCAT('%',#{name},'%') or t2.DEPT_NAME like CONCAT('%',#{name},'%'))
        </if>
        <choose>
            <when test="btime!='undefined' and btime!=null and btime!='' and etime!='undefined' and etime!=null and etime!=''">
                and date_format(t1.signingDate,'%Y-%m-%d') &gt;= #{btime}  and date_format(t1.signingDate,'%Y-%m-%d') &lt;= #{etime}
            </when>
            <when test="index==0">
                and TO_DAYS(t1.signingDate) = TO_DAYS(NOW())
            </when>
            <when test="index==1">
                and YEARWEEK(date_format(t1.signingDate,'%Y-%m-%d')) = YEARWEEK(now())
            </when>
            <when test="index==2">
                and date_format(t1.signingDate,'%Y-%m') = date_format(now(),'%Y-%m')
            </when>
            <otherwise>
                and YEAR(t1.signingDate)=YEAR(NOW())
            </otherwise>
        </choose>
    </select>
@@ -747,7 +687,7 @@
        SELECT
        t1.*
        FROM
        t_emp_baseinfo t INNER JOIN t_emp_contractinfo t1 on t.empId=t1.empId left join t_dept t2 on t.deptId=t2.DEPT_ID where 1=1 and t1.contractStatus = '4'
        t_emp_baseinfo t INNER JOIN t_emp_contractinfo t1 on t.empId=t1.empId left join t_dept t2 on t.deptId=t2.DEPT_ID where 1=1 and t.delFlag=0 and t1.delFlag=0 and t1.contractStatus = '4'
        <if test="name!= 'undefined' and name!=null and name!=''">
            and (t.empNumb like CONCAT('%',#{name},'%') or t.empName like CONCAT('%',#{name},'%') or
            t.certificateNumb like CONCAT('%',#{name},'%') or t2.DEPT_NAME like CONCAT('%',#{name},'%'))
@@ -775,7 +715,7 @@
        SELECT
        t1.*
        FROM
        t_emp_baseinfo t INNER JOIN t_emp_contractinfo t1 on t.empId=t1.empId left join t_dept t2 on t.deptId=t2.DEPT_ID where 1=1 and t1.contractStatus = '3'
        t_emp_baseinfo t INNER JOIN t_emp_contractinfo t1 on t.empId=t1.empId left join t_dept t2 on t.deptId=t2.DEPT_ID where 1=1 and t.delFlag=0 and t1.delFlag=0 and t1.contractStatus = '3'
        <if test="name!= 'undefined' and name!=null and name!=''">
            and (t.empNumb like CONCAT('%',#{name},'%') or t.empName like CONCAT('%',#{name},'%') or
            t.certificateNumb like CONCAT('%',#{name},'%') or t2.DEPT_NAME like CONCAT('%',#{name},'%'))
@@ -803,7 +743,7 @@
        SELECT
        t1.*
        FROM
        t_emp_baseinfo t right JOIN t_emp_dimissionattend t1 on t.empId=t1.empId left join t_dept t2 on t.deptId=t2.DEPT_ID where 1=1
        t_emp_baseinfo t right JOIN t_emp_dimissionattend t1 on t.empId=t1.empId left join t_dept t2 on t.deptId=t2.DEPT_ID where 1=1 and t.delFlag=0 and t1.delFlag=0
        <choose>
            <when test="number==3">
              and  t1.absenteeism !=0
@@ -839,7 +779,7 @@
        SELECT
        t1.*
        FROM
        t_emp_baseinfo t right JOIN t_emp_leaveinfo t1 on t.empId=t1.empId where 1=1
        t_emp_baseinfo t right JOIN t_emp_leaveinfo 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.empNumb like CONCAT('%',#{name},'%') or t1.empName like CONCAT('%',#{name},'%') or
            t1.certificateNumb like CONCAT('%',#{name},'%') or t1.deptName like CONCAT('%',#{name},'%'))
@@ -868,7 +808,7 @@
        SELECT
        t1.*
        FROM
        t_emp_baseinfo t right JOIN t_emp_physicalexam t1 on t.empId=t1.empId where 1=1
        t_emp_baseinfo t right JOIN t_emp_physicalexam 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.empNumb like CONCAT('%',#{name},'%') or t1.empName like CONCAT('%',#{name},'%') or
            t1.certificateNumb like CONCAT('%',#{name},'%') or t1.deptName like CONCAT('%',#{name},'%'))
@@ -900,7 +840,7 @@
        SELECT
        t1.*
        FROM
        t_emp_baseinfo t right JOIN t_emp_labortrouble t1 on t.empId=t1.empId where 1=1
        t_emp_baseinfo t right JOIN t_emp_labortrouble 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.empNumb like CONCAT('%',#{name},'%') or t1.empName like CONCAT('%',#{name},'%') or
            t1.certificateNumb like CONCAT('%',#{name},'%') or t1.deptName like CONCAT('%',#{name},'%'))
@@ -931,7 +871,7 @@
        SELECT
        t1.*
        FROM
        t_emp_baseinfo t right JOIN t_emp_occupational t1 on t.empId=t1.empId where 1=1
        t_emp_baseinfo t right JOIN t_emp_occupational 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.empNumb like CONCAT('%',#{name},'%') or t1.empName like CONCAT('%',#{name},'%') or
            t1.certificateNumb like CONCAT('%',#{name},'%') or t1.deptName like CONCAT('%',#{name},'%'))
@@ -960,7 +900,7 @@
        SELECT
        t1.*
        FROM
        t_emp_baseinfo t right JOIN t_emp_accidentcases t1 on t.empId=t1.empId where 1=1
        t_emp_baseinfo t right JOIN t_emp_accidentcases 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.empNumb like CONCAT('%',#{name},'%') or t1.empName like CONCAT('%',#{name},'%') or
            t1.certificateNumb like CONCAT('%',#{name},'%') or t1.deptName like CONCAT('%',#{name},'%'))
@@ -990,7 +930,7 @@
        SELECT
        t1.*
        FROM
        t_emp_baseinfo t right JOIN t_emp_insurance t1 on t.empId=t1.empId where 1=1
        t_emp_baseinfo t right JOIN t_emp_insurance 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.empNumb like CONCAT('%',#{name},'%') or t1.empName like CONCAT('%',#{name},'%') or
            t1.certificateNumb like CONCAT('%',#{name},'%') or t1.deptName like CONCAT('%',#{name},'%'))
@@ -1020,7 +960,7 @@
        SELECT
        t1.*
        FROM
        t_emp_baseinfo t right JOIN t_emp_unemployment t1 on t.empId=t1.empId where 1=1
        t_emp_baseinfo t right JOIN t_emp_unemployment 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.empNumb like CONCAT('%',#{name},'%') or t1.empName like CONCAT('%',#{name},'%') or
            t1.certificateNumb like CONCAT('%',#{name},'%') or t1.deptName like CONCAT('%',#{name},'%'))
@@ -1049,7 +989,7 @@
        SELECT
        t1.*
        FROM
        t_emp_baseinfo t right JOIN t_emp_badrecord t1 on t.empId=t1.empId where 1=1
        t_emp_baseinfo t right JOIN t_emp_badrecord 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.empNumb like CONCAT('%',#{name},'%') or t1.empName like CONCAT('%',#{name},'%') or
            t1.certificateNumb like CONCAT('%',#{name},'%') or t1.deptName like CONCAT('%',#{name},'%'))
@@ -1079,7 +1019,7 @@
        SELECT
        t1.*
        FROM
        t_emp_baseinfo t right JOIN t_emp_jobChange t1 on t.empId=t1.empId where 1=1
        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},'%'
        </if>
febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/service/impl/EmpBaseInfoServiceImpl.java
@@ -681,17 +681,29 @@
            manOld=sysConfig.get(0).getConfigValue();
            womanOld=sysConfig.get(1).getConfigValue();
        }
        //在职员工,正式员工,临时员工,正常离职,自动离职,公司辞退        判断条件离职申请日期
        //在职员工,正式员工,临时员工,超龄员工
        Map<String, Object> stringObjectMap = this.baseMapper.countBaseInfoList(index,btime,etime,manOld,womanOld);
        //正常离职,自动离职,公司辞退    判断条件创建日期
        Map<String, Object> zclzObjectMap =this.baseMapper.countZcygBaseInfoList(index,btime,etime);
        if(zclzObjectMap!=null){
            stringObjectMap.put("zclz",zclzObjectMap.get("zclz").toString());
            stringObjectMap.put("zdlz",zclzObjectMap.get("zdlz").toString());
            stringObjectMap.put("gsct",zclzObjectMap.get("gsct").toString());
        }
        //新进员工      判断条件入职日期
        Integer xjygObjectMap =this.baseMapper.countXjygBaseInfoList(index,btime,etime);
        if(xjygObjectMap!=null){
            stringObjectMap.put("xjyg",xjygObjectMap);
        }
        //离职员工总数,解除合同        判断条件离职申请日期
        //离职员工总数
        Integer empStatus = this.baseMapper.selectCount(new QueryWrapper<EmpBaseInfo>().eq("empStatus", 1));
        if(empStatus!=null){
            stringObjectMap.put("lzyg",empStatus);
        }
        //解除合同        判断条件离职申请日期
        Map<String, Object> lzygObjectMap =this.baseMapper.countLzygBaseInfoList(index,btime,etime);
        if(lzygObjectMap!=null){
            stringObjectMap.put("lzyg",lzygObjectMap.get("lzyg").toString());
            stringObjectMap.put("jcht",lzygObjectMap.get("jcht").toString());
        }
        //辞职申请员工总数     判断条件辞职申请日期
@@ -699,12 +711,16 @@
        if(czygObjectMap!=null){
            stringObjectMap.put("czyg",czygObjectMap);
        }
        //有效合同,新签合同,续签合同    判断条件合同签订日期
        //有效合同    判断条件合同签订日期
        Map<String, Object> yxhtObjectMap =this.baseMapper.countYxhtBaseInfoList(index,btime,etime);
        if(yxhtObjectMap!=null){
            stringObjectMap.put("yxht",yxhtObjectMap.get("yxht").toString());
            stringObjectMap.put("xinqht",yxhtObjectMap.get("xinqht").toString());
            stringObjectMap.put("xqht",yxhtObjectMap.get("xqht").toString());
        }
        //新签合同,续签合同    判断条件合同签订日期
        Map<String, Object> xqhtObjectMap =this.baseMapper.countXqhtBaseInfoList(index,btime,etime);
        if(yxhtObjectMap!=null){
            stringObjectMap.put("xinqht",xqhtObjectMap.get("xinqht").toString());
            stringObjectMap.put("xqht",xqhtObjectMap.get("xqht").toString());
        }
        //到期合同     判断条件合同结束时间
        Integer dqhtObjectMap =this.baseMapper.countDqhtBaseInfoList(index,btime,etime);