md
This commit is contained in:
parent
5d610b20f1
commit
34433d58fb
@ -68,7 +68,8 @@
|
||||
</sql>
|
||||
|
||||
<select id="selectEmisSettleInvoiceRecordList" parameterType="EmisSettleInvoiceRecord" resultMap="EmisSettleInvoiceRecordResult">
|
||||
<include refid="selectEmisSettleInvoiceRecordVo"/>
|
||||
select id, apply_seq_no, apply_date, apply_man_code, apply_site_code, customer_code, customer_name, settle_bill_no, settle_bill_name, apply_money, invoice_type, openbill_scope, company_name, company_tax_no, company_tel, company_address, invioce_remark, bank_name, bank_acc_no, contact, phone, real_tax_type, orig_open_money, add_tax_rate, add_open_money, open_money_max, open_money, invoice_no, invoice_status, invoice_status_desc, recieve_address, email, file_path, remark, bl_audit, audit_date, audit_man_code, audit_site_code, audit_note, op_man_code, op_date, op_site_code, open_ch_id, open_ch_status, open_ch_status_desc, open_com_code, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
|
||||
from emis_settle_invoice_record a
|
||||
<where>
|
||||
del_flag='0'
|
||||
<if test="id != null "> and id = #{id}</if>
|
||||
@ -118,10 +119,9 @@
|
||||
<if test="createSite != null and createSite != ''"> and create_site like concat('%', #{createSite}, '%')</if>
|
||||
<if test="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>
|
||||
|
||||
|
||||
<if test="settleBillNo != null and settleBillNo != ''">
|
||||
AND apply_seq_no IN (
|
||||
SELECT x1.apply_seq_no FROM
|
||||
AND exists (
|
||||
SELECT 1 FROM
|
||||
emis_settle_invoice_record x1,
|
||||
emis_settle_bill x2
|
||||
WHERE
|
||||
@ -129,25 +129,28 @@
|
||||
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})
|
||||
and a.apply_seq_no=x1.apply_seq_no
|
||||
)
|
||||
</if>
|
||||
|
||||
|
||||
<if test="params.billCode != null and params.billCode != ''">
|
||||
|
||||
AND apply_seq_no IN (
|
||||
AND exists 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 a.apply_seq_no=x1.apply_seq_no
|
||||
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}) )
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
</if>
|
||||
@ -168,13 +171,14 @@
|
||||
|
||||
|
||||
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
||||
AND apply_seq_no IN (
|
||||
SELECT x1.apply_seq_no FROM
|
||||
AND exists (
|
||||
SELECT 1 FROM
|
||||
emis_settle_invoice_record x1,
|
||||
emis_settle_bill x2
|
||||
WHERE
|
||||
x1.del_flag = '0'
|
||||
AND x2.del_flag = '0'
|
||||
and a.apply_seq_no=x1.apply_seq_no
|
||||
AND FIND_IN_SET( x2.settle_bill_no, x1.settle_bill_no )
|
||||
AND ( x2.salesmen = #{params.privEmpName} OR x2.payee = #{params.privEmpName} OR x2.salesmen IN ( SELECT salesmen FROM emis_salesmen_rel esr where esr.del_flag='0' and esr.bl_open='1' and now() <![CDATA[ >= ]]> esr.start_date and now() <![CDATA[ <= ]]> esr.end_date and esr.sales_ass = #{params.privEmpName} ) )
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user