| | |
| | | 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 |
| | | |
| | | <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} |
| | | </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> |
| | | |
| | | |
| | |
| | | </when> |
| | | <otherwise> |
| | | and (t1.contractStatus = '1' or 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> |
| | | </otherwise> |
| | | </choose> |
| | | <if test="name!= 'undefined' and name!=null and name!=''"> |