|
|
@@ -609,12 +609,15 @@
|
|
|
io.company_name,
|
|
|
ipii.invoice_type,
|
|
|
ipii.invoice_party,
|
|
|
+ ipii.invoice_risk_type,
|
|
|
ipii.tax_point,
|
|
|
ipiis.actual_received_amount,
|
|
|
ipii.receivable_supervise_premium,
|
|
|
ipiis.receive_payment_date,
|
|
|
ipiis.create_by ,
|
|
|
- ipiis.create_time, ipiis.settlement_payment_difference , ipiis.settlement_payment_reason
|
|
|
+ ipiis.create_time,
|
|
|
+ ipiis.settlement_payment_difference ,
|
|
|
+ ipiis.settlement_payment_reason
|
|
|
FROM
|
|
|
ins_ply_income_invoice_settlement ipiis
|
|
|
LEFT JOIN ins_ply_income_invoice ipii ON ipii.id = ipiis.invoice_id AND ipii.is_delete = 0
|
|
|
@@ -694,10 +697,16 @@
|
|
|
GROUP_CONCAT(DISTINCT ipii.invoice_party SEPARATOR ',') AS invoice_party,
|
|
|
GROUP_CONCAT(DISTINCT ipii.tax_point SEPARATOR ',') AS tax_point,
|
|
|
GROUP_CONCAT(DISTINCT ipi.order_no SEPARATOR ',') AS orderNo,
|
|
|
+ GROUP_CONCAT(DISTINCT ipi.partner_company_id SEPARATOR ',') AS partnerCompanyId,
|
|
|
MAX(ipiis.actual_received_amount) AS actual_received_amount,
|
|
|
MAX(ipiis.receive_payment_date) AS receive_payment_date,
|
|
|
MAX(ipiis.create_by) AS create_by,
|
|
|
- MAX(ipiis.create_time) AS create_time, ipiis.settlement_payment_difference , ipiis.settlement_payment_reason, ipii.receivable_supervise_premium,ipii.contact_person , ipii.contact_person_phone
|
|
|
+ MAX(ipiis.create_time) AS create_time,
|
|
|
+ ipiis.settlement_payment_difference,
|
|
|
+ ipiis.settlement_payment_reason,
|
|
|
+ ipii.receivable_supervise_premium,
|
|
|
+ ipii.contact_person,
|
|
|
+ ipii.contact_person_phone
|
|
|
FROM ins_ply_income_invoice_settlement ipiis
|
|
|
LEFT JOIN ins_ply_income_invoice ipii ON ipii.id = ipiis.invoice_id AND ipii.is_delete = 0
|
|
|
LEFT JOIN ins_ply_income_invoice_link ipil ON ipil.invoice_id = ipiis.invoice_id AND ipil.is_delete = 0
|
|
|
@@ -713,6 +722,9 @@
|
|
|
#{settlementId}
|
|
|
</foreach>
|
|
|
</if>
|
|
|
+ <if test="settlementQueryVo.contactPerson != null and settlementQueryVo.contactPerson != ''">
|
|
|
+ AND io.contact_person = #{settlementQueryVo.contactPerson}
|
|
|
+ </if>
|
|
|
<if test="settlementQueryVo.invoiceTypes != null and settlementQueryVo.invoiceTypes != ''">
|
|
|
AND ipii.invoice_type IN
|
|
|
<foreach collection="settlementQueryVo.invoiceTypes" item="invoiceType" open="(" separator="," close=")">
|
|
|
@@ -722,6 +734,9 @@
|
|
|
<if test="settlementQueryVo.companyId != null and settlementQueryVo.companyId != ''">
|
|
|
AND io.company_id = #{settlementQueryVo.companyId}
|
|
|
</if>
|
|
|
+ <if test="settlementQueryVo.partnerCompanyId != null and settlementQueryVo.partnerCompanyId != ''">
|
|
|
+ AND ipi.partner_company_id = #{settlementQueryVo.partnerCompanyId}
|
|
|
+ </if>
|
|
|
<if test="settlementQueryVo.invoiceParty != null and settlementQueryVo.invoiceParty != ''">
|
|
|
AND ipii.invoice_party = #{settlementQueryVo.invoiceParty}
|
|
|
</if>
|