|
|
|
@ -86,8 +86,9 @@ public class OtherOutboundServiceImpl implements OtherOutboundService { |
|
|
|
ifsDto.setIfsLocationNo(detail.getLocationId()); |
|
|
|
ifsDto.setIfsLotBatchNo(detail.getBatchNo()); |
|
|
|
ifsDto.setIfsSerialNo("*"); |
|
|
|
// WDR、工程变更级别已按 HU 原值写入明细,IFS 必须用同一库存身份,不能写死或用占位值 |
|
|
|
ifsDto.setIfsWdrNo(detail.getWdrNo()); |
|
|
|
ifsDto.setIfsEngChgLevel("1"); |
|
|
|
ifsDto.setIfsEngChgLevel(detail.getEngChgLevel()); |
|
|
|
ifsDto.setIfsActivitySeq(BigDecimal.ZERO); |
|
|
|
ifsDto.setIfsHandlingUnitID(BigDecimal.ZERO); |
|
|
|
ifsDto.setIfsQuantity(detail.getTransQty()); |
|
|
|
@ -205,7 +206,9 @@ public class OtherOutboundServiceImpl implements OtherOutboundService { |
|
|
|
subDto.setLocationId(hu.getLocationId()); // 使用当前库位 |
|
|
|
subDto.setTransQty(hu.getQty().toString()); |
|
|
|
subDto.setDirection("-"); // 出库方向 |
|
|
|
subDto.setWdrNo("*"); |
|
|
|
// 库存身份以标签为准,后续汇总和 IFS 出库都沿用 HU 上的原值 |
|
|
|
subDto.setWdrNo(hu.getWdr()); |
|
|
|
subDto.setEngChgLevel(hu.getEngChgLevel()); |
|
|
|
|
|
|
|
subList.add(subDto); |
|
|
|
} |
|
|
|
@ -261,6 +264,7 @@ public class OtherOutboundServiceImpl implements OtherOutboundService { |
|
|
|
detailSub.setLocationId(subDto.getLocationId()); |
|
|
|
detailSub.setOrderRef3(subDto.getWdrNo()); |
|
|
|
detailSub.setOrderRef4(subDto.getWarehouseId()); |
|
|
|
detailSub.setEngChgLevel(subDto.getEngChgLevel()); |
|
|
|
|
|
|
|
// 更新HandlingUnit状态 |
|
|
|
HandlingUnit handlingUnit = handlingUnitService.lambdaQuery() |
|
|
|
@ -284,7 +288,7 @@ public class OtherOutboundServiceImpl implements OtherOutboundService { |
|
|
|
detailSubs.add(detailSub); |
|
|
|
} |
|
|
|
|
|
|
|
//总计sub数量添加到list |
|
|
|
// 按库存身份汇总。WDR、工程变更级别不同的标签不能并成一行,否则 IFS 会扣错库存 |
|
|
|
Map<List<String>, Double> collect = detailSubs.stream().collect( |
|
|
|
Collectors.groupingBy(item -> Arrays.asList( |
|
|
|
item.getSite(), |
|
|
|
@ -292,7 +296,8 @@ public class OtherOutboundServiceImpl implements OtherOutboundService { |
|
|
|
item.getBatchNo(), |
|
|
|
item.getLocationId(), |
|
|
|
item.getOrderRef3(), |
|
|
|
item.getOrderRef4() |
|
|
|
item.getOrderRef4(), |
|
|
|
item.getEngChgLevel() |
|
|
|
), Collectors.summingDouble(TransDetailSub::getSubQty))); |
|
|
|
|
|
|
|
Double index = 1.0; |
|
|
|
@ -309,6 +314,7 @@ public class OtherOutboundServiceImpl implements OtherOutboundService { |
|
|
|
detail.setLocationId(key.get(3)); |
|
|
|
detail.setWdrNo(key.get(4)); |
|
|
|
detail.setOrderRef4(key.get(5)); |
|
|
|
detail.setEngChgLevel(key.get(6)); |
|
|
|
detail.setTransQty(new BigDecimal(totalQty)); |
|
|
|
detail.setDirection(direction); |
|
|
|
detailList.add(detail); |
|
|
|
@ -323,8 +329,9 @@ public class OtherOutboundServiceImpl implements OtherOutboundService { |
|
|
|
&& detailList.get(i).getPartNo().equals(sub.getPartNo()) |
|
|
|
&& detailList.get(i).getBatchNo().equals(sub.getBatchNo()) |
|
|
|
&& detailList.get(i).getLocationId().equals(sub.getLocationId()) |
|
|
|
&& detailList.get(i).getWdrNo().equals(sub.getOrderRef3()) |
|
|
|
&& Objects.equals(detailList.get(i).getWdrNo(), sub.getOrderRef3()) |
|
|
|
&& detailList.get(i).getOrderRef4().equals(sub.getOrderRef4()) |
|
|
|
&& Objects.equals(detailList.get(i).getEngChgLevel(), sub.getEngChgLevel()) |
|
|
|
){ |
|
|
|
sub.setItemNo(detailList.get(i).getItemNo()); |
|
|
|
break; |
|
|
|
|