| | |
| | | </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 |
| | | <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> |