pusong-crm/pusong-modules/pusong-business/src/main/resources/mapper/business/PsSalaryMapper.xml

23 lines
1.1 KiB
XML
Raw Normal View History

2024-08-23 17:39:18 +08:00
<?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">
2024-08-26 11:20:24 +08:00
<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>
2024-08-23 17:39:18 +08:00
</mapper>