|
|
|
@ -104,7 +104,7 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter { |
|
|
|
|
return post; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public String pushInvoiceToRecordInvoice(SNInvoice snInvoice, String taxNo, String company,String compCode) throws Exception { |
|
|
|
|
public String pushInvoiceToRecordInvoice(SNInvoice snInvoice, String taxNo, String company,String imageId,String compCode) throws Exception { |
|
|
|
|
|
|
|
|
|
BaseTDxRecordInvoice recordInvoice = new BaseTDxRecordInvoice(); |
|
|
|
|
DynamicContextHolder.push(DbConstant.BASICS_READ); |
|
|
|
@ -176,6 +176,8 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter { |
|
|
|
|
recordInvoice.setInvoiceStatus("0"); |
|
|
|
|
recordInvoice.setInvoiceType(invoiceType); |
|
|
|
|
recordInvoice.setCompany(company); |
|
|
|
|
recordInvoice.setImageId(imageId); |
|
|
|
|
recordInvoice.setCompCode(compCode); |
|
|
|
|
|
|
|
|
|
if (baseTDxRecordInvoice != null) { |
|
|
|
|
baseTDxRecordInvoiceDao.update(recordInvoice, recordWrapper); |
|
|
|
@ -348,9 +350,16 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter { |
|
|
|
|
jsonObject.put("totalTax", invoiceData.get("fpse")); |
|
|
|
|
jsonObject.put("totalAmount", invoiceData.get("fpje")); |
|
|
|
|
} |
|
|
|
|
jsonObject.put("amountTax", invoiceData.get("jshj")); |
|
|
|
|
if("15".equals(invoiceData.get("fpzl"))){ |
|
|
|
|
jsonObject.put("amountTax", invoiceData.get("cjhj")); |
|
|
|
|
}else{ |
|
|
|
|
jsonObject.put("amountTax", invoiceData.get("jshj")); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
jsonObject.put("amountTaxCN", ""); |
|
|
|
|
jsonObject.put("buyerIDNum", invoiceData.get("mfdwdmsfzh")); |
|
|
|
|
|
|
|
|
|
jsonObject.put("checkCode", invoiceData.get("jym")); |
|
|
|
|
if ("N".equals(invoiceData.get("zfbz"))) { |
|
|
|
|
jsonObject.put("state", "0"); |
|
|
|
@ -631,7 +640,7 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter { |
|
|
|
|
log.info("可查验发票,更新底账库完成"); |
|
|
|
|
} else { |
|
|
|
|
//不可查验发票,未入库,插入票池
|
|
|
|
|
this.pushInvoiceToRecordInvoice(invoice, taxNo, company,compCode); |
|
|
|
|
this.pushInvoiceToRecordInvoice(invoice, taxNo, company,imageId,compCode); |
|
|
|
|
log.info("不可查验发票,插入底账库成功"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -667,6 +676,7 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter { |
|
|
|
|
reimburse.setXfTaxNo(invoice.getSalesTaxNo()); |
|
|
|
|
reimburse.setXfAddressAndPhone(invoice.getSalesAddressPhone()); |
|
|
|
|
reimburse.setXfBankAndNo(invoice.getSalesBank()); |
|
|
|
|
reimburse.setSelectId(UUID.randomUUID().toString().replace("-", "")); |
|
|
|
|
|
|
|
|
|
reimburse.setTaxRate(invoice.getTaxRate()); |
|
|
|
|
reimburse.setTaxCode(getTaxCode(invoice.getTaxRate())); |
|
|
|
@ -688,7 +698,7 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter { |
|
|
|
|
reimburse.setFare(invoice.getNoTaxAmount()); |
|
|
|
|
reimburse.setFuelSurcharge(invoice.getFuelSurcharge()); |
|
|
|
|
reimburse.setCompany(company); |
|
|
|
|
reimburse.setPostingTime(format); |
|
|
|
|
// reimburse.setPostingTime(format);
|
|
|
|
|
reimburse.setAccountPeriod(""); |
|
|
|
|
|
|
|
|
|
return reimburse; |
|
|
|
|