Commit 72085284ea1b8c23f81bae51b21bb91379f8d204
1 parent
cabf7776
解决分拣出库状态不对的问题
Showing
1 changed file
with
6 additions
and
4 deletions
src/main/java/com/huaheng/pc/task/taskHeader/service/ShipmentTaskService.java
... | ... | @@ -289,7 +289,7 @@ public class ShipmentTaskService { |
289 | 289 | task.setStatus(QuantityConstant.TASK_STATUS_COMPLETED); |
290 | 290 | taskHeaderService.updateById(task); |
291 | 291 | /* 更新库位和容器*/ |
292 | - updateLocationContainer(task.getFromLocation(), task.getToLocation(), task.getContainerCode(), task.getTaskType()); | |
292 | + updateShipmentLocationContainer(task.getFromLocation(), task.getToLocation(), task.getContainerCode(), task.getTaskType()); | |
293 | 293 | |
294 | 294 | //设置出库货箱表头状态为拣货任务完成 |
295 | 295 | LambdaUpdateWrapper<ShipmentContainerHeader> shipmentContainerHeaderLambdaUpdateWrapper = Wrappers.lambdaUpdate(); |
... | ... | @@ -341,7 +341,7 @@ public class ShipmentTaskService { |
341 | 341 | * @param containerCode 容器编码 |
342 | 342 | * @param taskType 任务类型 |
343 | 343 | */ |
344 | - public void updateLocationContainer(String fromLocation, String toLocation, String containerCode, Integer taskType){ | |
344 | + public void updateShipmentLocationContainer(String fromLocation, String toLocation, String containerCode, Integer taskType){ | |
345 | 345 | //将库位状态改为空闲,如果是整出的对应的容器也清空 |
346 | 346 | Location fromLocationRecord = locationService.findLocationByCode(fromLocation); |
347 | 347 | if (StringUtils.isNull(fromLocationRecord)) { |
... | ... | @@ -384,10 +384,12 @@ public class ShipmentTaskService { |
384 | 384 | //查询是否存在关联的库存,入如果没有就修改容器状态为empty |
385 | 385 | LambdaQueryWrapper<InventoryDetail> inventoryDetaillambdaQueryWrapper = Wrappers.lambdaQuery(); |
386 | 386 | inventoryDetaillambdaQueryWrapper.eq(InventoryDetail::getContainerCode, containerCode); |
387 | - List<InventoryDetail> detailList = inventoryDetailService.list(); | |
387 | + List<InventoryDetail> detailList = inventoryDetailService.list(inventoryDetaillambdaQueryWrapper); | |
388 | 388 | //库存查询不到该容器就把容器状态改为可用 |
389 | 389 | if (detailList.isEmpty()) { |
390 | - containerService.updateLocationCodeAndStatus(containerCode, "", "empty"); | |
390 | + containerService.updateLocationCodeAndStatus(containerCode, toLocation, "empty"); | |
391 | + } else { | |
392 | + containerService.updateLocationCodeAndStatus(containerCode, toLocation, "some"); | |
391 | 393 | } |
392 | 394 | } |
393 | 395 | } |
... | ... |