From b296faec0d6a52170097cb7b4611b21cbf1eab0f Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" <123456> Date: Fri, 8 Dec 2023 10:47:00 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=95=B0=E6=8D=AE=E8=BF=9B=E5=85=A5?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E7=9A=84=E5=AF=B9=E8=AE=A2=E5=8D=95=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E5=90=88=E5=B9=B6=E7=9A=84=E7=9A=84=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../oupai/service/impl/OuPaiFactoryServiceImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java index 9319726bf..969b25afc 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java @@ -713,7 +713,7 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService { //先查询是否存在订单自编码 FactoryOrderEntity factoryOrderEntity = factoryOrderService.selectEntityBySelfCode(selfCode); - if (Objects.isNull(factoryOrderEntity)) { + factoryOrderEntity = new FactoryOrderEntity(); factoryOrderEntity.setCode(orderEntity.getString("Code")); factoryOrderEntity.setSelfCode(selfCode); @@ -815,7 +815,6 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService { log.warn("############handleData: 保存订单失败 selfCode={}", selfCode); throw new CustomerException(403, "保存订单失败"); } - } //保存订单成功,继续保存包件 Long orderId = factoryOrderEntity.getId(); String packageCode = packageEntity.getString("Code"); @@ -835,6 +834,7 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService { factoryPackageEntity.setThirdClassName(packageEntity.getString("ThirdClassName")); factoryPackageEntity.setPackageDetailNames(packageEntity.getString("PackageDetailNames")); factoryPackageEntity.setCarNumber(packageEntity.getString("CarNumber")); + factoryPackageEntity.setReserve1(factoryOrderEntity.getCode()); Boolean buyIn = packageEntity.getBoolean("BuyIn"); if (buyIn) { factoryPackageEntity.setBuyin(1); @@ -899,8 +899,8 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService { factoryPackageEntity.setReceiptStatus(0); factoryPackageEntity.setPushStatus(0); factoryPackageEntity.setTurnStatus(0); - boolean save = factoryPackageService.save(factoryPackageEntity); - if (save) { + boolean packageSave = factoryPackageService.save(factoryPackageEntity); + if (packageSave) { Long packageId = factoryPackageEntity.getId(); //保存物料信息 JSONArray packageDetails = packageEntity.getJSONArray("PackageDetails");