Commit 6c49bea2c3cbfa5fafa0c188aa46cd173def5cb9
1 parent
04d0b206
修复部分问题
Showing
4 changed files
with
9 additions
and
15 deletions
src/main/java/com/huaheng/api/wcs/service/warecellAllocation/WarecellAllocationServiceImpl.java
... | ... | @@ -124,9 +124,6 @@ public class WarecellAllocationServiceImpl implements WarecellAllocationService |
124 | 124 | if (StringUtils.isNull(wcsTask.getHeight())) { |
125 | 125 | return AjaxResult.error("高为空"); |
126 | 126 | } |
127 | -// if (StringUtils.isNull(wcsTask.getWeight())) { | |
128 | -// return AjaxResult.error("重为空"); | |
129 | -// } | |
130 | 127 | return verticalWarehouseAllocation(wcsTask); |
131 | 128 | } |
132 | 129 | |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/ShipmentTaskService.java
... | ... | @@ -246,14 +246,16 @@ public class ShipmentTaskService { |
246 | 246 | List<TaskDetail> taskDetails = taskDetailService.findByTaskId(task.getId()); |
247 | 247 | |
248 | 248 | List<Integer> shipmentHeadIds = new ArrayList<>(); |
249 | - if (task.getStatus().equals(QuantityConstant.TASK_STATUS_COMPLETED)) { | |
249 | + if (task.getStatus().intValue() == QuantityConstant.TASK_STATUS_COMPLETED) { | |
250 | 250 | throw new ServiceException("任务已完成"); |
251 | 251 | } |
252 | + | |
252 | 253 | if (StringUtils.isEmpty(task.getFromLocation())) { |
253 | 254 | throw new ServiceException("任务" + task.getId() + "没有起始库位,执行中止"); |
254 | 255 | } |
255 | 256 | |
256 | - if (StringUtils.isEmpty(task.getToLocation()) && task.getTaskType().equals(QuantityConstant.TASK_TYPE_SORTINGSHIPMENT)) { | |
257 | + if (StringUtils.isEmpty(task.getToLocation()) | |
258 | + && task.getTaskType().equals(QuantityConstant.TASK_TYPE_SORTINGSHIPMENT)) { | |
257 | 259 | throw new ServiceException("任务" + task.getId() + "没有目的库位,执行中止"); |
258 | 260 | } |
259 | 261 | |
... | ... | @@ -313,7 +315,7 @@ public class ShipmentTaskService { |
313 | 315 | inventoryDetailService.removeById(inventoryDetail.getId()); |
314 | 316 | inventoryHeader.setTotalQty(inventoryHeader.getTotalQty().subtract(taskDetail.getQty())); |
315 | 317 | inventoryHeader.setTotalLines(inventoryHeader.getTotalLines() - 1); |
316 | - if (inventoryHeader.getTotalQty().signum() == 0){ | |
318 | + if (inventoryHeader.getTotalQty().signum() == 0) { | |
317 | 319 | inventoryHeaderService.removeById(inventoryHeader.getId()); |
318 | 320 | } else { |
319 | 321 | inventoryHeaderService.updateById(inventoryHeader); |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/TransferTaskService.java
... | ... | @@ -102,6 +102,10 @@ public class TransferTaskService { |
102 | 102 | return AjaxResult.error("目标库位和源库位高度不一样"); |
103 | 103 | } |
104 | 104 | |
105 | + if(!sourceLocation.getLocationType().equals(desLocation.getLocationType())) { | |
106 | + return AjaxResult.error("目标库位和源库位库位类型不一样"); | |
107 | + } | |
108 | + | |
105 | 109 | if(!sourceLocation.getArea().equals(desLocation.getArea())) { |
106 | 110 | return AjaxResult.error("目标库位和源库位不在同一个区域"); |
107 | 111 | } |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/WorkTaskService.java
... | ... | @@ -511,15 +511,6 @@ public class WorkTaskService { |
511 | 511 | throw new ServiceException("更新容器状态失败"); |
512 | 512 | } |
513 | 513 | |
514 | - if (QuantityConstant.STATUS_CONTAINER_SOME.equals(container.getStatus())) { | |
515 | - LambdaUpdateWrapper<InventoryDetail> queryWrapper = Wrappers.lambdaUpdate(); | |
516 | - queryWrapper.eq(InventoryDetail::getLocationCode, taskHeader.getToLocation()) | |
517 | - .eq(InventoryDetail::getContainerCode, taskHeader.getContainerCode()) | |
518 | - .eq(InventoryDetail::getWarehouseCode, ShiroUtils.getWarehouseCode()); | |
519 | - if (!inventoryDetailService.update(queryWrapper)) { | |
520 | - throw new ServiceException("更新失败"); | |
521 | - } | |
522 | - } | |
523 | 514 | return AjaxResult.success(); |
524 | 515 | } |
525 | 516 | |
... | ... |