From 46acd14b5261e7829efb4fa51b0ec9dd37898641 Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Tue, 17 Oct 2023 19:40:05 +0800 Subject: [PATCH] =?UTF-8?q?1.=E7=9B=98=E7=82=B9=E4=BB=BB=E5=8A=A1=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=95=B0=E6=8D=AE=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/TaskQuestServiceImpl.java | 50 +++++++++++-------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java index 5e6a2c879..84ec36f1a 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java @@ -30,7 +30,6 @@ import com.logpm.distribution.entity.DistributionStockListEntity; import com.logpm.distribution.feign.IDistributionParcelListClient; import com.logpm.distribution.feign.IDistributionStockArticleClient; import com.logpm.distribution.feign.IDistributionStockListClient; -import com.logpm.distribution.vo.DistributionPackadeliVO; import com.logpm.distribution.vo.DistributionStockListVO; import com.logpm.warehouse.bean.Resp; import com.logpm.warehouse.dto.QuestDetailDTO; @@ -991,24 +990,31 @@ public class TaskQuestServiceImpl extends BaseServiceImpl trayTypeEntityQueryWrapper = new QueryWrapper<>(); + trayTypeEntityQueryWrapper.eq("tray_code",trayCode) + .eq("is_deleted",0); + + WarehouseTrayTypeEntity trayTypeEntity = trayTypeService.getOne(trayTypeEntityQueryWrapper); + if (Objects.isNull(trayTypeEntity)) { + log.warn("###########saveNewQuestDetail: 托盘打托信息不存在 trayCode={}", trayCode); + throw new CustomerException(403, "托盘打托信息不存在"); + } + String type = trayTypeEntity.getType(); + if (questTarget != Integer.parseInt(type)) { + log.warn("###########saveNewQuestDetail: 托盘打托数据类型错误 trayCode={}", trayCode); + throw new CustomerException(403, "托盘打托数据类型错误"); + } } + positionCode = goodsAreaEntity.getHeadline() + "-" + basicdataGoodsShelfEntity.getGoodsShelfName() + "-" + goodsAllocationEntity.getGoodsAllocationName(); } else if (questType == 4) { BasicdataTrayEntity basicdataTrayEntity = basicdataTrayClient.getTrayByTrayCode(trayCode); @@ -1017,12 +1023,16 @@ public class TaskQuestServiceImpl extends BaseServiceImpl trayTypeEntityQueryWrapper = new QueryWrapper<>(); + trayTypeEntityQueryWrapper.eq("tray_code",trayCode) + .eq("is_deleted",0); + + WarehouseTrayTypeEntity trayTypeEntity = trayTypeService.getOne(trayTypeEntityQueryWrapper); + if (Objects.isNull(trayTypeEntity)) { log.warn("###########saveNewQuestDetail: 托盘打托信息不存在 trayCode={}", trayCode); throw new CustomerException(403, "托盘打托信息不存在"); } - String type = trayTypeDataVO.getType(); + String type = trayTypeEntity.getType(); if (questTarget != Integer.parseInt(type)) { log.warn("###########saveNewQuestDetail: 托盘打托数据类型错误 trayCode={}", trayCode); throw new CustomerException(403, "托盘打托数据类型错误");