23 lines
1.1 KiB
XML
23 lines
1.1 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<!DOCTYPE mapper
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.pusong.business.mapper.PsSalaryMapper">
|
|
|
|
|
|
<select id="selectSalaryList" resultMap="com.pusong.business.domain.vo.PsSalaryVo">
|
|
select
|
|
ps.user_id,
|
|
ps.salary_money ,
|
|
su.nick_name,
|
|
sp.post_name,
|
|
(select count(*) from ps_contract_info info where info.custom_manager = ps.user_id and info.contract_status != '10' and info.is_cancel != '03') all_contract,
|
|
(select count(*) from ps_contract_info inf where inf.custom_manager = ps.user_id and inf.contract_status == '50' and inf.is_cancel != '03') finish_contract,
|
|
(select count(*) from ps_contract_info pci where pci.custom_manager = ps.user_id and pci.contract_status not in ('10','50') and pci.is_cancel != '03') unfinish_contract
|
|
from ps_salary ps
|
|
left join sys_user su on su.user_id = ps.user_id
|
|
left join sys_post sp on ps.post_id = sp.post_id
|
|
${ew.getCustomSqlSegment}
|
|
</select>
|
|
</mapper>
|