Browse Source

Merge branch 'pre-production'

newStockUp
zhenghaoyu 1 year ago
parent
commit
c5fcf3cf8e
  1. 50
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java

50
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.IDistributionParcelListClient;
import com.logpm.distribution.feign.IDistributionStockArticleClient; import com.logpm.distribution.feign.IDistributionStockArticleClient;
import com.logpm.distribution.feign.IDistributionStockListClient; import com.logpm.distribution.feign.IDistributionStockListClient;
import com.logpm.distribution.vo.DistributionPackadeliVO;
import com.logpm.distribution.vo.DistributionStockListVO; import com.logpm.distribution.vo.DistributionStockListVO;
import com.logpm.warehouse.bean.Resp; import com.logpm.warehouse.bean.Resp;
import com.logpm.warehouse.dto.QuestDetailDTO; import com.logpm.warehouse.dto.QuestDetailDTO;
@ -991,24 +990,31 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
//判断库位是否有托盘 //判断库位是否有托盘
BasicdataTrayEntity trayEntity = taryAllocationService.getTrayByAllocationId(allocationId); BasicdataTrayEntity trayEntity = taryAllocationService.getTrayByAllocationId(allocationId);
trayCode = trayEntity.getPalletCode(); if(!Objects.isNull(trayEntity)){
BasicdataTrayEntity basicdataTrayEntity = basicdataTrayClient.getTrayByTrayCode(trayCode); trayCode = trayEntity.getPalletCode();
if (Objects.isNull(basicdataTrayEntity)) { BasicdataTrayEntity basicdataTrayEntity = basicdataTrayClient.getTrayByTrayCode(trayCode);
log.warn("###########saveNewQuestDetail: 托盘信息不存在 trayCode={}", trayCode); if (Objects.isNull(basicdataTrayEntity)) {
throw new CustomerException(403, "托盘信息不存在"); log.warn("###########saveNewQuestDetail: 托盘信息不存在 trayCode={}", trayCode);
} throw new CustomerException(403, "托盘信息不存在");
trayId = basicdataTrayEntity.getId(); }
trayId = basicdataTrayEntity.getId();
TrayTypeDataVO trayTypeDataVO = trayTypeService.getEntityByTrayCode(trayCode, warehouseId); QueryWrapper<WarehouseTrayTypeEntity> trayTypeEntityQueryWrapper = new QueryWrapper<>();
if (Objects.isNull(trayTypeDataVO)) { trayTypeEntityQueryWrapper.eq("tray_code",trayCode)
log.warn("###########saveNewQuestDetail: 托盘打托信息不存在 trayCode={}", trayCode); .eq("is_deleted",0);
throw new CustomerException(403, "托盘打托信息不存在");
} WarehouseTrayTypeEntity trayTypeEntity = trayTypeService.getOne(trayTypeEntityQueryWrapper);
String type = trayTypeDataVO.getType(); if (Objects.isNull(trayTypeEntity)) {
if (questTarget != Integer.parseInt(type)) { log.warn("###########saveNewQuestDetail: 托盘打托信息不存在 trayCode={}", trayCode);
log.warn("###########saveNewQuestDetail: 托盘打托数据类型错误 trayCode={}", trayCode); throw new CustomerException(403, "托盘打托信息不存在");
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(); positionCode = goodsAreaEntity.getHeadline() + "-" + basicdataGoodsShelfEntity.getGoodsShelfName() + "-" + goodsAllocationEntity.getGoodsAllocationName();
} else if (questType == 4) { } else if (questType == 4) {
BasicdataTrayEntity basicdataTrayEntity = basicdataTrayClient.getTrayByTrayCode(trayCode); BasicdataTrayEntity basicdataTrayEntity = basicdataTrayClient.getTrayByTrayCode(trayCode);
@ -1017,12 +1023,16 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
throw new CustomerException(403, "托盘信息不存在"); throw new CustomerException(403, "托盘信息不存在");
} }
trayId = basicdataTrayEntity.getId(); trayId = basicdataTrayEntity.getId();
TrayTypeDataVO trayTypeDataVO = trayTypeService.getEntityByTrayCode(trayCode, warehouseId); QueryWrapper<WarehouseTrayTypeEntity> trayTypeEntityQueryWrapper = new QueryWrapper<>();
if (Objects.isNull(trayTypeDataVO)) { trayTypeEntityQueryWrapper.eq("tray_code",trayCode)
.eq("is_deleted",0);
WarehouseTrayTypeEntity trayTypeEntity = trayTypeService.getOne(trayTypeEntityQueryWrapper);
if (Objects.isNull(trayTypeEntity)) {
log.warn("###########saveNewQuestDetail: 托盘打托信息不存在 trayCode={}", trayCode); log.warn("###########saveNewQuestDetail: 托盘打托信息不存在 trayCode={}", trayCode);
throw new CustomerException(403, "托盘打托信息不存在"); throw new CustomerException(403, "托盘打托信息不存在");
} }
String type = trayTypeDataVO.getType(); String type = trayTypeEntity.getType();
if (questTarget != Integer.parseInt(type)) { if (questTarget != Integer.parseInt(type)) {
log.warn("###########saveNewQuestDetail: 托盘打托数据类型错误 trayCode={}", trayCode); log.warn("###########saveNewQuestDetail: 托盘打托数据类型错误 trayCode={}", trayCode);
throw new CustomerException(403, "托盘打托数据类型错误"); throw new CustomerException(403, "托盘打托数据类型错误");

Loading…
Cancel
Save