| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- select w.id id,
- w.userid userid,
- w.belong_unitid belong_unitid,
- w.dutiesid dutiesid,
- os.strategy_name as overtimepay_strategyid,
- ds.strategy_name as duty_strategyid,
- ts.subsidy_name as traffic_subsidyid,
- ms.subsidy_name as megathermal_subsidyid,
- mes.subsidy_name as fixedmeals_subsidyid,
- mes1.subsidy_name as nofixedmeals_subsidyid,
- ots.subsidy_name as other_subsidyid,
- sss.social_security_unit as social_security_strategyid,
- pfs.provident_fund_name as provident_fund_strategyid,
- w.append_pay append_pay,
- w.deduct_pay deduct_pay,
- w.daikou_fee daikou_fee,
- w.jiaojin_subsidyid jiaojin_subsidyid,
- w.project_performance project_performance,
- w.onlychild_pay onlychild_pay,
- w.strategy_type as strategy_type,
- u.realname,u.username,sus.userNum as userNum,dt.departname,d.id as departid,du.duties_name as dutiesname,du.id as dutid,u.id as userids from t_bus_user_wagestrategy w
- left join t_s_base_user u on u.id = w.userid
- left join t_s_user sus on sus.id = w.userid
- LEFT JOIN t_s_user_org uo ON u.ID = uo.user_id and uo.ifpluralism = 0 and uo.status = 0
- left join t_s_depart d on uo.org_id = d.id
- left join t_s_depart dt on w.pjt_id = dt.id
- left join t_bus_user_personnel p on p.userid = u.id
- left join t_bus_duties du on du.id = p.belong_dutiesid
- LEFT JOIN t_bus_overtimepay_strategy os
- ON w.overtimepay_strategyid = os.id and os.status = '0' and os.delete_flag = '0'
- LEFT JOIN t_bus_dutyfee_strategy ds
- ON w.duty_strategyid = ds.id and ds.status = '0' and ds.delete_flag = '0'
- LEFT JOIN t_bus_traffic_subsidy ts
- ON w.traffic_subsidyid = ts.id and ts.status = '0' and ts.delete_flag = '0'
- LEFT JOIN t_bus_megathermal_subsidy ms
- ON w.megathermal_subsidyid = ms.id and ms.status = '0' and ms.delete_flag = '0'
- LEFT JOIN t_bus_meals_subsidy mes
- ON w.fixedmeals_subsidyid = mes.id and mes.status = '0' and mes.delete_flag = '0' and mes.subsidy_type = 'anyueguding'
- LEFT JOIN t_bus_meals_subsidy mes1
- ON w.nofixedmeals_subsidyid = mes1.id and mes1.status = '0' and mes1.delete_flag = '0' and mes1.subsidy_type = 'anciguding'
- LEFT JOIN t_bus_other_subsidy ots
- ON w.other_subsidyid = ots.id and ots.status = '0' and ots.delete_flag = '0'
- LEFT JOIN t_bus_social_security_strategy sss
- ON w.social_security_strategyid = sss.id and sss.status = '0' and sss.delete_flag = '0'
- LEFT JOIN t_bus_provident_fund_strategy pfs
- ON w.provident_fund_strategyid = pfs.id and pfs.status = '0' and pfs.delete_flag = '0'
- where 1=1 and (p.leave_date is null or p.leave_date = '')
- <#if (userWagestrategyDao.username )?? && userWagestrategyDao.username ?length gt 0>
- /* 转正人编号 */
- and u.username like CONCAT('%', :userWagestrategyDao.username ,'%')
- </#if>
- <#if (userWagestrategyDao.realname )?? && userWagestrategyDao.realname ?length gt 0>
- /* 转正人名称 */
- and u.realname like CONCAT('%', :userWagestrategyDao.realname ,'%')
- </#if>
- <#if ( userWagestrategyDao.orgIdList )?? && userWagestrategyDao.orgIdList ?size gt 0>
- /* 所属单位*/
- and d.id in(
- <#list userWagestrategyDao.orgIdList as item>
- '${item}'
- <#if item_has_next>,</#if>
- </#list>
- )
- </#if>
- <#if ( useridList )?? && useridList ?size gt 0>
- /* 可见的用户id */
- and u.id in(
- <#list useridList as item>
- '${item}'
- <#if item_has_next>,</#if>
- </#list>
- )
- </#if>
- ORDER BY p.leave_date
|