From 6437c97b7d8352c1672d158140eed32dd3134b64 Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" Date: Wed, 6 Dec 2023 15:59:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=9D=E8=AF=95=E8=A7=A3=E5=86=B3=E6=AC=A7?= =?UTF-8?q?=E6=B4=BE=E6=95=B0=E6=8D=AE=E6=8E=A8=E9=80=81=20=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E6=8E=A8=E9=80=81=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/OuPaiFactoryDataServiceImpl.java | 17 +++++++++++------ .../service/impl/OuPaiFactoryServiceImpl.java | 17 ++++++++--------- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryDataServiceImpl.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryDataServiceImpl.java index 393786628..243f4f973 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryDataServiceImpl.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryDataServiceImpl.java @@ -42,13 +42,18 @@ public class OuPaiFactoryDataServiceImpl implements IOuPaiFactoryDataService { // 老系统的 // 包件收货需要验证 收货单是否在系统中存在 - boolean isUpdate = ouPaiFactoryService.checkReceivingOrder(orderCode); - if (!isUpdate) { - log.info(">>>>>>>>>>>>>>>>>>>>>>>>>重新获取收货单信息 start>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"); - code = ouPaiFactoryService.saveOuPaiFactoryOrderDTOByCarCarNumber(orderCode); - log.info(">>>>>>>>>>>>>>>>>>>>>>>>>重新获取收货单信息 end>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"); + try{ + boolean isUpdate = ouPaiFactoryService.checkReceivingOrder(orderCode); + if (!isUpdate) { + log.info(">>>>>>>>>>>>>>>>>>>>>>>>>重新获取收货单信息 start>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"); + code = ouPaiFactoryService.saveOuPaiFactoryOrderDTOByCarCarNumber(orderCode); + log.info(">>>>>>>>>>>>>>>>>>>>>>>>>重新获取收货单信息 end>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"); + } + code = ouPaiFactoryService.saveOuPaiPackageStatusByCodeByOld(key, event, warehouseName); + }catch ( Exception e){ + log.error(">>>>>>>>>>>>>>>>>>> 欧派收获错误 {}",ouPaiDataPushVO); } - code = ouPaiFactoryService.saveOuPaiPackageStatusByCodeByOld(key, event, warehouseName); + } else if (event == 3) { // 收货单创建 // 获取需要处理的数据并存入数据库 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 46b833fa0..f4f6b0aae 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 @@ -162,9 +162,10 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService { // saveOuPaiFactoryOrderDTOByCarCarNumber(orderCode); // } - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("oid", key); - FactoryPackageEntity packageEntity = factoryPackageService.getOne(queryWrapper); + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(FactoryPackageEntity::getOid, key); + List list = factoryPackageService.list(queryWrapper); + String code = null; String endWarehouseName = null; String opShipNo = null; @@ -173,7 +174,7 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService { String siteName = null; String packageDetailNames = null; String firstPackName, secondPackName, thirdPackName = null; - if (Objects.isNull(packageEntity)) { + if (Objects.isNull(list)) { // 需要对 log.warn("############oid 查询数据失败: {}", key); @@ -221,6 +222,7 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService { } } else { + FactoryPackageEntity packageEntity = list.get(0); packageEntity.setPackageStatus(5); factoryPackageService.updateById(packageEntity); code = packageEntity.getCode(); @@ -648,8 +650,6 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService { LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); lambdaQueryWrapper.eq(ReceivingOrderEntity::getCode,code); - - List receivingOrderEntities = receivingOrderMapper.selectList(lambdaQueryWrapper); if(ObjectUtils.isNotNull(receivingOrderEntities)){ log.info(">>>>>>>>>>>>>>>>>>>>>>> 收货单已存在 {} ",code); @@ -836,9 +836,8 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService { //保存订单成功,继续保存包件 Long orderId = factoryOrderEntity.getId(); String packageCode = packageEntity.getString("Code"); - QueryWrapper packageEntityQueryWrapper = new QueryWrapper<>(); - packageEntityQueryWrapper.eq("code", packageCode); - + LambdaQueryWrapper packageEntityQueryWrapper = new LambdaQueryWrapper<>(); + packageEntityQueryWrapper.eq(FactoryPackageEntity::getCode, packageCode); FactoryPackageEntity factoryPackageEntity = factoryPackageService.getOne(packageEntityQueryWrapper);