Commit a17145c35df80266a71368ab8eb5fa01d6f2b565
1 parent
416f0a7e
完善出库任务接口
Showing
2 changed files
with
17 additions
and
2 deletions
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/service/impl/ShipmentCombinationServiceImpl.java
... | ... | @@ -284,9 +284,9 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi |
284 | 284 | if(shipmentDetailTaskQty.compareTo(shipmentDetailQty) > 0) { |
285 | 285 | return Result.error("配盘时, 出库详情的任务数量不能超过单据数量"); |
286 | 286 | } else if(inventoryDetailTaskQty.compareTo(inventoryDetailQty) == 0) { |
287 | - shipmentDetail.setStatus(QuantityConstant.SHIPMENT_HEADER_COMPLETED); | |
287 | + shipmentDetail.setStatus(QuantityConstant.SHIPMENT_HEADER_WAITING_OFF_SHELF); | |
288 | 288 | } else if(inventoryDetailTaskQty.compareTo(inventoryDetailQty) < 0) { |
289 | - shipmentDetail.setStatus(QuantityConstant.SHIPMENT_HEADER_OFF_SHELF); | |
289 | + shipmentDetail.setStatus(QuantityConstant.SHIPMENT_HEADER_WAITING_OFF_SHELF); | |
290 | 290 | } |
291 | 291 | shipmentDetail.setTaskQty(shipmentDetailTaskQty); |
292 | 292 | success = shipmentDetailService.updateById(shipmentDetail); |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
... | ... | @@ -26,6 +26,8 @@ import org.jeecg.modules.wms.shipment.shipmentContainerHeader.entity.ShipmentCon |
26 | 26 | import org.jeecg.modules.wms.shipment.shipmentContainerHeader.entity.ShipmentContainerHeader; |
27 | 27 | import org.jeecg.modules.wms.shipment.shipmentContainerHeader.service.IShipmentContainerDetailService; |
28 | 28 | import org.jeecg.modules.wms.shipment.shipmentContainerHeader.service.IShipmentContainerHeaderService; |
29 | +import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentDetail; | |
30 | +import org.jeecg.modules.wms.shipment.shipmentHeader.service.IShipmentDetailService; | |
29 | 31 | import org.jeecg.modules.wms.shipment.shipmentHeader.service.IShipmentHeaderService; |
30 | 32 | import org.jeecg.modules.wms.task.taskHeader.entity.TaskDetail; |
31 | 33 | import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader; |
... | ... | @@ -89,6 +91,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
89 | 91 | @Resource |
90 | 92 | private IShipmentHeaderService shipmentHeaderService; |
91 | 93 | @Resource |
94 | + private IShipmentDetailService shipmentDetailService; | |
95 | + @Resource | |
92 | 96 | private IMaterialService materialService; |
93 | 97 | @Resource |
94 | 98 | private WcsService wcsService; |
... | ... | @@ -624,6 +628,17 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
624 | 628 | if(shipmentContainerDetail == null) { |
625 | 629 | throw new ServiceException("完成出库任务, 出库任务没有找到出库组盘详情" + taskDetail.getShipmentContainerDetailId()); |
626 | 630 | } |
631 | + ShipmentDetail shipmentDetail = shipmentDetailService.getById(taskDetail.getShipmentDetailId()); | |
632 | + if(shipmentDetail == null) { | |
633 | + throw new ServiceException("完成出库任务, 出库任务没有找到出库详情" + taskDetail.getShipmentDetailId()); | |
634 | + } | |
635 | + if(shipmentDetail.getQty().compareTo(shipmentDetail.getTaskQty()) == 0) { | |
636 | + shipmentDetail.setStatus(QuantityConstant.SHIPMENT_HEADER_COMPLETED); | |
637 | + } else if(shipmentDetail.getQty().compareTo(shipmentDetail.getTaskQty()) > 0) { | |
638 | + shipmentDetail.setStatus(QuantityConstant.SHIPMENT_HEADER_OFF_SHELF); | |
639 | + } else if(shipmentDetail.getQty().compareTo(shipmentDetail.getTaskQty()) < 0) { | |
640 | + throw new ServiceException("完成出库任务时, 出库单 单据数量不能小于配盘数量"); | |
641 | + } | |
627 | 642 | InventoryDetail inventoryDetail = |
628 | 643 | inventoryDetailService.getById(taskDetail.getFromInventoryDetailId()); |
629 | 644 | if(inventoryDetail == null) { |
... | ... |