From cf3d08d16202f0b4deaa62e2281b2ea8bad9643e Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" <123456> Date: Wed, 20 Sep 2023 22:17:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=AC=A7=E6=B4=BE=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=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 --- .../factory/mt/service/impl/MtFactoryDataServiceImpl.java | 5 ++--- .../factory/oupai/service/impl/OuPaiFactoryServiceImpl.java | 4 ++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/impl/MtFactoryDataServiceImpl.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/impl/MtFactoryDataServiceImpl.java index 748016f19..5f1e2ba67 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/impl/MtFactoryDataServiceImpl.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/impl/MtFactoryDataServiceImpl.java @@ -49,8 +49,7 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService { private final IMtFactoryOrderService mtFactoryOrderService; private final IMtPackageInfoService mtPackageInfoService; - private final IAdvanceDetailClient advanceDetailClient; - private final IWarehouseClient warehouseClient; + private final BladeRedis bladeRedis; @@ -124,7 +123,7 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService { } } //判断是否有新的包件 - if (packageInfos.size() == 0) { + if (packageInfos.isEmpty()) { //如果没有新增包件就直接下一条数据 log.info("##################dealWithData: 没有新增包件,所以当前数据不保存 invoiceOrderCode={}", invoiceOrderCode); continue; 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 8e0490e1a..da4713187 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 @@ -101,6 +101,10 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService { QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.eq("oid",orderPackageCode); FactoryPackageEntity packageEntity = factoryPackageService.getOne(queryWrapper); + if(Objects.isNull(packageEntity)) { + log.error("############oid 查询数据失败: {}",orderPackageCode); + return orderPackageCode; + } packageEntity.setPackageStatus(5); factoryPackageService.updateById(packageEntity);