From f37242221fd47d0c679a33a6d07aeaa0220d24b6 Mon Sep 17 00:00:00 2001 From: yefei Date: Tue, 13 Jun 2023 16:36:45 +0800 Subject: [PATCH] =?UTF-8?q?ariesy=20=E5=BA=95=E8=B4=A6=E5=BA=93=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=95=B0=E6=8D=AE=E6=97=B6=E8=AE=BE=E7=BD=AE=E7=A8=8E?= =?UTF-8?q?=E7=8E=87=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dxhy/core/job/pojo/InvoiceCollectionInfo.java | 5 +++++ .../core/job/service/impl/CheckTaskServiceImpl.java | 13 ++++++++++--- .../java/com/dxhy/erp/entity/TdxRecordInvoice.java | 2 ++ .../impl/SignSaveInvoiceInfoServiceImpl.java | 6 ++++++ 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/dxhy-core/src/main/java/com/dxhy/core/job/pojo/InvoiceCollectionInfo.java b/dxhy-core/src/main/java/com/dxhy/core/job/pojo/InvoiceCollectionInfo.java index eb74bfdb..f634c107 100644 --- a/dxhy-core/src/main/java/com/dxhy/core/job/pojo/InvoiceCollectionInfo.java +++ b/dxhy-core/src/main/java/com/dxhy/core/job/pojo/InvoiceCollectionInfo.java @@ -583,4 +583,9 @@ public class InvoiceCollectionInfo { */ private String userName; + /** + * 税率 + */ + private String taxRate; + } diff --git a/dxhy-core/src/main/java/com/dxhy/core/job/service/impl/CheckTaskServiceImpl.java b/dxhy-core/src/main/java/com/dxhy/core/job/service/impl/CheckTaskServiceImpl.java index 2361d530..be0dd3b2 100644 --- a/dxhy-core/src/main/java/com/dxhy/core/job/service/impl/CheckTaskServiceImpl.java +++ b/dxhy-core/src/main/java/com/dxhy/core/job/service/impl/CheckTaskServiceImpl.java @@ -89,6 +89,8 @@ public class CheckTaskServiceImpl implements CheckTaskService { return checkTaskDao.getNoDetailInvoiceOld(); } + private String taxRate; + /** * 查验 * @@ -140,7 +142,7 @@ public class CheckTaskServiceImpl implements CheckTaskService { // 构建主表实体 InvoiceCollectionInfo invoiceCollectionInfo = - buildInvoiceCollectionInfo(responseInvoice, checkNoDetailInvoice.getBuyerTaxNo()); + buildInvoiceCollectionInfo(responseInvoice, checkNoDetailInvoice.getBuyerTaxNo(),taxRate); int countdetail = getDetailCount(invoiceCollectionInfo, db); // 更新主表 @@ -186,7 +188,7 @@ public class CheckTaskServiceImpl implements CheckTaskService { // 构建主表实体 InvoiceCollectionInfo invoiceCollectionInfo = - buildInvoiceCollectionInfo(responseInvoice, checkNoDetailInvoice.getBuyerTaxNo()); + buildInvoiceCollectionInfo(responseInvoice, checkNoDetailInvoice.getBuyerTaxNo(),""); DynamicContextHolder.push(db + DbConstant.BUSINESS_READ); int countdetail = tDxRecordInvoiceDetailDao .getDetailJd(invoiceCollectionInfo.getInvoiceCode() + invoiceCollectionInfo.getInvoiceNo()); @@ -385,6 +387,7 @@ public class CheckTaskServiceImpl implements CheckTaskService { * @return */ private List buildDetailList(ResponseInvoice responseInvoice) { + taxRate = ""; // 构建返回值 final List invoiceDetailInfoList = new ArrayList<>(); @@ -417,6 +420,8 @@ public class CheckTaskServiceImpl implements CheckTaskService { invoiceDetailInfo.setTxrqz(invoiceDetail.getTxrqz()); // 税率 invoiceDetailInfo.setTaxRate(invoiceDetail.getTaxRate()); + + taxRate = taxRate + invoiceDetail.getTaxRate(); //山能项目 增加税码字段 if(invoiceDetail.getTaxRate() != null){ invoiceDetailInfo.setTaxCode(getZSM(invoiceDetail.getTaxRate())); @@ -645,7 +650,7 @@ public class CheckTaskServiceImpl implements CheckTaskService { * 抵账主体数据 * @return 主体数据 */ - private InvoiceCollectionInfo buildInvoiceCollectionInfo(ResponseInvoice responseInvoice, String buyerTaxNo) { + private InvoiceCollectionInfo buildInvoiceCollectionInfo(ResponseInvoice responseInvoice, String buyerTaxNo,String taxRate) { // 定义返回值 final InvoiceCollectionInfo invoiceCollectionInfo = new InvoiceCollectionInfo(); // 购方税号 @@ -712,6 +717,8 @@ public class CheckTaskServiceImpl implements CheckTaskService { invoiceCollectionInfo.setMachinecode(responseInvoice.getMachineNo()); invoiceCollectionInfo.setQsType(responseInvoice.getQsType()); + + invoiceCollectionInfo.setTaxRate(taxRate); // 返回 return invoiceCollectionInfo; } diff --git a/dxhy-erp/src/main/java/com/dxhy/erp/entity/TdxRecordInvoice.java b/dxhy-erp/src/main/java/com/dxhy/erp/entity/TdxRecordInvoice.java index e75101f4..dfac5d26 100644 --- a/dxhy-erp/src/main/java/com/dxhy/erp/entity/TdxRecordInvoice.java +++ b/dxhy-erp/src/main/java/com/dxhy/erp/entity/TdxRecordInvoice.java @@ -496,4 +496,6 @@ public class TdxRecordInvoice implements Serializable { private String compCode; private String invoiceSource; + + private String taxRate; } diff --git a/dxhy-erp/src/main/java/com/dxhy/erp/service/impl/SignSaveInvoiceInfoServiceImpl.java b/dxhy-erp/src/main/java/com/dxhy/erp/service/impl/SignSaveInvoiceInfoServiceImpl.java index 95e3d590..4f5a5cbe 100644 --- a/dxhy-erp/src/main/java/com/dxhy/erp/service/impl/SignSaveInvoiceInfoServiceImpl.java +++ b/dxhy-erp/src/main/java/com/dxhy/erp/service/impl/SignSaveInvoiceInfoServiceImpl.java @@ -53,6 +53,8 @@ public class SignSaveInvoiceInfoServiceImpl extends MpBaseServiceImpl recordInvoiceDetail = getRecordInvoiceDetail(queryInvoiceResult); + + recordInvoice.setTaxRate(taxRate); // 税率统计表 List invoiceStatistics = getInvoiceStatistics(queryInvoiceResult); @@ -282,6 +286,7 @@ public class SignSaveInvoiceInfoServiceImpl extends MpBaseServiceImpl getRecordInvoiceDetail(JSONObject queryInvoiceResult) { + taxRate = ""; if (queryInvoiceResult.containsKey("invoiceLineList")) { JSONArray dataArray = queryInvoiceResult.getJSONArray("invoiceLineList"); if (dataArray != null && dataArray.size() > 0) { @@ -310,6 +315,7 @@ public class SignSaveInvoiceInfoServiceImpl extends MpBaseServiceImpl