|
|
|
@ -76,6 +76,7 @@ public class InvoiceServiceImpl extends ServiceImpl<InvoiceMapper, Invoice> impl
|
|
|
|
|
invoice.setCustomType(customs.getJSONObject(i).getJSONObject("custom").getString("registerType"));
|
|
|
|
|
String invoiceHeaderId = invoice.getInvoiceHeaderId();
|
|
|
|
|
InvoiceHeader invoiceHeader = invoiceHeaderMapper.selectById(invoiceHeaderId);
|
|
|
|
|
|
|
|
|
|
invoice.setInvoiceHeaderName(invoiceHeader.getCompanyName());
|
|
|
|
|
invoice.setTaxCode(invoiceHeader.getTaxCode());
|
|
|
|
|
}
|
|
|
|
@ -115,6 +116,10 @@ public class InvoiceServiceImpl extends ServiceImpl<InvoiceMapper, Invoice> impl
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void deleteInvoiceHeader(String invoiceHeaderId){
|
|
|
|
|
|
|
|
|
|
if(invoiceMapper.selectCount(new EntityWrapper<Invoice>().eq("invoice_header_id", invoiceHeaderId))>0){
|
|
|
|
|
throw new RuntimeException("抬头已被使用");
|
|
|
|
|
}
|
|
|
|
|
invoiceHeaderMapper.deleteById(invoiceHeaderId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|