孔祥富
2021-03-01 458cb4e562d6d9dbf6ff14fa86a11f06762982c7
febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/mapper/EmpBaseInfoMapper.xml
@@ -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