Commit d807528b0a37368705a2a00e23a0fc7b5426870a

Authored by 肖超群
1 parent fdeebf41

回退多余代码

huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/impl/InventoryHeaderServiceImpl.java
... ... @@ -250,7 +250,7 @@ public class InventoryHeaderServiceImpl extends ServiceImpl<InventoryHeaderMappe
250 250 }
251 251  
252 252 List<Integer> shipmentContainerHeaderIdList =
253   - shipmentContainerDetailList.stream().map(ShipmentContainerDetail::getShipmentContainerId).collect(Collectors.toList());
  253 + shipmentContainerDetailList.stream().map(ShipmentContainerDetail::getShipmentContainerId).distinct().collect(Collectors.toList());
254 254 long shipmentOrder = System.currentTimeMillis();
255 255 int sequenceNumber = shipmentContainerHeaderIdList.size();
256 256 int sequence = 0;
... ... @@ -336,7 +336,7 @@ public class InventoryHeaderServiceImpl extends ServiceImpl&lt;InventoryHeaderMappe
336 336 }
337 337  
338 338 List<Integer> shipmentContainerHeaderIdList =
339   - shipmentContainerDetailList.stream().map(ShipmentContainerDetail::getShipmentContainerId).collect(Collectors.toList());
  339 + shipmentContainerDetailList.stream().map(ShipmentContainerDetail::getShipmentContainerId).distinct().collect(Collectors.toList());
340 340 long shipmentOrder = System.currentTimeMillis();
341 341 int sequenceNumber = shipmentContainerHeaderIdList.size();
342 342 int sequence = 0;
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
... ... @@ -1073,21 +1073,21 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1073 1073 return Result.error("完成入库任务时,没有找到目的库位");
1074 1074 }
1075 1075 InventoryHeader inventoryHeader = inventoryHeaderService.getInventoryHeaderByContainerCode(containerCode, warehouseCode);
1076   - if (inventoryHeader != null && taskType == QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT && !fromLocationCode.equals(toLocationCode)) {
1077   - inventoryHeader.setLocationCode(toLocationCode);
1078   - inventoryHeader.setZoneCode(zoneCode);
1079   - if (!inventoryHeaderService.updateById(inventoryHeader)) {
1080   - throw new JeecgBootException("完成入库任务时, 更新库存头失败");
1081   - }
1082   - List<InventoryDetail> inventoryDetails = inventoryDetailService.getInventoryDetailListByInventoryHeaderId(inventoryHeader.getId());
1083   - for (InventoryDetail inventoryDetail : inventoryDetails) {
1084   - inventoryDetail.setLocationCode(toLocationCode);
1085   - inventoryDetail.setZoneCode(zoneCode);
1086   - if (!inventoryDetailService.updateById(inventoryDetail)) {
1087   - throw new JeecgBootException("完成入库任务时, 更新库存详情失败");
1088   - }
1089   - }
1090   - }
  1076 +// if (inventoryHeader != null && taskType == QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT && !fromLocationCode.equals(toLocationCode)) {
  1077 +// inventoryHeader.setLocationCode(toLocationCode);
  1078 +// inventoryHeader.setZoneCode(zoneCode);
  1079 +// if (!inventoryHeaderService.updateById(inventoryHeader)) {
  1080 +// throw new JeecgBootException("完成入库任务时, 更新库存头失败");
  1081 +// }
  1082 +// List<InventoryDetail> inventoryDetails = inventoryDetailService.getInventoryDetailListByInventoryHeaderId(inventoryHeader.getId());
  1083 +// for (InventoryDetail inventoryDetail : inventoryDetails) {
  1084 +// inventoryDetail.setLocationCode(toLocationCode);
  1085 +// inventoryDetail.setZoneCode(zoneCode);
  1086 +// if (!inventoryDetailService.updateById(inventoryDetail)) {
  1087 +// throw new JeecgBootException("完成入库任务时, 更新库存详情失败");
  1088 +// }
  1089 +// }
  1090 +// }
1091 1091 if (inventoryHeader == null) {
1092 1092 inventoryHeader = new InventoryHeader();
1093 1093 inventoryHeader.setWarehouseCode(warehouseCode);
... ...