| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <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> |
| | | |
| | | <select id="countBaseInfoList" resultType="java.util.Map"> |
| | | SELECT |
| | |
| | | ) zdlz, |
| | | count( |
| | | IF (t.dimissionType = '4', 1, NULL) |
| | | ) gsct |
| | | ) gsct, |
| | | 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 |
| | | <choose> |
| | |
| | | and date_format(t.createTime,'%Y-%m-%d') >= #{btime} and date_format(t.createTime,'%Y-%m-%d') <= #{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()) |
| | |
| | | </choose> |
| | | |
| | | </select> |
| | | |
| | | <select id="clbaseInfoList" resultType="cc.mrbird.febs.server.hr.entity.EmpBaseInfo"> |
| | | select t1.* from ( |
| | | 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>=${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>=${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') >= #{btime} and date_format(t1.createTime,'%Y-%m-%d') <= #{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 |
| | | <if test="name!= 'undefined' and name!=null and name!=''"> |