Commit 94549e6b95416d1fec4537e677b41ec344ff4670
1 parent
4630d473
edit
Showing
1 changed file
with
16 additions
and
0 deletions
src/main/java/com/huaheng/pc/shipment/shipmentContainerHeader/service/ShipmentContainerHeaderServiceImpl.java
@@ -323,6 +323,22 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl<ShipmentCont | @@ -323,6 +323,22 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl<ShipmentCont | ||
323 | } | 323 | } |
324 | } | 324 | } |
325 | 325 | ||
326 | + LambdaQueryWrapper<InventoryDetail> inventoryDetailLambdaQueryWrapper = Wrappers.lambdaQuery(); | ||
327 | + inventoryDetailLambdaQueryWrapper.eq(InventoryDetail::getContainerCode, shipmentContainerHeader.getContainerCode()); | ||
328 | + List<InventoryDetail> inventoryDetailList = inventoryDetailService.list(inventoryDetailLambdaQueryWrapper); | ||
329 | + int taskType = QuantityConstant.TASK_TYPE_WHOLESHIPMENT; | ||
330 | + if(inventoryDetailList != null && inventoryDetailList.size() > 0) { | ||
331 | + for(InventoryDetail inventoryDetail : inventoryDetailList) { | ||
332 | + if(inventoryDetail.getQty().subtract(inventoryDetail.getTaskQty()). | ||
333 | + compareTo(BigDecimal.ZERO) > 0) { | ||
334 | + taskType = QuantityConstant.TASK_TYPE_SORTINGSHIPMENT; | ||
335 | + } | ||
336 | + } | ||
337 | + } | ||
338 | + | ||
339 | + shipmentContainerHeader.setTaskType(taskType); | ||
340 | + updateById(shipmentContainerHeader); | ||
341 | + | ||
326 | //4.查看组盘头状态,如果状态在10到30,则生成任务明细或修改任务明细的数量 | 342 | //4.查看组盘头状态,如果状态在10到30,则生成任务明细或修改任务明细的数量 |
327 | //查看任务头 | 343 | //查看任务头 |
328 | int containerHeaderStatus = shipmentContainerHeader.getStatus().intValue(); | 344 | int containerHeaderStatus = shipmentContainerHeader.getStatus().intValue(); |