From a7bb958df29c1cc30cc200c92b0f9b2bb722a997 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B7=AF=E6=98=8E=E6=85=A7?= <1191093413@qq.com> Date: Fri, 19 Jan 2024 12:42:22 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=A4=84=E7=90=86=E6=9C=BA=E5=8A=A8?= =?UTF-8?q?=E8=BD=A6=E4=B8=8E=E5=BD=B1=E5=83=8F=E5=AF=B9=E5=BA=94=E4=B8=8D?= =?UTF-8?q?=E8=B5=B7=E6=9D=A5=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/SDNYMainProcessController.java | 22 +++++- .../erp/service/SNPushCheckRecordService.java | 7 +- .../impl/SignSaveInvoiceInfoServiceImpl.java | 73 ++++++++++--------- 3 files changed, 63 insertions(+), 39 deletions(-) diff --git a/dxhy-erp/src/main/java/com/dxhy/erp/controller/SDNYMainProcessController.java b/dxhy-erp/src/main/java/com/dxhy/erp/controller/SDNYMainProcessController.java index 548d1f93..bbab8c75 100644 --- a/dxhy-erp/src/main/java/com/dxhy/erp/controller/SDNYMainProcessController.java +++ b/dxhy-erp/src/main/java/com/dxhy/erp/controller/SDNYMainProcessController.java @@ -1058,7 +1058,19 @@ public class SDNYMainProcessController extends AbstractController { checkInvoice.put("salesName", checkInvoice.get("xfName")); checkInvoice.put("salesTaxNo", checkInvoice.get("xfTaxNo")); checkInvoice.put("salesAddressPhone", checkInvoice.get("xfAddressAndPhone")); - checkInvoice.put("salesBank", checkInvoice.get("gfBankAndNo")); + checkInvoice.put("salesBank", checkInvoice.get("xfBankAndNo")); + log.info(" sellerPhone={}",checkInvoice.getString("salesBank")); + String xfAddressAndPhone = checkInvoice.getString("xfAddressAndPhone"); + log.info("xfAddressAndPhone={}",xfAddressAndPhone); + if (StringUtils.isNotBlank(xfAddressAndPhone)){ + String[] split = xfAddressAndPhone.split("\t"); + if (split.length == 2) { + checkInvoice.put("sellerPhone", split[1]); + }else { + checkInvoice.put("sellerPhone", xfAddressAndPhone); + } + } + log.info("sellerPhone={}",checkInvoice.getString("sellerPhone")); checkInvoice.put("checkCode", checkInvoice.get("checkCode")); if("1".equals(checkInvoice.get("invoiceStatus"))){ checkInvoice.put("state", "3"); @@ -1071,6 +1083,14 @@ public class SDNYMainProcessController extends AbstractController { }else if("0".equals(checkInvoice.get("invoiceStatus"))){ checkInvoice.put("state", "0"); } + //机动车添加税率 + if (vehicleList != null && vehicleList.get("taxRate") != null) { + String taxRate = vehicleList.getString("taxRate"); + BigDecimal tax = new BigDecimal(taxRate); + BigDecimal rate = tax.divide(new BigDecimal(100)); + checkInvoice.put("taxRate", rate); + } + log.info("taxRate={}", checkInvoice.get("taxRate")); checkInvoice.put("tollSign", "07"); //机动车 diff --git a/dxhy-erp/src/main/java/com/dxhy/erp/service/SNPushCheckRecordService.java b/dxhy-erp/src/main/java/com/dxhy/erp/service/SNPushCheckRecordService.java index 1f7eb926..3ed04e4e 100644 --- a/dxhy-erp/src/main/java/com/dxhy/erp/service/SNPushCheckRecordService.java +++ b/dxhy-erp/src/main/java/com/dxhy/erp/service/SNPushCheckRecordService.java @@ -389,13 +389,14 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter { jsonObject.put("salesName", invoiceData.get("xhfmc")); jsonObject.put("salesTaxNo", invoiceData.get("xhfsbh")); jsonObject.put("salesAddressPhone", invoiceData.get("xhfdzdh")); -// if (StringUtils.isBlank(jsonObject.getString("salesAddressPhone")) && invoiceData.get("smfdwgrzz") != null && invoiceData.get("smfdh") != null){ -// jsonObject.put("salesAddressPhone", invoiceData.get("smfdwgrzz").toString() +"\t"+ invoiceData.get("smfdh").toString()); -// } + if (StringUtils.isBlank(jsonObject.getString("salesAddressPhone")) && invoiceData.get("smfdwgrzz") != null && invoiceData.get("smfdh") != null){ + jsonObject.put("salesAddressPhone", invoiceData.get("smfdwgrzz").toString() +"\t"+ invoiceData.get("smfdh").toString()); + } if (FplxEnum.JDC.getFplxDm().equals(invoiceType)) { if (invoiceData.get("khyh") != null && invoiceData.get("khzh") != null) { jsonObject.put("salesBank", invoiceData.get("khyh").toString() + invoiceData.get("khzh").toString()); } + jsonObject.put("sellerPhone",invoiceData.get("smfdh")); } else { jsonObject.put("salesBank", invoiceData.get("xhfyhzh")); } 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 0d4e8bc4..72eec622 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 @@ -94,6 +94,7 @@ public class SignSaveInvoiceInfoServiceImpl extends MpBaseServiceImpl 0) { @@ -183,41 +186,41 @@ public class SignSaveInvoiceInfoServiceImpl extends MpBaseServiceImpl 0) { -// boolean deleteStatistics = signInvoiceStatisticsService -// .deleteStatistics(recordInvoice.getInvoiceCode(), recordInvoice.getInvoiceNo(), dbName); -// if (deleteStatistics) { -// signInvoiceStatisticsService.saveInvoiceStatistics(invoiceStatistics, dbName); -// } -// } -// -// } -// // 二手车 -// if (vehicleInvoice != null) { -// -// boolean deleteVehicleSaleInvoice = -// signJdcService.deleteVehicleSaleInvoice(recordInvoice.getUuid(), dbName); -// if (deleteVehicleSaleInvoice) { -// signJdcService.saveVehicleSaleInvoice(vehicleInvoice, dbName); -// } -// -// // 保存税率统计表 -// if (invoiceStatistics.size() > 0) { -// signInvoiceStatisticsService.remove(new UpdateWrapper() -// .eq("invoice_code", recordInvoice.getInvoiceCode()).eq("invoice_no", recordInvoice.getInvoiceNo())); -// signInvoiceStatisticsService.saveBatch(invoiceStatistics); -// } -// -// } + //机动车票 + if (vehicleSaleInvoice != null) { + + boolean deleteVehicleSaleInvoice = + signJdcService.deleteVehicleSaleInvoice(recordInvoice.getUuid(), dbName); + if (deleteVehicleSaleInvoice) { + signJdcService.saveVehicleSaleInvoice(vehicleSaleInvoice, dbName); + } + // 保存税率统计表 + if (invoiceStatistics.size() > 0) { + boolean deleteStatistics = signInvoiceStatisticsService + .deleteStatistics(recordInvoice.getInvoiceCode(), recordInvoice.getInvoiceNo(), dbName); + if (deleteStatistics) { + signInvoiceStatisticsService.saveInvoiceStatistics(invoiceStatistics, dbName); + } + } + + } + // 二手车 + if (vehicleInvoice != null) { + + boolean deleteVehicleSaleInvoice = + signJdcService.deleteVehicleSaleInvoice(recordInvoice.getUuid(), dbName); + if (deleteVehicleSaleInvoice) { + signJdcService.saveVehicleSaleInvoice(vehicleInvoice, dbName); + } + + // 保存税率统计表 + if (invoiceStatistics.size() > 0) { + signInvoiceStatisticsService.remove(new UpdateWrapper() + .eq("invoice_code", recordInvoice.getInvoiceCode()).eq("invoice_no", recordInvoice.getInvoiceNo())); + signInvoiceStatisticsService.saveBatch(invoiceStatistics); + } + + } } } From b8352ca0e38903b0b2b5415b915974fae7ae65ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B7=AF=E6=98=8E=E6=85=A7?= <1191093413@qq.com> Date: Fri, 19 Jan 2024 14:13:32 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=80=89=E9=94=99?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dxhy/erp/service/impl/SignSaveInvoiceInfoServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 72eec622..0bd85f44 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 @@ -94,7 +94,7 @@ public class SignSaveInvoiceInfoServiceImpl extends MpBaseServiceImpl Date: Tue, 23 Jan 2024 16:43:59 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=9C=BA=E5=8A=A8=E8=BD=A6=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E5=BD=B1=E5=83=8F=EF=BC=9A=E4=BF=AE=E6=94=B9=E6=89=93?= =?UTF-8?q?=E5=8D=B0=E6=97=A5=E5=BF=97=E5=92=8C=E5=88=A4=E7=A9=BA=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/dxhy/erp/controller/SDNYMainProcessController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dxhy-erp/src/main/java/com/dxhy/erp/controller/SDNYMainProcessController.java b/dxhy-erp/src/main/java/com/dxhy/erp/controller/SDNYMainProcessController.java index bbab8c75..c8e81f0c 100644 --- a/dxhy-erp/src/main/java/com/dxhy/erp/controller/SDNYMainProcessController.java +++ b/dxhy-erp/src/main/java/com/dxhy/erp/controller/SDNYMainProcessController.java @@ -1059,7 +1059,7 @@ public class SDNYMainProcessController extends AbstractController { checkInvoice.put("salesTaxNo", checkInvoice.get("xfTaxNo")); checkInvoice.put("salesAddressPhone", checkInvoice.get("xfAddressAndPhone")); checkInvoice.put("salesBank", checkInvoice.get("xfBankAndNo")); - log.info(" sellerPhone={}",checkInvoice.getString("salesBank")); + log.info(" salesBank={}",checkInvoice.getString("salesBank")); String xfAddressAndPhone = checkInvoice.getString("xfAddressAndPhone"); log.info("xfAddressAndPhone={}",xfAddressAndPhone); if (StringUtils.isNotBlank(xfAddressAndPhone)){ @@ -1084,7 +1084,7 @@ public class SDNYMainProcessController extends AbstractController { checkInvoice.put("state", "0"); } //机动车添加税率 - if (vehicleList != null && vehicleList.get("taxRate") != null) { + if (vehicleList != null && StringUtils.isNotBlank(vehicleList.getString("taxRate"))) { String taxRate = vehicleList.getString("taxRate"); BigDecimal tax = new BigDecimal(taxRate); BigDecimal rate = tax.divide(new BigDecimal(100));