| | |
| | | </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>=${manOld},1,null))+count( if(t.sex is not null and t.age !=0 and t.sex=2 and t.age>=${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> |
| | | |
| | | |
| | |
| | | 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>=${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>=${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>=${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>=${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 |