diff --git a/src/main/java/com/huaheng/pc/task/taskHeader/service/ReceiptTaskService.java b/src/main/java/com/huaheng/pc/task/taskHeader/service/ReceiptTaskService.java index 4bccd88..3c24500 100644 --- a/src/main/java/com/huaheng/pc/task/taskHeader/service/ReceiptTaskService.java +++ b/src/main/java/com/huaheng/pc/task/taskHeader/service/ReceiptTaskService.java @@ -262,10 +262,6 @@ public class ReceiptTaskService { if (taskDetailList.isEmpty()) { throw new ServiceException("任务明细为空"); } - String containerCode = null; - if(task.getZoneCode().equals("C")) { - containerCode = createContainer(); - } InventoryHeader inventoryHeader = null; if(task.getTaskType().equals(QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT)) { LambdaQueryWrapper<InventoryHeader> lambdaQueryWrapper = Wrappers.lambdaQuery(); @@ -309,12 +305,7 @@ public class ReceiptTaskService { Location location = locationService.getLocationByCode(task.getToLocation(), warehouseCode); inventoryHeader.setZoneCode(location.getZoneCode()); inventoryHeader.setTotalWeight(task.getWeight()); - if(task.getZoneCode().equals("C")) { - inventoryHeader.setContainerCode(containerCode); - inventoryHeader.setUserDef2(task.getContainerCode()); - } else { - inventoryHeader.setContainerCode(task.getContainerCode()); - } + inventoryHeader.setContainerCode(task.getContainerCode()); inventoryHeader.setContainerStatus(QuantityConstant.STATUS_CONTAINER_SOME); inventoryHeader.setTotalQty(new BigDecimal(0)); inventoryHeader.setTotalLines(0); @@ -365,13 +356,7 @@ public class ReceiptTaskService { //修改库位状态和对应的容器 Location location = new Location(); - if(task.getZoneCode().equals("C")) { - location.setContainerCode(containerCode); - location.setUserDef2(task.getContainerCode()); - containerService.updateLocationCodeAndStatus(containerCode, task.getToLocation(), QuantityConstant.STATUS_CONTAINER_EMPTY); - } else { - location.setContainerCode(task.getContainerCode()); - } + location.setContainerCode(task.getContainerCode()); location.setWarehouseCode(warehouseCode); location.setStatus(QuantityConstant.STATUS_LOCATION_EMPTY); LambdaUpdateWrapper<Location> locationLambdaUpdateWrapper = Wrappers.lambdaUpdate(); @@ -392,9 +377,7 @@ public class ReceiptTaskService { //修改容器状态和对应的库位 Container container = new Container(); - if(!task.getZoneCode().equals("C")) { - container.setLocationCode(task.getToLocation()); - } + container.setLocationCode(task.getToLocation()); container.setStatus(QuantityConstant.STATUS_CONTAINER_SOME); LambdaUpdateWrapper<Container> containerLambdaUpdateWrapper = Wrappers.lambdaUpdate(); containerLambdaUpdateWrapper.eq(Container::getCode, task.getContainerCode());