From bdfc932bfce988a9e95e852e01a8e86fdacfaa73 Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Fri, 16 Jun 2023 10:22:44 +0800 Subject: [PATCH] =?UTF-8?q?1.=E7=9A=AE=E9=98=BF=E8=AF=BA=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=8E=A5=E6=94=B6=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/AsyncDataServiceImpl.java | 13 +++++++++++- .../impl/PanFactoryDataServiceImpl.java | 20 ++++++++----------- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/impl/AsyncDataServiceImpl.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/impl/AsyncDataServiceImpl.java index fd03b080f..aacc2498c 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/impl/AsyncDataServiceImpl.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/impl/AsyncDataServiceImpl.java @@ -177,7 +177,18 @@ public class AsyncDataServiceImpl implements IAsyncDataService { } Integer detailId = advanceDetailEntity.getId(); - //TODO 这里还要确认是否需要 + //查询包件明细 +// List saveList = new ArrayList<>(); +// QueryWrapper listQueryWrapper = new QueryWrapper<>(); +// orderQueryWrapper.eq("package_id",detailId) +// .eq("is_deleted",0); +// List lists = panPackageListService.list(listQueryWrapper); +// for (PanPackageList panPackageList:lists){ +// DetailProductEntity detailProductEntity = new DetailProductEntity(); +// detailProductEntity.setUnitNo(panPackageInfo.getUnitNo()); +// detailProductEntity.setProductcode(panPackageList.get); +// +// } } diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/impl/PanFactoryDataServiceImpl.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/impl/PanFactoryDataServiceImpl.java index 3663a33d4..2b9dba596 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/impl/PanFactoryDataServiceImpl.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/impl/PanFactoryDataServiceImpl.java @@ -104,17 +104,19 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService { QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.eq("order_no",orderNo); PanFactoryOrder panFactoryOrder = factoryOrderService.getOne(queryWrapper); + if(Objects.isNull(panFactoryOrder)){ + logger.info("#############handleData: 合同自编码orderNo={}",orderNo); + throw new CustomerException(400,"未找到订单数据"); + } String plantId = panFactoryOrder.getPlantId();//工厂id String deliveryNumber = panFactoryOrder.getDeliveryNumber(); orderInfoDTO.setPlantId(plantId); orderInfoDTO.setDeliveryNumber(deliveryNumber); - QueryWrapper panFactoryOrderQueryWrapper = new QueryWrapper<>(); - panFactoryOrderQueryWrapper.eq("order_no",orderNo); - PanFactoryOrder one = panFactoryOrderService.getOne(panFactoryOrderQueryWrapper); - if(Objects.isNull(one)){ - logger.info("#############handleData: 合同自编码orderNo={}",orderNo); - throw new CustomerException(400,"未找到订单数据"); + //判断数据是都已存在 + if(!orderInfoDTO.verifyData()){ + logger.info("#############handleData: 数据不齐全 orderInfoDTO={}",orderInfoDTO); + throw new CustomerException(400,"数据不齐全"); } //拼接参数 @@ -124,12 +126,6 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService { Gson gson = new GsonBuilder().setPrettyPrinting().create(); String s = gson.toJson(map); - //判断数据是都已存在 - if(!orderInfoDTO.verifyData()){ - logger.info("#############handleData: 数据不齐全 orderInfoDTO={}",orderInfoDTO); - throw new CustomerException(400,"数据不齐全"); - } - //先获取token String panToken = getPanToken();