diff --git a/emis-biz/src/main/resources/mapper/EmisSettleInvoiceChRecordMapper.xml b/emis-biz/src/main/resources/mapper/EmisSettleInvoiceChRecordMapper.xml
index 5145fccd4..bec0a5fbe 100644
--- a/emis-biz/src/main/resources/mapper/EmisSettleInvoiceChRecordMapper.xml
+++ b/emis-biz/src/main/resources/mapper/EmisSettleInvoiceChRecordMapper.xml
@@ -96,6 +96,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and create_site like concat('%', #{createSite}, '%')
and update_site like concat('%', #{updateSite}, '%')
+
+ and a.create_time = ]]> #{params.beginCreateTime}
+
+
+ and a.create_time #{params.endCreateTime}
+
+
+
AND apply_seq_no IN (
SELECT x1.apply_seq_no FROM
@@ -122,42 +130,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)
-
- AND apply_seq_no IN (
- SELECT x1.apply_seq_no FROM
- emis_settle_invoice_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 exists (
- select 1 from emis_settle_sub_bill b
- where x2.settle_bill_no=b.settle_bill_no
- and ( FIND_IN_SET(b.`bill_code`,#{params.billCode}) or b.bill_code like concat('%', #{params.billCode}, '%') )
- )
- )
-
-
-
- and a.create_time = ]]> #{params.beginCreateTime}
-
-
- and a.create_time #{params.endCreateTime}
-
-
- and apply_seq_no in(
- select apply_seq_no from emis_settle_invoice_record
- where del_flag='0' and settle_bill_no in(
- select bill_no from emis_settle_sub_bill b
- where del_flag='0'
+ AND apply_seq_no IN (
+ SELECT x1.apply_seq_no FROM
+ emis_settle_invoice_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 exists (
+ select 1 from emis_settle_sub_bill b
+ where x2.settle_bill_no=b.settle_bill_no
and ( b.salesmen=#{params.privEmpName} or b.payee=#{params.privEmpName}
or b.salesmen in(select salesmen from emis_salesmen_rel where sales_ass=#{params.privEmpName})
)
- )
+ )
)