diff --git a/emis-biz/src/main/resources/mapper/EmisSettlePayRelMapper.xml b/emis-biz/src/main/resources/mapper/EmisSettlePayRelMapper.xml index 82e57bf10..99214051d 100644 --- a/emis-biz/src/main/resources/mapper/EmisSettlePayRelMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisSettlePayRelMapper.xml @@ -38,12 +38,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select bill_no as billNo, sum(pay_money) sumMoney from emis_settle_pay_rel a where del_flag='0' - AND apply_seq_no IN ( - SELECT x1.apply_seq_no FROM - emis_settle_invoice_record x1, + AND pay_id IN ( + SELECT x1.pay_id FROM + emis_settle_pay_record x1, emis_settle_bill x2 WHERE - x1.del_flag = '0' and x1.bl_audit!='2' + x1.del_flag = '0' and x1.pay_status='1' 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})