This commit is contained in:
linfso 2025-05-07 13:52:59 +08:00
parent 88c33e4e8d
commit 6aefe0bb24

View File

@ -43,20 +43,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectHasPayListBySettleBillNo" parameterType="String" resultMap="EmisSettlePayRelWithSubBillResult">
select id, pay_id, bill_no, pay_money, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
from emis_settle_pay_rel a
where del_flag='0'
AND pay_id IN (
<!--
SELECT x1.pay_id FROM
emis_settle_pay_record x1,
emis_settle_bill x2
WHERE
x1.del_flag = '0'
AND x2.del_flag = '0'
AND FIND_IN_SET( x2.settle_bill_no, x1.settle_bill_no )
AND FIND_IN_SET( x2.settle_bill_no, #{settleBillNo})
-->
select a.id, a.pay_id, a.bill_no, a.pay_money, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time, a.create_site, a.update_site
from emis_settle_pay_rel a,emis_settle_pay_record b
where a.del_flag='0' and b.del_flag='0' and a.pay_id=b.pay_id
AND a.pay_id IN (
select pay_id from emis_settle_pay_bill_rel espbr where espbr.del_flag='0' and FIND_IN_SET(espbr.settle_bill_no, #{settleBillNo})
)
AND a.bill_no IN (
@ -66,27 +56,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectHasPayMapList" parameterType="String" resultType="map">
select bill_no as billNo, sum(pay_money) sumMoney
from emis_settle_pay_rel a
where del_flag='0'
AND pay_id IN (
<!--
SELECT x1.pay_id FROM
emis_settle_pay_record x1,
emis_settle_bill x2
WHERE
x1.del_flag = '0'
AND x2.del_flag = '0'
AND FIND_IN_SET( x2.settle_bill_no, x1.settle_bill_no )
AND FIND_IN_SET( x2.settle_bill_no, #{settleBillNo})
-->
select a.bill_no as billNo, sum(a.pay_money) sumMoney
from emis_settle_pay_rel a,emis_settle_pay_record b
where a.del_flag='0' and b.del_flag='0' and a.pay_id=b.pay_id
AND a.pay_id IN (
select pay_id from emis_settle_pay_bill_rel espbr where espbr.del_flag='0' and FIND_IN_SET(espbr.settle_bill_no, #{settleBillNo})
)
AND a.bill_no IN (
select essb.bill_no from emis_settle_sub_bill essb where essb.del_flag='0' and FIND_IN_SET( essb.settle_bill_no, #{settleBillNo})
)
group by bill_no
group by a.bill_no
</select>
<select id="checkUnique" parameterType="EmisSettlePayRel" resultType="int">