From 263b98c910a10d56ecc7fd30a55e33c812da17c3 Mon Sep 17 00:00:00 2001 From: yishiqihuasheng <1191093413@qq.com> Date: Thu, 1 Jun 2023 09:57:49 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=AE=9E=E5=90=8D?= =?UTF-8?q?=E5=AE=A2=E7=A5=A8=E4=BB=A3=E7=A0=81=E8=A6=86=E7=9B=96=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E7=9A=84=E7=A9=BA=E6=8C=87=E9=92=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dxhy/erp/service/SNPushCheckRecordService.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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 d77173f5..587d8959 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 @@ -10,6 +10,7 @@ import com.dxhy.common.datasource.config.DynamicContextHolder; import com.dxhy.common.enums.FplxEnum; import com.dxhy.common.enums.SNFplxEnum; import com.dxhy.common.util.InvoiceUtil; +import com.dxhy.common.util.StringHelper; import com.dxhy.common.vo.UserInfo; import com.dxhy.erp.dao.*; import com.dxhy.erp.entity.*; @@ -718,8 +719,14 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter { log.info("uuid={}", uuid); reimburse.setSelectId(uuid); - reimburse.setTaxRate(invoice.getTaxRate()); - reimburse.setTaxCode(getTaxCode(invoice.getTaxRate())); + if (StringHelper.isNotBlank(invoice.getTaxRate())){ + reimburse.setTaxRate(invoice.getTaxRate()); + reimburse.setTaxCode(getTaxCode(invoice.getTaxRate())); + }else { + reimburse.setTaxRate("0%"); + reimburse.setTaxCode(getTaxCode(reimburse.getTaxRate())); + } + reimburse.setIsDeduction(invoice.getIsDeductible()); if (StringUtils.isNoneBlank(reimburse.getInvoiceCode())) { From 335baf1593a74140b29fabeb1036df214e24ce1e Mon Sep 17 00:00:00 2001 From: WangQi <1021674882@qq.com> Date: Thu, 1 Jun 2023 15:40:38 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=9F=A5=E9=AA=8C=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E7=A8=8E=E7=8E=87=E4=B8=BA=E4=B8=8D=E5=BE=81=E7=A8=8E=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/dxhy/erp/service/SNPushCheckRecordService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 587d8959..46d5a178 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 @@ -451,7 +451,8 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter { jsonObject.put("tonnage", invoiceData.get("dw")); jsonObject.put("limitPeople", invoiceData.get("xcrs")); String taxRate = ""; - if ("免税".equals(invoiceData.get("sl"))) { + if (invoiceData.get("sl")==null||StringUtils.isBlank(invoiceData.get("sl").toString())|| + "免税".equals(invoiceData.get("sl").toString())|| "不征税".equals(invoiceData.get("sl").toString()) || "***".equals(invoiceData.get("sl").toString())) { taxRate = "0"; jsonObject.put("taxRate", taxRate); } else { From 5ce2eeef15084d1946a94b1dda7b221cdd1d47b2 Mon Sep 17 00:00:00 2001 From: WangQi <1021674882@qq.com> Date: Thu, 1 Jun 2023 15:51:01 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=9F=A5=E9=AA=8C=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/dxhy/erp/controller/SDNYMainProcessController.java | 2 ++ 1 file changed, 2 insertions(+) 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 d3a54b26..300af15a 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 @@ -263,6 +263,8 @@ public class SDNYMainProcessController extends AbstractController { log.info("查验结果为:{}", checkInvoiceResult); } catch (Exception e) { e.printStackTrace(); + log.error("查验失败,errormsg:{}",e.getMessage()); + return ResponseEntity.ok(JSONObject.toJSONString(R.error("查验失败,"+e.getMessage()))); } if (!checkInvoiceResult.containsKey("code")) {