diff --git a/emis-biz/src/main/resources/mapper/EmisSettlePayRelMapper.xml b/emis-biz/src/main/resources/mapper/EmisSettlePayRelMapper.xml index 0332500af..5c581f0ee 100644 --- a/emis-biz/src/main/resources/mapper/EmisSettlePayRelMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisSettlePayRelMapper.xml @@ -32,10 +32,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" a.update_time, a.create_site, a.update_site, - r.apply_seq_no + (select r.apply_seq_no + from emis_settle_pay_invoice_rel r + where r.pay_id = a.pay_id and r.del_flag = '0' + limit 1) as apply_seq_no from emis_settle_pay_rel a - left join emis_settle_pay_invoice_rel r - on r.pay_id = a.pay_id and r.del_flag = '0'