| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- SELECT SUM(basic_wage) basic_wage,SUM(duties_allowance) duties_allowance,SUM(certificate_subsidy) certificate_subsidy,
- SUM(traffic_subsidy) traffic_subsidy,SUM(megathermal_subsidy) megathermal_subsidy,SUM(only_child_cost) only_child_cost,SUM(other_subsidy) other_subsidy
- ,SUM(bonus) bonus,SUM(project_performance) project_performance,SUM(meals_subsidy_day) meals_subsidy_day,SUM(meals_subsidy_night)meals_subsidy_night,
- SUM(meals_subsidy) meals_subsidy,SUM(overtimepay_timeout) overtimepay_timeout,SUM(overtimepay_fixed) overtimepay_fixed,
- SUM(duty) duty,SUM(special_overtime) special_overtime,SUM(sick_leave_debit) sick_leave_debit,SUM(thing_leave_debit) thing_leave_debit,
- SUM(absence_debit) absence_debit,SUM(payment_subsidy) payment_subsidy,
- SUM(social_security_debit) social_security_debit,SUM(provident_fund_debit) provident_fund_debit,SUM(com_social_security_debit) com_social_security_debit,
- SUM(com_provident_fund_debit) com_provident_fund_debit,SUM(pre_tax_mone) pre_tax_mone,SUM(comcost) comCost,
- SUM(daikou_debit) daikouDebit,SUM(other_debit) other_debit,sum(reissue) reissue,SUM(tax_money) tax_money,SUM(actual_money) actual_money FROM t_bus_user_wage c
- left join t_s_base_user u on c.userid = u.id
- left join t_bus_user_personnel per on per.userid = u.id and per.position_status != 0
- left join t_bus_duties du on du.id = per.belong_dutiesid
- left join t_bus_duties pdu on pdu.id = du.parent_dutiesid
- where 1=1 and u.delete_flag='0'
- <#if (userWageDto.username )?? && userWageDto.username ?length gt 0>
- /* 转正人编号 */
- and u.username like CONCAT('%', :userWageDto.username ,'%')
- </#if>
- <#if (userWageDto.realname )?? && userWageDto.realname ?length gt 0>
- /* 转正人名称 */
- and u.realname like CONCAT('%', :userWageDto.realname ,'%')
- </#if>
- <#if ( userWageDto.bpmStatus )?? && userWageDto.bpmStatus ?length gt 0>
- /* 申请状态*/
- and c.bpm_status = :userWageDto.bpmStatus
- </#if>
- <#if ( userWageDto.orgIdList )?? && userWageDto.orgIdList ?size gt 0>
- /* 所属单位*/
- and c.pjt_id in(
- <#list userWageDto.orgIdList as item>
- '${item}'
- <#if item_has_next>,</#if>
- </#list>
- )
- </#if>
- <#if ( userWageDto.monthly )?? && userWageDto.monthly ?length gt 0>
- /* 申请状态*/
- and c.monthly = :userWageDto.monthly
- </#if>
- <#if ( uidList )?? && uidList ?size gt 0>
- /* 可见的用户id */
- and u.id in(
- <#list uidList as item>
- '${item}'
- <#if item_has_next>,</#if>
- </#list>
- )
- </#if>
- <#if ( moth )?? && moth ?length gt 0>
- /* 申请状态*/
- and (per.leave_date > :moth or per.leave_date is null)
- </#if>
|