孔祥富
2021-03-02 23921ae50a511f23791b9ba07b41f51ec36b1c71
febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/mapper/EmpBaseInfoMapper.xml
@@ -378,22 +378,22 @@
        SELECT
        count(1) sfz
        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
        <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}
            </when>
            <when test="index==0">
                and TO_DAYS(t.certificateValidity) = TO_DAYS(NOW())
                and TO_DAYS(t.certificateValidity) &lt;= TO_DAYS(NOW())
            </when>
            <when test="index==1">
                and YEARWEEK(date_format(t.certificateValidity,'%Y-%m-%d')) = YEARWEEK(now())
                and YEARWEEK(date_format(t.certificateValidity,'%Y-%m-%d')) &lt;= YEARWEEK(now())
            </when>
            <when test="index==2">
                and date_format(t.certificateValidity,'%Y-%m') = date_format(now(),'%Y-%m')
                and date_format(t.certificateValidity,'%Y-%m') &lt;= date_format(now(),'%Y-%m')
            </when>
            <otherwise>
                and YEAR(t.certificateValidity)=YEAR(NOW())
                and YEAR(t.certificateValidity)&lt;=YEAR(NOW())
            </otherwise>
        </choose>
    </select>
@@ -475,7 +475,7 @@
    <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 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 t1.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},'%'))
@@ -485,16 +485,16 @@
                and date_format(t1.certificateValidity,'%Y-%m-%d') &gt;= #{btime}  and date_format(t1.certificateValidity,'%Y-%m-%d') &lt;= #{etime}
            </when>
            <when test="index==0">
                and TO_DAYS(t1.certificateValidity) = TO_DAYS(NOW())
                and TO_DAYS(t1.certificateValidity) &lt;= TO_DAYS(NOW())
            </when>
            <when test="index==1">
                and YEARWEEK(date_format(t1.certificateValidity,'%Y-%m-%d')) = YEARWEEK(now())
                and YEARWEEK(date_format(t1.certificateValidity,'%Y-%m-%d')) &lt;= YEARWEEK(now())
            </when>
            <when test="index==2">
                and date_format(t1.certificateValidity,'%Y-%m') = date_format(now(),'%Y-%m')
                and date_format(t1.certificateValidity,'%Y-%m') &lt;= date_format(now(),'%Y-%m')
            </when>
            <otherwise>
                and YEAR(t1.certificateValidity)=YEAR(NOW())
                and YEAR(t1.certificateValidity)&lt;=YEAR(NOW())
            </otherwise>
        </choose>
@@ -1017,11 +1017,12 @@
    <select id="empBaseInfoTgList" resultType="cc.mrbird.febs.server.hr.entity.EmpJobChange">
        SELECT
        t1.*,t.certificateNumb
        t1.*,t.*
        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 (t.empNumb like CONCAT('%',#{name},'%') or t.empName like CONCAT('%',#{name},'%') or
            t.certificateNumb like CONCAT('%',#{name},'%') or t.deptName like CONCAT('%',#{name},'%'))
        </if>
        <choose>
            <when test="btime!='undefined' and btime!=null and btime!='' and etime!='undefined' and etime!=null and etime!=''">