| | |
| | | <!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 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.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 and t.empStatus='1' |
| | | <choose> |
| | | <when test="btime!=null and btime!='' and etime!=null and etime!=''"> |
| | | and date_format(t.createTime,'%Y-%m-%d') >= #{btime} and date_format(t.createTime,'%Y-%m-%d') <= #{etime} |
| | |
| | | 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>=${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 |
| | | </select> |
| | | |
| | | |
| | |
| | | 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') >= #{btime} and date_format(t.entryDate,'%Y-%m-%d') <= #{etime} |
| | |
| | | </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 and t1.delFlag=0 |
| | | <choose> |
| | | <when test="btime!=null and btime!='' and etime!=null and etime!=''"> |
| | | and date_format(t.dimissionDate,'%Y-%m-%d') >= #{btime} and date_format(t.dimissionDate,'%Y-%m-%d') <= #{etime} |
| | |
| | | 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 and t1.delFlag=0 |
| | | <choose> |
| | | <when test="btime!=null and btime!='' and etime!=null and etime!=''"> |
| | | and date_format(t1.applayDate,'%Y-%m-%d') >= #{btime} and date_format(t1.applayDate,'%Y-%m-%d') <= #{etime} |
| | |
| | | </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 and t1.delFlag=0 |
| | | <choose> |
| | | <when test="btime!=null and btime!='' and etime!=null and etime!=''"> |
| | | and date_format(t1.signingDate,'%Y-%m-%d') >= #{btime} and date_format(t1.signingDate,'%Y-%m-%d') <= #{etime} |
| | |
| | | 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 and t1.delFlag=0 |
| | | </select> |
| | | |
| | | |
| | |
| | | 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 and t1.delFlag=0 |
| | | <choose> |
| | | <when test="btime!=null and btime!='' and etime!=null and etime!=''"> |
| | | and date_format(t1.endDate,'%Y-%m-%d') >= #{btime} and date_format(t1.endDate,'%Y-%m-%d') <= #{etime} |
| | |
| | | ,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 >= #{btime} and t1.attendMonth <= #{etime} |
| | |
| | | SELECT |
| | | count(1) ygqj |
| | | 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 |
| | | <choose> |
| | | <when test="btime!=null and btime!='' and etime!=null and etime!=''"> |
| | | and date_format(t1.returnDate,'%Y-%m-%d') >= #{btime} and date_format(t1.returnDate,'%Y-%m-%d') <= #{etime} |
| | |
| | | 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') >= #{btime} and date_format(t1.arbitrationDate,'%Y-%m-%d') <= #{etime} |
| | |
| | | <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') >= #{btime} and date_format(t1.injuredTime,'%Y-%m-%d') <= #{etime} |
| | |
| | | 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') >= #{btime} and date_format(t1.injuredTime,'%Y-%m-%d') <= #{etime} |
| | |
| | | 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') >= #{btime} and date_format(t1.applayDate,'%Y-%m-%d') <= #{etime} |
| | |
| | | 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') >= #{btime} and date_format(t1.applayDate,'%Y-%m-%d') <= #{etime} |
| | |
| | | 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') >= #{btime} and date_format(t1.physicalExamDate,'%Y-%m-%d') <= #{etime} |
| | |
| | | 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') >= #{btime} and date_format(t.certificateValidity,'%Y-%m-%d') <= #{etime} |
| | |
| | | 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()) |
| | |
| | | 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') >= #{btime} and date_format(t1.badDate,'%Y-%m-%d') <= #{etime} |
| | |
| | | |
| | | |
| | | <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') >= #{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="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.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} |
| | | ) 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> |
| | | </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},'%')) |
| | |
| | | |
| | | </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},'%')) |
| | |
| | | |
| | | |
| | | <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') >= #{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="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') >= #{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="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') >= #{btime} and date_format(t1.dimissionDate,'%Y-%m-%d') <= #{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> |
| | | |
| | | |
| | |
| | | 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},'%')) |
| | |
| | | |
| | | |
| | | <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 and t.empStatus='1' |
| | | <choose> |
| | | <when test="number==8"> |
| | | and t1.dimissionType = '1' |
| | |
| | | |
| | | |
| | | <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') >= #{btime} and date_format(t1.signingDate,'%Y-%m-%d') <= #{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') >= #{btime} and date_format(t1.signingDate,'%Y-%m-%d') <= #{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') |
| | |
| | | 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') >= #{btime} and date_format(t1.signingDate,'%Y-%m-%d') <= #{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> |
| | | |
| | |
| | | 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},'%')) |
| | |
| | | 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},'%')) |
| | |
| | | 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 |
| | |
| | | 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},'%')) |
| | |
| | | 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},'%')) |
| | |
| | | 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},'%')) |
| | |
| | | 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},'%')) |
| | |
| | | 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},'%')) |
| | |
| | | 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},'%')) |
| | |
| | | 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},'%')) |
| | |
| | | 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},'%')) |
| | |
| | | </choose> |
| | | |
| | | </select> |
| | | |
| | | |
| | | <select id="empBaseInfoTgList" resultType="cc.mrbird.febs.server.hr.entity.EmpJobChange"> |
| | | SELECT |
| | | t1.* |
| | | 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},'%' |
| | | </if> |
| | | <choose> |
| | | <when test="btime!='undefined' and btime!=null and btime!='' and etime!='undefined' and etime!=null and etime!=''"> |
| | | and date_format(t1.changeDate,'%Y-%m-%d') >= #{btime} and date_format(t1.changeDate,'%Y-%m-%d') <= #{etime} |
| | | </when> |
| | | <when test="index==0"> |
| | | and TO_DAYS(t1.changeDate) = TO_DAYS(NOW()) |
| | | </when> |
| | | <when test="index==1"> |
| | | and YEARWEEK(date_format(t1.changeDate,'%Y-%m-%d')) = YEARWEEK(now()) |
| | | </when> |
| | | <when test="index==2"> |
| | | and date_format(t1.changeDate,'%Y-%m') = date_format(now(),'%Y-%m') |
| | | </when> |
| | | <otherwise> |
| | | and YEAR(t1.changeDate)=YEAR(NOW()) |
| | | </otherwise> |
| | | </choose> |
| | | |
| | | </select> |
| | | </mapper> |