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, "托盘打托数据类型错误");