综合查下在用详细修改

This commit is contained in:
bonus 2025-12-03 16:05:45 +08:00
parent e495597f4e
commit 4631cec07c
2 changed files with 5 additions and 5 deletions

View File

@ -978,7 +978,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
`status` = '0'
AND end_time IS NULL
AND back_id IS NULL
AND `is_slt` = '0'
AND `is_slt` = '0' and source =1
<if test="typeId != null">
AND type_id = #{typeId}
</if>

View File

@ -20,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN slt_agreement_apply saa ON saa.agreement_id = bma.agreement_id AND saa.`status` = '2' AND saa.settlement_type = 1
LEFT JOIN slt_agreement_apply saas ON saas.agreement_id = bma.agreement_id AND saas.`status` = '2' AND saas.settlement_type = 2
<where>
bp.external_id is not null and bu.unit_id not in (117,4055)
bp.external_id is not null and bu.unit_id not in (68,351,412,117,4055)
<if test="agreementCode != null and agreementCode != ''">
AND bma.agreement_code LIKE CONCAT('%',#{agreementCode},'%')
</if>
@ -81,7 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
slt_agreement_details sad
left join slt_agreement_apply saa on sad.apply_id = saa.id
LEFT JOIN bm_agreement_info bma ON bma.agreement_id = saa.agreement_id
WHERE LEFT(saa.audit_time,7) = #{month} AND sad.slt_type = 2
WHERE LEFT(saa.create_time,7) = #{month} AND sad.slt_type = 2
GROUP BY bma.agreement_id
UNION
@ -93,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
slt_agreement_details sad
left join slt_agreement_apply saa on sad.apply_id = saa.id
LEFT JOIN bm_agreement_info bma ON bma.agreement_id = saa.agreement_id
WHERE LEFT(saa.audit_time,7) = #{month} AND sad.slt_type = 3 and sad.is_charge = 1
WHERE LEFT(saa.create_time,7) = #{month} AND sad.slt_type = 3 and sad.is_charge = 1
GROUP BY bma.agreement_id
UNION
@ -105,7 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
slt_agreement_details sad
left join slt_agreement_apply saa on sad.apply_id = saa.id
LEFT JOIN bm_agreement_info bma ON bma.agreement_id = saa.agreement_id
WHERE LEFT(saa.audit_time,7) = #{month} AND sad.slt_type = 4 and sad.is_charge = 1
WHERE LEFT(saa.create_time,7) = #{month} AND sad.slt_type = 4 and sad.is_charge = 1
GROUP BY bma.agreement_id
) a ON
pmc.AGREEMENT_ID = a.agreementId