Merge pull request 'demand: 红冲发票相关需求' (#314) from develop into master
Reviewed-on: http://git.xdadan.loc/tanex/emis-service/pulls/314
This commit is contained in:
commit
5746c4630b
@ -60,6 +60,7 @@
|
|||||||
<result property="invoiceNo" column="inv_invoice_no"/>
|
<result property="invoiceNo" column="inv_invoice_no"/>
|
||||||
<result property="invoiceStatus" column="inv_invoice_status"/>
|
<result property="invoiceStatus" column="inv_invoice_status"/>
|
||||||
<result property="paymentStatus" column="inv_payment_status"/>
|
<result property="paymentStatus" column="inv_payment_status"/>
|
||||||
|
<result property="salerCompanyName" column="inv_saler_company_name"/>
|
||||||
</association>
|
</association>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
@ -75,7 +76,8 @@
|
|||||||
i.settle_bill_no as inv_settle_bill_no, i.settle_bill_name as inv_settle_bill_name,
|
i.settle_bill_no as inv_settle_bill_no, i.settle_bill_name as inv_settle_bill_name,
|
||||||
i.apply_money as inv_apply_money, i.add_tax_rate as inv_add_tax_rate, i.add_open_money as inv_add_open_money,
|
i.apply_money as inv_apply_money, i.add_tax_rate as inv_add_tax_rate, i.add_open_money as inv_add_open_money,
|
||||||
i.reced_money as inv_reced_money, i.company_name as inv_company_name, i.company_tax_no as inv_company_tax_no,
|
i.reced_money as inv_reced_money, i.company_name as inv_company_name, i.company_tax_no as inv_company_tax_no,
|
||||||
i.invoice_no as inv_invoice_no, i.invoice_status as inv_invoice_status, i.payment_status as inv_payment_status,
|
ch.invoice_no as inv_invoice_no, i.invoice_status as inv_invoice_status, i.payment_status as inv_payment_status,
|
||||||
|
ch.saler_company_name as inv_saler_company_name,
|
||||||
GROUP_CONCAT(DISTINCT b.bill_month ORDER BY b.bill_month SEPARATOR ',') as bill_month,
|
GROUP_CONCAT(DISTINCT b.bill_month ORDER BY b.bill_month SEPARATOR ',') as bill_month,
|
||||||
GROUP_CONCAT(DISTINCT b.cust_no ORDER BY b.cust_no SEPARATOR ',') as cust_no,
|
GROUP_CONCAT(DISTINCT b.cust_no ORDER BY b.cust_no SEPARATOR ',') as cust_no,
|
||||||
GROUP_CONCAT(DISTINCT b.cust_name ORDER BY b.cust_name SEPARATOR ',') as customer_name,
|
GROUP_CONCAT(DISTINCT b.cust_name ORDER BY b.cust_name SEPARATOR ',') as customer_name,
|
||||||
@ -83,6 +85,17 @@
|
|||||||
GROUP_CONCAT(DISTINCT b.salesmen ORDER BY b.salesmen SEPARATOR ',') as salesmens
|
GROUP_CONCAT(DISTINCT b.salesmen ORDER BY b.salesmen SEPARATOR ',') as salesmens
|
||||||
from emis_invoice_cancellation c
|
from emis_invoice_cancellation c
|
||||||
left join emis_settle_invoice_record i on c.invoice_id = i.id and i.del_flag = '0'
|
left join emis_settle_invoice_record i on c.invoice_id = i.id and i.del_flag = '0'
|
||||||
|
left join (
|
||||||
|
select ch1.*
|
||||||
|
from emis_settle_invoice_ch_record ch1
|
||||||
|
inner join (
|
||||||
|
select apply_seq_no, max(id) as max_id
|
||||||
|
from emis_settle_invoice_ch_record
|
||||||
|
where del_flag = '0'
|
||||||
|
group by apply_seq_no
|
||||||
|
) ch2 on ch1.apply_seq_no = ch2.apply_seq_no and ch1.id = ch2.max_id
|
||||||
|
where ch1.del_flag = '0'
|
||||||
|
) ch on i.apply_seq_no = ch.apply_seq_no
|
||||||
left join emis_settle_invoice_bill_rel rel on i.apply_seq_no = rel.apply_seq_no and rel.del_flag = '0'
|
left join emis_settle_invoice_bill_rel rel on i.apply_seq_no = rel.apply_seq_no and rel.del_flag = '0'
|
||||||
left join emis_settle_bill b on rel.settle_bill_no = b.settle_bill_no and b.del_flag = '0'
|
left join emis_settle_bill b on rel.settle_bill_no = b.settle_bill_no and b.del_flag = '0'
|
||||||
left join emis_settle_invoice_rel r on i.apply_seq_no = r.apply_seq_no and r.del_flag = '0'
|
left join emis_settle_invoice_rel r on i.apply_seq_no = r.apply_seq_no and r.del_flag = '0'
|
||||||
@ -191,7 +204,8 @@
|
|||||||
c.update_time, c.create_site, c.update_site,
|
c.update_time, c.create_site, c.update_site,
|
||||||
i.id, i.apply_seq_no, i.apply_date, i.customer_code, i.customer_name,
|
i.id, i.apply_seq_no, i.apply_date, i.customer_code, i.customer_name,
|
||||||
i.settle_bill_no, i.settle_bill_name, i.apply_money, i.add_tax_rate, i.add_open_money,
|
i.settle_bill_no, i.settle_bill_name, i.apply_money, i.add_tax_rate, i.add_open_money,
|
||||||
i.reced_money, i.company_name, i.company_tax_no, i.invoice_no, i.invoice_status, i.payment_status
|
i.reced_money, i.company_name, i.company_tax_no, ch.invoice_no, i.invoice_status, i.payment_status,
|
||||||
|
ch.saler_company_name
|
||||||
order by c.apply_date desc, c.id desc
|
order by c.apply_date desc, c.id desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@ -207,7 +221,8 @@
|
|||||||
c.update_time, c.create_site, c.update_site,
|
c.update_time, c.create_site, c.update_site,
|
||||||
i.id, i.apply_seq_no, i.apply_date, i.customer_code, i.customer_name,
|
i.id, i.apply_seq_no, i.apply_date, i.customer_code, i.customer_name,
|
||||||
i.settle_bill_no, i.settle_bill_name, i.apply_money, i.add_tax_rate, i.add_open_money,
|
i.settle_bill_no, i.settle_bill_name, i.apply_money, i.add_tax_rate, i.add_open_money,
|
||||||
i.reced_money, i.company_name, i.company_tax_no, i.invoice_no, i.invoice_status, i.payment_status
|
i.reced_money, i.company_name, i.company_tax_no, ch.invoice_no, i.invoice_status, i.payment_status,
|
||||||
|
ch.saler_company_name
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertEmisInvoiceCancellation" parameterType="EmisInvoiceCancellation" useGeneratedKeys="true"
|
<insert id="insertEmisInvoiceCancellation" parameterType="EmisInvoiceCancellation" useGeneratedKeys="true"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user