From 9ba9f3d5e487c211123fa2ace5c6dcdc85ea7691 Mon Sep 17 00:00:00 2001 From: yefei Date: Wed, 16 Aug 2023 15:23:32 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=9C=BA=E5=8A=A8=E8=BD=A6&=E4=BA=8C?= =?UTF-8?q?=E6=89=8B=E8=BD=A6=E5=8F=91=E7=A5=A8=E5=A2=9E=E5=8A=A0=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E4=BF=A1=E6=81=AF=202.=E4=BB=8E=E9=94=80=E9=A1=B9?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E7=A8=8E=E5=8F=B7=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/bootstrap-test.yaml | 4 +- .../controller/SDNYMainProcessController.java | 384 ++++++++++++++---- .../dxhy/erp/dao/VihicleInvoiceDetailDao.java | 19 + .../erp/service/SNPushCheckRecordService.java | 41 +- .../src/main/resources/bootstrap-dev.yaml | 14 +- .../src/main/resources/bootstrap-test.yaml | 4 +- .../main/resources/mapper/InvoiceDetails.xml | 33 ++ pom.xml | 10 +- 8 files changed, 386 insertions(+), 123 deletions(-) create mode 100644 dxhy-erp/src/main/java/com/dxhy/erp/dao/VihicleInvoiceDetailDao.java create mode 100644 dxhy-erp/src/main/resources/mapper/InvoiceDetails.xml diff --git a/dxhy-admin/src/main/resources/bootstrap-test.yaml b/dxhy-admin/src/main/resources/bootstrap-test.yaml index 4d7a266b..9a14a1c3 100644 --- a/dxhy-admin/src/main/resources/bootstrap-test.yaml +++ b/dxhy-admin/src/main/resources/bootstrap-test.yaml @@ -4,7 +4,7 @@ spring: nacos: config: # Nacos config 地址 - server-addr: 172.31.36.143:33000 + server-addr: 172.31.36.146:33000 # Nacos config 命名空间,对应配置中的名称(dxhy-jxpt-namespace) namespace: b271ba8e-84d9-4393-88b8-9271aff9465c # Nacos config 分组 @@ -19,7 +19,7 @@ spring: file-extension: yaml # Nacos discovery 配置 discovery: - server-addr: 172.31.36.143:33000 + server-addr: 172.31.36.146:33000 # Nacos config 登录用户名 username: admin # Nacos config 登录密码 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 59e41515..b72e07e7 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 @@ -110,6 +110,7 @@ public class SDNYMainProcessController extends AbstractController { @Resource private RequestRecordService requestRecordService; + /** * 查验发票 */ @@ -122,7 +123,7 @@ public class SDNYMainProcessController extends AbstractController { String dbName = "business"; JSONObject checkInvoiceResult = null; RequestRecord singleInvoiceCheckRecord = requestRecordService.getBaseRequestRecord(JSONObject.toJSONString(pramsMap), - "/singleInvoiceCheck",pramsMap.get("invoiceCode"),pramsMap.get("invoiceNumber"), "singleInvoiceCheck"); + "/singleInvoiceCheck", pramsMap.get("invoiceCode"), pramsMap.get("invoiceNumber"), "singleInvoiceCheck"); //挡板开关 if ("1".equals(isPresure)) { @@ -139,7 +140,7 @@ public class SDNYMainProcessController extends AbstractController { DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); requestRecordService.saveSuccessfulRequestRecord(singleInvoiceCheckRecord, JSONObject.toJSONString(data)); } catch (Exception e) { - log.error("发票查验接口记录保存失败,errormsg:{}",e); + log.error("发票查验接口记录保存失败,errormsg:{}", e); } @@ -156,9 +157,9 @@ public class SDNYMainProcessController extends AbstractController { try { DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); - requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord,0,JSONObject.toJSONString(R.error("发票号码不能为空!")), "发票号码不能为空!"); + requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord, 0, JSONObject.toJSONString(R.error("发票号码不能为空!")), "发票号码不能为空!"); } catch (Exception e) { - log.error("发票查验接口记录保存失败,errormsg:{}",e); + log.error("发票查验接口记录保存失败,errormsg:{}", e); } return ResponseEntity.ok(JSONObject.toJSONString(R.error("发票号码不能为空!"))); @@ -175,10 +176,10 @@ public class SDNYMainProcessController extends AbstractController { try { DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); - requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord,0, + requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord, 0, JSONObject.toJSONString(R.error("开票日期不能为空!")), "开票日期不能为空!"); } catch (Exception e) { - log.error("发票查验接口记录保存失败,errormsg:{}",e); + log.error("发票查验接口记录保存失败,errormsg:{}", e); } return ResponseEntity.ok(JSONObject.toJSONString(R.error("开票日期不能为空!"))); @@ -188,10 +189,10 @@ public class SDNYMainProcessController extends AbstractController { try { DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); - requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord,0, + requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord, 0, JSONObject.toJSONString(R.error("发票类型不能为空!")), "发票类型不能为空!"); } catch (BaseException e) { - log.error("发票查验接口记录保存失败,errormsg:{}",e); + log.error("发票查验接口记录保存失败,errormsg:{}", e); } return ResponseEntity.ok(JSONObject.toJSONString(R.error("发票类型不能为空!"))); @@ -207,10 +208,10 @@ public class SDNYMainProcessController extends AbstractController { try { DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); - requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord,0, + requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord, 0, JSONObject.toJSONString(R.error("金额不能为空!")), "金额不能为空!"); } catch (Exception e) { - log.error("发票查验接口记录保存失败,errormsg:{}",e); + log.error("发票查验接口记录保存失败,errormsg:{}", e); } return ResponseEntity.ok(JSONObject.toJSONString(R.error("金额不能为空!"))); @@ -220,10 +221,10 @@ public class SDNYMainProcessController extends AbstractController { try { DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); - requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord,0, + requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord, 0, JSONObject.toJSONString(R.error("校验码不能为空!")), "校验码不能为空!"); } catch (Exception e) { - log.error("发票查验接口记录保存失败,errormsg:{}",e); + log.error("发票查验接口记录保存失败,errormsg:{}", e); } return ResponseEntity.ok(JSONObject.toJSONString(R.error("校验码不能为空!"))); @@ -243,10 +244,10 @@ public class SDNYMainProcessController extends AbstractController { try { DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); - requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord,0, + requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord, 0, JSONObject.toJSONString(R.error(notes)), notes); } catch (Exception e) { - log.error("发票查验接口记录保存失败,errormsg:{}",e); + log.error("发票查验接口记录保存失败,errormsg:{}", e); } return ResponseEntity.ok(JSONObject.toJSONString(R.error(notes))); @@ -264,12 +265,19 @@ public class SDNYMainProcessController extends AbstractController { String invoiceNo = checkInvoiceByUuid.getInvoiceNo(); QueryWrapper detailWrapper = new QueryWrapper<>(); detailWrapper.eq("uuid", uuid); - DynamicContextHolder.push("business" + DbConstant.DETAIL_READ); - List baseTDxRecordInvoiceDetail = baseTDxRecordInvoiceDetailDao.selectList(detailWrapper); + + List baseTDxRecordInvoiceDetail = null; + List vehicleList = null; + if ("10104".equals(pramsMap.get("invoiceType")) || "10105".equals(pramsMap.get("invoiceType"))) { + vehicleList = snPushCheckRecordService.vihicleList(uuid); + } else { + DynamicContextHolder.push("business" + DbConstant.DETAIL_READ); + baseTDxRecordInvoiceDetail = baseTDxRecordInvoiceDetailDao.selectList(detailWrapper); + } DynamicContextHolder.push("business" + DbConstant.BUSINESS_READ); - if(baseTDxRecordInvoiceDetail == null || baseTDxRecordInvoiceDetail.size() == 0){ - checkInvoiceResult = snPushCheckRecordService.singleCheckInvoice(pramsMap,null); + if ((baseTDxRecordInvoiceDetail == null || baseTDxRecordInvoiceDetail.size() == 0) && (vehicleList == null || vehicleList.size() == 0)) { + checkInvoiceResult = snPushCheckRecordService.singleCheckInvoice(pramsMap, null); List activeCallRequest = new ArrayList<>(); activeCallRequest.add(JSONObject.toJSONString(pramsMap)); @@ -282,23 +290,27 @@ public class SDNYMainProcessController extends AbstractController { if (!checkInvoiceResult.containsKey("cyjg")) { //先删除原有主数据,再查验更新主数据和明细数据 int delete = baseTDxRecordInvoiceDao.delete(recordWrapper); - if(delete > 0) { + if (delete > 0) { checkInvoiceResult.put("invoiceNo", checkInvoiceResult.getString("invoiceNumber")); signSaveInvoiceInfoService.saveQueryInvoiceResult(checkInvoiceResult, userid, "1", dbName); + if ("10104".equals(pramsMap.get("invoiceType")) || "10105".equals(pramsMap.get("invoiceType"))) { + vehicleList = snPushCheckRecordService.vihicleList(uuid); + } else { + DynamicContextHolder.push("business" + DbConstant.DETAIL_READ); + baseTDxRecordInvoiceDetail = baseTDxRecordInvoiceDetailDao.selectList(detailWrapper); + DynamicContextHolder.push("business" + DbConstant.BUSINESS_READ); + } - DynamicContextHolder.push("business" + DbConstant.DETAIL_READ); - baseTDxRecordInvoiceDetail = baseTDxRecordInvoiceDetailDao.selectList(detailWrapper); - DynamicContextHolder.push("business" + DbConstant.BUSINESS_READ); } - }else if (checkInvoiceResult.containsKey("cyjg") && !"0001".equals(checkInvoiceResult.getString("cyjg"))) { + } else if (checkInvoiceResult.containsKey("cyjg") && !"0001".equals(checkInvoiceResult.getString("cyjg"))) { data = errorInfo(checkInvoiceResult, data); try { DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); - requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord, 0,JSONObject.toJSONString(data), + requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord, 0, JSONObject.toJSONString(data), (String) checkInvoiceResult.get("cyjgxx")); } catch (Exception e) { - log.error("发票查验接口记录保存失败,errormsg:{}",e); + log.error("发票查验接口记录保存失败,errormsg:{}", e); } return ResponseEntity.ok(JSONObject.toJSONString(data)); @@ -308,8 +320,12 @@ public class SDNYMainProcessController extends AbstractController { } JSONObject checkInvoice = (JSONObject) JSONObject.toJSON(checkInvoiceByUuid); JSONArray checkInvoiceDetail = (JSONArray) JSONObject.toJSON(baseTDxRecordInvoiceDetail); + JSONObject vehicleDetail = new JSONObject(); + if(vehicleList != null && vehicleList.size() > 0) { + vehicleDetail = (JSONObject) JSONObject.toJSON(vehicleList.get(0)); + } - convertToResult(checkInvoice, checkInvoiceDetail); + convertToResult(checkInvoice, checkInvoiceDetail, vehicleDetail); data.put("data", checkInvoice); //查验结果保存 @@ -319,14 +335,14 @@ public class SDNYMainProcessController extends AbstractController { DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); if (checkInvoiceResult != null) { if (checkInvoiceResult.containsKey("code")) { - requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord, 0,JSONObject.toJSONString(data), + requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord, 0, JSONObject.toJSONString(data), (String) checkInvoiceResult.get("message")); } } else { - requestRecordService.saveSuccessfulRequestRecord(singleInvoiceCheckRecord,JSONObject.toJSONString(data)); + requestRecordService.saveSuccessfulRequestRecord(singleInvoiceCheckRecord, JSONObject.toJSONString(data)); } } catch (Exception e) { - log.error("发票查验接口记录保存失败,errormsg:{}",e); + log.error("发票查验接口记录保存失败,errormsg:{}", e); } return ResponseEntity.ok(JSONObject.toJSONString(data)); @@ -357,7 +373,7 @@ public class SDNYMainProcessController extends AbstractController { DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); requestRecordService.saveSuccessfulRequestRecord(singleInvoiceCheckRecord, JSONObject.toJSONString(data)); } catch (Exception e) { - log.error("发票查验接口记录保存失败,errormsg:{}",e); + log.error("发票查验接口记录保存失败,errormsg:{}", e); } return ResponseEntity.ok(JSONObject.toJSONString(data)); @@ -366,29 +382,29 @@ public class SDNYMainProcessController extends AbstractController { } try { - checkInvoiceResult = snPushCheckRecordService.singleCheckInvoice(pramsMap,"1"); + checkInvoiceResult = snPushCheckRecordService.singleCheckInvoice(pramsMap, "1"); - List activeCallRequest = new ArrayList<>(); - activeCallRequest.add(JSONObject.toJSONString(pramsMap)); - activeCallRequest.add(JSONObject.toJSONString("1")); - singleInvoiceCheckRecord.setActiveCallRequestDetail(JSONObject.toJSONString(activeCallRequest)); - singleInvoiceCheckRecord.setActiveCall("singleCheckInvoice"); - singleInvoiceCheckRecord.setActiveCallResponse(JSONObject.toJSONString(checkInvoiceResult)); + List activeCallRequest = new ArrayList<>(); + activeCallRequest.add(JSONObject.toJSONString(pramsMap)); + activeCallRequest.add(JSONObject.toJSONString("1")); + singleInvoiceCheckRecord.setActiveCallRequestDetail(JSONObject.toJSONString(activeCallRequest)); + singleInvoiceCheckRecord.setActiveCall("singleCheckInvoice"); + singleInvoiceCheckRecord.setActiveCallResponse(JSONObject.toJSONString(checkInvoiceResult)); - log.info("查验结果为:{}", checkInvoiceResult); + log.info("查验结果为:{}", checkInvoiceResult); } catch (Exception e) { e.printStackTrace(); - log.error("查验失败,errormsg:{}",e.getMessage()); + log.error("查验失败,errormsg:{}", e.getMessage()); try { DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); - requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord,1,JSONObject.toJSONString(R.error("查验失败,"+e.getMessage())), - "查验失败,异常信息:{}"+JSONObject.toJSONString(e.getMessage())); + requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord, 1, JSONObject.toJSONString(R.error("查验失败," + e.getMessage())), + "查验失败,异常信息:{}" + JSONObject.toJSONString(e.getMessage())); } catch (Exception exception) { - log.error("发票查验接口记录保存失败,errormsg:{}",e); + log.error("发票查验接口记录保存失败,errormsg:{}", e); } - return ResponseEntity.ok(JSONObject.toJSONString(R.error("查验失败,"+e.getMessage()))); + return ResponseEntity.ok(JSONObject.toJSONString(R.error("查验失败," + e.getMessage()))); } if (!checkInvoiceResult.containsKey("code")) { @@ -399,10 +415,10 @@ public class SDNYMainProcessController extends AbstractController { try { DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); - requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord, 0,JSONObject.toJSONString(data), + requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord, 0, JSONObject.toJSONString(data), (String) checkInvoiceResult.get("cyjgxx")); } catch (Exception e) { - log.error("发票查验接口记录保存失败,errormsg:{}",e); + log.error("发票查验接口记录保存失败,errormsg:{}", e); } return ResponseEntity.ok(JSONObject.toJSONString(data)); @@ -420,9 +436,9 @@ public class SDNYMainProcessController extends AbstractController { try { DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); - requestRecordService.saveSuccessfulRequestRecord(singleInvoiceCheckRecord,JSONObject.toJSONString(data)); + requestRecordService.saveSuccessfulRequestRecord(singleInvoiceCheckRecord, JSONObject.toJSONString(data)); } catch (Exception e) { - log.error("发票查验接口记录保存失败,errormsg:{}",e); + log.error("发票查验接口记录保存失败,errormsg:{}", e); } } @@ -432,7 +448,7 @@ public class SDNYMainProcessController extends AbstractController { Map map = JSONObject.parseObject(JSONObject.toJSONString(object), Map.class); String taxRate = (String) map.get("taxRate"); if ("0".equals(taxRate) || "*".equals(taxRate) || "**".equals(taxRate) || "***".equals(taxRate) || "不征税".equals(taxRate) || "免税".equals(taxRate)) { - map.put("taxRate","0.00"); + map.put("taxRate", "0.00"); } } data.put("data", checkInvoiceResult); @@ -442,7 +458,7 @@ public class SDNYMainProcessController extends AbstractController { } else { //其他类发票,直接入库 R data = new R(1000, "default success"); - if(!checkInvoiceResult.isEmpty()) { + if (!checkInvoiceResult.isEmpty()) { log.info("其他类发票,不做查验,直接入库"); DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); data.put("message", "success"); @@ -452,15 +468,15 @@ public class SDNYMainProcessController extends AbstractController { log.info("返回给影像系统的结果为:{}", checkInvoiceResult); data.put("data", checkInvoiceResult); - }else{ + } else { data.put("message", "error 其他类发票不支持查验"); } try { DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); - requestRecordService.saveSuccessfulRequestRecord(singleInvoiceCheckRecord,JSONObject.toJSONString(data)); + requestRecordService.saveSuccessfulRequestRecord(singleInvoiceCheckRecord, JSONObject.toJSONString(data)); } catch (Exception e) { - log.error("发票查验接口记录保存失败,errormsg:{}",e); + log.error("发票查验接口记录保存失败,errormsg:{}", e); } return ResponseEntity.ok(JSONObject.toJSONString(data)); @@ -469,10 +485,10 @@ public class SDNYMainProcessController extends AbstractController { try { DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); - requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord,0,JSONObject.toJSONString(R.error().put("data", checkInvoiceResult)), + requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord, 0, JSONObject.toJSONString(R.error().put("data", checkInvoiceResult)), "未知异常,请联系管理员"); } catch (Exception e) { - log.error("发票查验接口记录保存失败,errormsg:{}",e); + log.error("发票查验接口记录保存失败,errormsg:{}", e); } return ResponseEntity.ok(JSONObject.toJSONString(R.error().put("data", checkInvoiceResult))); @@ -623,7 +639,7 @@ public class SDNYMainProcessController extends AbstractController { for (int i = 0; i < detailList.size(); i++) { String taxRateDetail = ""; JSONObject detail = (JSONObject) detailList.get(i); - if(StringUtils.isNotEmpty(detail.getString("goodsName")) && (detail.getString("goodsName").equals("(详见销货清单)") || detail.getString("goodsName").equals("(详见销货清单)"))){ + if (StringUtils.isNotEmpty(detail.getString("goodsName")) && (detail.getString("goodsName").equals("(详见销货清单)") || detail.getString("goodsName").equals("(详见销货清单)"))) { continue; } Map snDetailMap = new HashMap(); @@ -670,19 +686,19 @@ public class SDNYMainProcessController extends AbstractController { if (!"0".equals(taxRateDetail)) { if (StringUtils.isNoneBlank(taxRateDetail)) { if (taxRateDetail.contains("%")) { - taxRateDetail = taxRateDetail.replace("%",""); + taxRateDetail = taxRateDetail.replace("%", ""); } BigDecimal tax = new BigDecimal(taxRateDetail); BigDecimal tax1 = tax.divide(new BigDecimal("100")); if (tax.compareTo(new BigDecimal("0.99")) < 1) { taxRateDetail = tax.toPlainString(); - }else { + } else { taxRateDetail = tax1.toPlainString(); } } } - }catch (Exception e){ - log.error("报错的原因为:{}",e); + } catch (Exception e) { + log.error("报错的原因为:{}", e); taxRateDetail = "0.00"; } @@ -706,6 +722,194 @@ public class SDNYMainProcessController extends AbstractController { checkInvoice.put("invoiceLineList", returnDetailList); } + private void convertToResult(JSONObject checkInvoice, JSONArray detailArray, JSONObject vehicleList) throws ParseException { + + checkInvoice.put("totalTax", checkInvoice.getString("taxAmount")); + checkInvoice.put("amountTax", checkInvoice.getString("totalAmount")); + checkInvoice.put("totalAmount", checkInvoice.getString("invoiceAmount")); + // 增加备注字段 + checkInvoice.put("remarks", checkInvoice.getString("remark")); + //添加非空判断 + String invoiceCode = null; + if (checkInvoice.get("invoiceCode") != null) { + invoiceCode = checkInvoice.get("invoiceCode").toString(); + } + String invoiceType = checkInvoice.get("invoiceType").toString(); + if ("22".equals(invoiceType)) { + invoiceType = "33"; + } + if ("21".equals(invoiceType)) { + invoiceType = "31"; + } + + checkInvoice.put("invoiceType", invoiceType); + checkInvoice.put("administrativeDivisionNo", ""); + checkInvoice.put("administrativeDivisionName", ""); + + if ("31".equals(invoiceType) || "32".equals(invoiceType) || "185".equals(invoiceType) || "186".equals(invoiceType)) { + checkInvoice.put("invoiceCode", ""); + checkInvoice.put("invoiceNumber", invoiceCode == null ? checkInvoice.get("invoiceNo").toString() : invoiceCode + checkInvoice.get("invoiceNo").toString()); + } else { + checkInvoice.put("invoiceCode", invoiceCode); + checkInvoice.put("invoiceNumber", checkInvoice.get("invoiceNo").toString()); + } + String uuid = ""; + if (invoiceCode != null && StringUtils.isNoneBlank(invoiceCode)) { + uuid = invoiceCode + checkInvoice.get("invoiceNo").toString(); + checkInvoice.put("uuid", uuid); + } else { + uuid = checkInvoice.get("invoiceNo").toString(); + checkInvoice.put("uuid", uuid); + } + + + String kprq = checkInvoice.get("invoiceDate").toString(); + SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.US); + Date date = sdf.parse(kprq); + String formatStr = new SimpleDateFormat("yyyy-MM-dd").format(date); + log.info("开票日期为:{} ", formatStr); + + checkInvoice.put("billingDate", formatStr); + checkInvoice.put("purchaserName", checkInvoice.get("gfName")); + checkInvoice.put("purchaserTaxNo", checkInvoice.get("gfTaxNo")); + checkInvoice.put("purchaserBank", checkInvoice.get("gfBankAndNo")); + checkInvoice.put("purchaserAddressPhone", checkInvoice.get("gfAddressAndPhone")); + checkInvoice.put("salesName", checkInvoice.get("xfName")); + checkInvoice.put("salesTaxNo", checkInvoice.get("xfTaxNo")); + checkInvoice.put("salesAddressPhone", checkInvoice.get("gfAddressAndPhone")); + checkInvoice.put("salesBank", checkInvoice.get("gfBankAndNo")); + checkInvoice.put("checkCode", checkInvoice.get("checkCode")); + checkInvoice.put("state", "0"); + checkInvoice.put("tollSign", "07"); + //机动车 + if ("03".equals(invoiceType)) { + checkInvoice.put("vehicleType", vehicleList.getString("vehicleType")); + checkInvoice.put("brandModel", vehicleList.getString("factoryModel")); + checkInvoice.put("originPlace", vehicleList.getString("productPlace")); + checkInvoice.put("certificateNo", vehicleList.getString("certificate")); + checkInvoice.put("inspectionListNo", vehicleList.getString("inspectionNum")); + checkInvoice.put("engineNo", vehicleList.getString("engineNo")); + checkInvoice.put("vehicleNo", vehicleList.getString("vehicleNo")); + checkInvoice.put("paymentVoucherNo", vehicleList.getString("taxRecords")); + checkInvoice.put("passengersLimited", vehicleList.getString("limitPeople")); + checkInvoice.put("taxAuthorityNo", vehicleList.getString("taxBureauCode")); + checkInvoice.put("taxAuthorityName", vehicleList.getString("taxBureauName")); + } + //二手车 + if ("15".equals(invoiceType)) { + checkInvoice.put("vehicleType", vehicleList.getString("vehicleType")); + checkInvoice.put("vehicleNo", vehicleList.getString("vehicleNo")); + checkInvoice.put("brandModel", vehicleList.getString("factoryModel")); + checkInvoice.put("licensePlate", vehicleList.getString("plateNo")); + checkInvoice.put("buyerUnitOrIndividual", vehicleList.getString("buyerUnit")); + checkInvoice.put("buyerUnitCodeOrIdNo", vehicleList.getString("buyerUnitCode")); + checkInvoice.put("buyerUnitOrIndividualAddress", vehicleList.getString("buyerUnitAddress")); + checkInvoice.put("sellerUnitOrIndividual", vehicleList.getString("sellerUnit")); + checkInvoice.put("sellerUnitCodeOrIdNo", vehicleList.getString("sellerUnitCode")); + checkInvoice.put("sellerUnitOrIndividualAddress", vehicleList.getString("sellerUnitAddress")); + checkInvoice.put("sellerPhone", vehicleList.getString("sellerPhone")); + checkInvoice.put("lemonMarket", vehicleList.getString("carMarket")); + checkInvoice.put("lemonMarketAddress", vehicleList.getString("carMarketAddress")); + checkInvoice.put("lemonMarketPhone", vehicleList.getString("carMarketPhone")); + checkInvoice.put("lemonMarketBankAndAccount", vehicleList.getString("carMarketBank")); + checkInvoice.put("vehicleAdminOffice", vehicleList.getString("vehicleAdminOffice")); + checkInvoice.put("registrationNo", vehicleList.getString("registrationNo")); + checkInvoice.put("lemonMarketTaxNo", vehicleList.getString("carMarketTaxNo")); + } + + String taxRate = ""; + List> returnDetailList = new ArrayList<>(); + + JSONArray detailList = detailArray; + if (detailList != null) { + for (int i = 0; i < detailList.size(); i++) { + String taxRateDetail = ""; + JSONObject detail = (JSONObject) detailList.get(i); + if (StringUtils.isNotEmpty(detail.getString("goodsName")) && (detail.getString("goodsName").equals("(详见销货清单)") || detail.getString("goodsName").equals("(详见销货清单)"))) { + continue; + } + Map snDetailMap = new HashMap(); + snDetailMap.put("rowNo", i + 1 + ""); + snDetailMap.put("commodityCode", detail.getString("goodsNum")); + snDetailMap.put("commodityName", detail.getString("goodsName")); + snDetailMap.put("specificationModel", detail.getString("model")); + snDetailMap.put("unit", detail.getString("unit")); + String quantity = detail.getString("num"); + snDetailMap.put("quantity", quantity); + + String unitPrice = detail.getString("unitPrice"); + snDetailMap.put("unitPrice", unitPrice); + + if ("11".equals(invoiceType)) { + snDetailMap.put("tax", "0"); + + //如果是卷票计算合计金额 + String hjje = null; + if (detail.getString("detailAmount") != null && detail.getString("taxAmount") != null) { + BigDecimal je = new BigDecimal(detail.getString("detailAmount")); + if (detail.getString("taxAmount") != null) { + hjje = je.add(new BigDecimal(detail.getString("taxAmount"))).toPlainString(); + } else { + hjje = je.toPlainString(); + } + } + + if (StringUtils.isNotBlank(hjje)) + snDetailMap.put("amount", hjje); + + } else { + snDetailMap.put("tax", "***".equals(detail.getString("taxAmount")) ? "0.00" : detail.getString("taxAmount")); + snDetailMap.put("amount", detail.getString("detailAmount")); + } + + if ("免税".equals(detail.getString("taxRate")) || "不征税".equals(detail.getString("taxRate")) || "***".equals(detail.getString("taxRate"))) { + taxRateDetail = "0"; + snDetailMap.put("taxRate", taxRateDetail); + } else { + if (detail.get("taxRate") != null && StringUtils.isNoneBlank(detail.get("taxRate").toString())) { + try { + taxRateDetail = detail.get("taxRate").toString(); + if (!"0".equals(taxRateDetail)) { + if (StringUtils.isNoneBlank(taxRateDetail)) { + if (taxRateDetail.contains("%")) { + taxRateDetail = taxRateDetail.replace("%", ""); + } + BigDecimal tax = new BigDecimal(taxRateDetail); + BigDecimal tax1 = tax.divide(new BigDecimal("100")); + if (tax.compareTo(new BigDecimal("0.99")) < 1) { + taxRateDetail = tax.toPlainString(); + } else { + taxRateDetail = tax1.toPlainString(); + } + } + } + } catch (Exception e) { + log.error("报错的原因为:{}", e); + taxRateDetail = "0.00"; + } + + if ("11".equals(invoiceType)) { + taxRateDetail = "0.000"; + } + log.info("明细-发票税率为:{}", taxRateDetail); + snDetailMap.put("taxRate", taxRateDetail); + } + } + + log.info("明细-tax={}", detail.get("taxAmount")); + snDetailMap.put("currentDateEnd", detail.getString("txrqz")); + snDetailMap.put("currentDateStart", detail.getString("txrqq")); + snDetailMap.put("licensePlateNum", detail.getString("cph")); + snDetailMap.put("type", detail.getString("lx")); + + returnDetailList.add(snDetailMap); + } + } + + + checkInvoice.put("invoiceLineList", returnDetailList); + } + /** * 查验发票 */ @@ -718,15 +922,15 @@ public class SDNYMainProcessController extends AbstractController { List invoiceCodes = new ArrayList<>(); List invoiceNos = new ArrayList<>(); - RequestRecord record=null; - if (snRequestObject.getInvoiceInfoList()!=null && snRequestObject.getInvoiceInfoList().size()>0) { - snRequestObject.getInvoiceInfoList().stream().forEach(invoiceInfo->{ + RequestRecord record = null; + if (snRequestObject.getInvoiceInfoList() != null && snRequestObject.getInvoiceInfoList().size() > 0) { + snRequestObject.getInvoiceInfoList().stream().forEach(invoiceInfo -> { invoiceCodes.add(invoiceInfo.getInvoiceCode()); invoiceNos.add(invoiceInfo.getInvoiceNumber()); }); log.info("影像系统同步数据的发票号码为:{}", JSONObject.toJSONString(invoiceNos)); log.info("影像系统同步数据的发票代码为:{}", JSONObject.toJSONString(invoiceCodes)); - if (invoiceCodes.size()>0) { + if (invoiceCodes.size() > 0) { record = requestRecordService.getBaseRequestRecord(JSONObject.toJSONString(snRequestObject), "/syncInvoiceInfo", JSONObject.toJSONString(invoiceCodes), @@ -810,9 +1014,9 @@ public class SDNYMainProcessController extends AbstractController { try { DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); - requestRecordService.saveFailedRequestRecord(record,0, JSONObject.toJSONString(R.error(result)), result); + requestRecordService.saveFailedRequestRecord(record, 0, JSONObject.toJSONString(R.error(result)), result); } catch (Exception e) { - log.error("发票同步接口记录保存失败,errormsg:{}",e); + log.error("发票同步接口记录保存失败,errormsg:{}", e); } return ResponseEntity.ok(JSONObject.toJSONString(R.error(result))); @@ -844,7 +1048,7 @@ public class SDNYMainProcessController extends AbstractController { DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); requestRecordService.saveSuccessfulRequestRecord(record, JSONObject.toJSONString(data)); } catch (Exception e) { - log.error("发票同步接口记录保存失败,errormsg:{}",e); + log.error("发票同步接口记录保存失败,errormsg:{}", e); } return ResponseEntity.ok(JSONObject.toJSONString(data)); @@ -855,10 +1059,10 @@ public class SDNYMainProcessController extends AbstractController { // requestRecordService.saveRecord(pushCheckResultToSAPRecord,1, 1, JSONObject.toJSONString(R.error(CommonConstants.MSG_ERR_PUSH_SDNY)), 1); try { DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); - requestRecordService.saveFailedRequestRecord(record,1, JSONObject.toJSONString(R.error(CommonConstants.MSG_ERR_PUSH_SDNY)), - "推送sap失败,失败原因:"+"{"+JSONObject.toJSONString(e)+"}"); + requestRecordService.saveFailedRequestRecord(record, 1, JSONObject.toJSONString(R.error(CommonConstants.MSG_ERR_PUSH_SDNY)), + "推送sap失败,失败原因:" + "{" + JSONObject.toJSONString(e) + "}"); } catch (Exception exception) { - log.error("发票同步接口记录保存失败,errormsg:{}",e); + log.error("发票同步接口记录保存失败,errormsg:{}", e); } return ResponseEntity.ok(JSONObject.toJSONString(R.error(CommonConstants.MSG_ERR_PUSH_SDNY))); @@ -885,7 +1089,7 @@ public class SDNYMainProcessController extends AbstractController { DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); requestRecordService.saveSuccessfulRequestRecord(record, JSONObject.toJSONString(data)); } catch (Exception e) { - log.error("发票同步接口记录保存失败,errormsg:{}",e); + log.error("发票同步接口记录保存失败,errormsg:{}", e); } return ResponseEntity.ok(JSONObject.toJSONString(data)); @@ -910,7 +1114,7 @@ public class SDNYMainProcessController extends AbstractController { DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); requestRecordService.saveSuccessfulRequestRecord(record, JSONObject.toJSONString(data)); } catch (Exception e) { - log.error("发票同步接口记录保存失败,errormsg:{}",e); + log.error("发票同步接口记录保存失败,errormsg:{}", e); } return ResponseEntity.ok(JSONObject.toJSONString(data)); @@ -923,36 +1127,36 @@ public class SDNYMainProcessController extends AbstractController { try { DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); - requestRecordService.saveFailedRequestRecord(record,1, JSONObject.toJSONString(R.error(CommonConstants.CONNECT_TIMEOUT)), - "同步SAP失败,报错信息为:"+"{"+JSONObject.toJSONString(exception)+"}"); + requestRecordService.saveFailedRequestRecord(record, 1, JSONObject.toJSONString(R.error(CommonConstants.CONNECT_TIMEOUT)), + "同步SAP失败,报错信息为:" + "{" + JSONObject.toJSONString(exception) + "}"); } catch (Exception e) { - log.error("发票同步接口记录保存失败,errormsg:{}",e); + log.error("发票同步接口记录保存失败,errormsg:{}", e); } return ResponseEntity.ok(JSONObject.toJSONString(R.error(CommonConstants.CONNECT_TIMEOUT))); - } catch(NullPointerException exception){ + } catch (NullPointerException exception) { log.error("同步SAP失败,报错信息为:{}", exception); exception.printStackTrace(); try { DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); - requestRecordService.saveFailedRequestRecord(record,1, JSONObject.toJSONString(R.error(CommonConstants.NULL_POINTER_TIMEOUT)), - "同步SAP失败,报错信息为:"+"{"+JSONObject.toJSONString(exception)+"}"); + requestRecordService.saveFailedRequestRecord(record, 1, JSONObject.toJSONString(R.error(CommonConstants.NULL_POINTER_TIMEOUT)), + "同步SAP失败,报错信息为:" + "{" + JSONObject.toJSONString(exception) + "}"); } catch (Exception e) { - log.error("发票同步接口记录保存失败,errormsg:{}",e); + log.error("发票同步接口记录保存失败,errormsg:{}", e); } return ResponseEntity.ok(JSONObject.toJSONString(R.error(CommonConstants.NULL_POINTER_TIMEOUT))); - } catch(Exception exception){ + } catch (Exception exception) { log.error("同步SAP失败,报错信息为:{}", exception); exception.printStackTrace(); try { DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); - requestRecordService.saveFailedRequestRecord(record,1, JSONObject.toJSONString(R.error(CommonConstants.MSG_ERR_DEFAULT)), - "同步SAP失败,报错信息为:"+"{"+JSONObject.toJSONString(exception)+"}"); + requestRecordService.saveFailedRequestRecord(record, 1, JSONObject.toJSONString(R.error(CommonConstants.MSG_ERR_DEFAULT)), + "同步SAP失败,报错信息为:" + "{" + JSONObject.toJSONString(exception) + "}"); } catch (Exception e) { - log.error("发票同步接口记录保存失败,errormsg:{}",e); + log.error("发票同步接口记录保存失败,errormsg:{}", e); } return ResponseEntity.ok(JSONObject.toJSONString(R.error(CommonConstants.MSG_ERR_DEFAULT))); @@ -1089,13 +1293,13 @@ public class SDNYMainProcessController extends AbstractController { if (snInvoiceDetail.getAmount() != null) sapInvoiceDetail.setZJK(snInvoiceDetail.getAmount()); - sapInvoiceDetail.setZHH(snInvoiceDetail.getRowNo()); + sapInvoiceDetail.setZHH(snInvoiceDetail.getRowNo()); //将类似于0.03数据格式转化为3.00 if (snInvoiceDetail.getTaxRate() != null && snInvoiceDetail.getTaxRate() != "") { String taxRate = snInvoiceDetail.getTaxRate(); sapInvoiceDetail.setZTAX(taxRate); - if (taxRate.contains("%")){ - taxRate = taxRate.replace("%",""); + if (taxRate.contains("%")) { + taxRate = taxRate.replace("%", ""); } if ("0".equals(taxRate) || "*".equals(taxRate) || "**".equals(taxRate) || "***".equals(taxRate) || "不征税".equals(taxRate) || "免税".equals(taxRate)) { sapInvoiceDetail.setZTAX("0.00"); @@ -1108,7 +1312,7 @@ public class SDNYMainProcessController extends AbstractController { sapInvoiceDetail.setZTAX(tax1.toString()); if (tax1.compareTo(new BigDecimal("99")) > 0) { sapInvoiceDetail.setZTAX(taxRate); - }else { + } else { DecimalFormat decimalFormat = new DecimalFormat("#.00"); String formattedDecimal = decimalFormat.format(tax1); sapInvoiceDetail.setZTAX(formattedDecimal); @@ -1183,7 +1387,7 @@ public class SDNYMainProcessController extends AbstractController { BigDecimal tax = new BigDecimal(taxRate); info.setZSM(getZSM(tax.toPlainString())); BigDecimal tax1 = tax.multiply(new BigDecimal("100")); - info.setZTAX(tax1.setScale(2,RoundingMode.FLOOR).toPlainString()); + info.setZTAX(tax1.setScale(2, RoundingMode.FLOOR).toPlainString()); } if (taxRate != null && "0".equals(taxRate)) { @@ -1278,12 +1482,12 @@ public class SDNYMainProcessController extends AbstractController { || "08".equals(snInvoice.getInvoiceType()) || "10".equals(snInvoice.getInvoiceType()) || "11".equals(snInvoice.getInvoiceType()) || "14".equals(snInvoice.getInvoiceType()) || "15".equals(snInvoice.getInvoiceType()) || "31".equals(snInvoice.getInvoiceType()) || "32".equals(snInvoice.getInvoiceType())) { //可查验发票, - log.info("发票类型为:{}",snInvoice.getInvoiceType()); + log.info("发票类型为:{}", snInvoice.getInvoiceType()); //0608 区块链发票 并且 checkStatus = 3 的时候 提交sap状态为3(刘振和谈楚才提出需求) - if("10".equals(snInvoice.getInvoiceType()) && "3".equals(snInvoice.getCheckStatus())){ + if ("10".equals(snInvoice.getInvoiceType()) && "3".equals(snInvoice.getCheckStatus())) { log.info("区块链发票 传输状态checkStatus = 3"); info.setZCYZT("3"); - }else { + } else { info.setZCYZT("1"); } } else { diff --git a/dxhy-erp/src/main/java/com/dxhy/erp/dao/VihicleInvoiceDetailDao.java b/dxhy-erp/src/main/java/com/dxhy/erp/dao/VihicleInvoiceDetailDao.java new file mode 100644 index 00000000..b0e00643 --- /dev/null +++ b/dxhy-erp/src/main/java/com/dxhy/erp/dao/VihicleInvoiceDetailDao.java @@ -0,0 +1,19 @@ +package com.dxhy.erp.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.dxhy.erp.entity.TDxVehicleSaleInvoice; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * @author dxhy + */ +@Mapper +public interface VihicleInvoiceDetailDao extends BaseMapper { + + List selectVehicleSaleInvoice(String uuid); + + List selectVehicleInvoiceInfo(String uuid); + +} 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 e1da36d4..1246545e 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 @@ -79,9 +79,6 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter { @Resource private ApiUtils apiUtils; - @Autowired - private AreaDao areaDao; - @Resource private BaseTDxTaxCurrentDao baseTDxTaxCurrentDao; @@ -106,6 +103,9 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter { @Resource private TdxPlatformCheckLogService platformCheckLogService; + @Resource + private VihicleInvoiceDetailDao vihicleInvoiceDetailDao; + public String pushCheckResultToSAP(String requestParam) { log.info("获取请求参数:{} , 请求地址:{}", requestParam, snYxUrl); String post = HttpUtils.sendPo(snYxUrl, requestParam, userName, password); @@ -114,7 +114,7 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter { return post; } - public String pushInvoiceToRecordInvoice(SNInvoice snInvoice, String taxNo, String company, String imageId, String compCode) { + public String pushInvoiceToRecordInvoice(SNInvoice snInvoice, String taxNo, String company, String imageId, String compCode) { TDxInvoiceReimburse recordInvoice = new TDxInvoiceReimburse(); // DynamicContextHolder.push(DbConstant.BASICS_READ); @@ -272,6 +272,7 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter { /** * 发票查验API + * * @param pramsMap * @param isInteger * @return @@ -473,10 +474,10 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter { if (StringUtils.isNoneBlank(invoiceData.get("sl").toString())) { taxRate = invoiceData.get("sl").toString(); if (taxRate.contains("%")) { - taxRate = taxRate.replace("%",""); + taxRate = taxRate.replace("%", ""); } //按照小数处理 - if(StringUtils.isNotBlank(isInteger)){ + if (StringUtils.isNotBlank(isInteger)) { BigDecimal bigDecimal = new BigDecimal(taxRate); taxRate = bigDecimal.divide(new BigDecimal("100")).toPlainString(); } @@ -576,13 +577,13 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter { // taxRate = taxRate.substring(0, taxRate.length() - 1); // } //按照小数处理 - if(StringUtils.isNotBlank(isInteger)){ + if (StringUtils.isNotBlank(isInteger)) { if ("*".equals(taxRate) || "**".equals(taxRate) || "***".equals(taxRate) || "不征税".equals(taxRate) || "免税".equals(taxRate)) { } else { - BigDecimal bigDecimal = new BigDecimal(taxRate); - taxRate = bigDecimal.divide(new BigDecimal("100")).toPlainString(); - } + BigDecimal bigDecimal = new BigDecimal(taxRate); + taxRate = bigDecimal.divide(new BigDecimal("100")).toPlainString(); } + } if ("11".equals(invoiceType)) { taxRate = "0"; } @@ -642,7 +643,7 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter { } } - if(!flag) { + if (!flag) { invoiceResult = this.valoremTaxCount(invoiceInfo, "Y"); InvoiceInfo data = invoiceResult.getData(); if (data != null) { @@ -722,20 +723,20 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter { String billingDate = invoice.getBillingDate().replaceAll("-", ""); pramsMap.put("billingDate", billingDate); } - if("31".equals(invoice.getInvoiceType()) || "32".equals(invoice.getInvoiceType())){ + if ("31".equals(invoice.getInvoiceType()) || "32".equals(invoice.getInvoiceType())) { pramsMap.put("totalAmount", invoice.getAmountTax()); - }else{ + } else { pramsMap.put("totalAmount", invoice.getTotalAmount()); } pramsMap.put("purchaserTaxNo", invoice.getPurchaserTaxNo()); - if("31".equals(invoice.getInvoiceType()) || "32".equals(invoice.getInvoiceType())){ + if ("31".equals(invoice.getInvoiceType()) || "32".equals(invoice.getInvoiceType())) { pramsMap.put("invoiceType", "21"); - }else { + } else { pramsMap.put("invoiceType", invoice.getInvoiceType()); } - checkInvoiceResult = snPushCheckRecordService.singleCheckInvoice(pramsMap,null); + checkInvoiceResult = snPushCheckRecordService.singleCheckInvoice(pramsMap, null); log.info("补充查验结果为:{}", checkInvoiceResult); } catch (Exception e) { e.printStackTrace(); @@ -886,6 +887,7 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter { } + private InvoiceInfo convertToInvoiceInfo(SNInvoice snInvoice) { InvoiceInfo invoice = new InvoiceInfo(); invoice.setInvoiceTypeCode(snInvoice.getInvoiceType()); @@ -1164,4 +1166,11 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter { return true; } + public List vihicleList(String uuid){ + + List tDxVehicleSaleInvoices = vihicleInvoiceDetailDao.selectVehicleInvoiceInfo(uuid); + return tDxVehicleSaleInvoices; + + } + } diff --git a/dxhy-erp/src/main/resources/bootstrap-dev.yaml b/dxhy-erp/src/main/resources/bootstrap-dev.yaml index d2241fff..96d3ec07 100644 --- a/dxhy-erp/src/main/resources/bootstrap-dev.yaml +++ b/dxhy-erp/src/main/resources/bootstrap-dev.yaml @@ -4,13 +4,13 @@ spring: nacos: config: # Nacos config 地址 - server-addr: 172.31.36.147:33000 + server-addr: 172.31.36.146:33000 # Nacos config 命名空间,对应配置中的名称(dxhy-jxpt-namespace) - namespace: eb6eab27-62a4-4ccf-8640-b8e91df0a1a6 + namespace: b271ba8e-84d9-4393-88b8-9271aff9465c # Nacos config 分组 group: dxhy-erp-group # Nacos config 登录用户名 - username: nacos + username: admin # Nacos config 登录密码 password: Invoice.nacos.!1 # Nacos config 配置文件前缀 @@ -19,9 +19,7 @@ spring: file-extension: yaml # Nacos discovery 配置 discovery: - server-addr: 172.31.36.147:33000 - # Nacos config 登录用户名 - username: nacos - # Nacos config 登录密码 + server-addr: 172.31.36.146:33000 + username: admin password: Invoice.nacos.!1 - namespace: eb6eab27-62a4-4ccf-8640-b8e91df0a1a6 \ No newline at end of file + namespace: b271ba8e-84d9-4393-88b8-9271aff9465c \ No newline at end of file diff --git a/dxhy-erp/src/main/resources/bootstrap-test.yaml b/dxhy-erp/src/main/resources/bootstrap-test.yaml index 4977cff7..96d3ec07 100644 --- a/dxhy-erp/src/main/resources/bootstrap-test.yaml +++ b/dxhy-erp/src/main/resources/bootstrap-test.yaml @@ -4,7 +4,7 @@ spring: nacos: config: # Nacos config 地址 - server-addr: 172.31.36.143:33000 + server-addr: 172.31.36.146:33000 # Nacos config 命名空间,对应配置中的名称(dxhy-jxpt-namespace) namespace: b271ba8e-84d9-4393-88b8-9271aff9465c # Nacos config 分组 @@ -19,7 +19,7 @@ spring: file-extension: yaml # Nacos discovery 配置 discovery: - server-addr: 172.31.36.143:33000 + server-addr: 172.31.36.146:33000 username: admin password: Invoice.nacos.!1 namespace: b271ba8e-84d9-4393-88b8-9271aff9465c \ No newline at end of file diff --git a/dxhy-erp/src/main/resources/mapper/InvoiceDetails.xml b/dxhy-erp/src/main/resources/mapper/InvoiceDetails.xml new file mode 100644 index 00000000..5ac90864 --- /dev/null +++ b/dxhy-erp/src/main/resources/mapper/InvoiceDetails.xml @@ -0,0 +1,33 @@ + + + + + + + + + diff --git a/pom.xml b/pom.xml index db1f034d..54faa16a 100644 --- a/pom.xml +++ b/pom.xml @@ -188,7 +188,10 @@ test /home/dxhy/logs/ - + + + true + @@ -221,10 +224,7 @@ std /home/dxhy/logs/ - - - true - +