|
|
|
@ -2944,12 +2944,12 @@ public class CoDelServiceImpl implements CoDelService { |
|
|
|
totalQty = totalQty + detailData.getQty().intValue(); |
|
|
|
} |
|
|
|
BigDecimal boxWeight = BigDecimal.valueOf(propertiesBoxWeight.getNumValue());// 箱的重量 |
|
|
|
// Total Qty / 每箱EA |
|
|
|
/* // Total Qty / 每箱EA |
|
|
|
BigDecimal noCartons = BigDecimal.valueOf(totalQty/((double) propertiesRollQty.getNumValue().intValue() * propertiesBoxRolls.getNumValue().intValue())); |
|
|
|
// 箱重量:物料维护里取 |
|
|
|
BigDecimal grossWeight = noCartons.multiply(boxWeight); |
|
|
|
// Net Weight = Gross Weight - No of Cartons/2 |
|
|
|
BigDecimal netWeight = grossWeight.subtract(noCartons.divide(BigDecimal.valueOf(2))); |
|
|
|
BigDecimal netWeight = grossWeight.subtract(noCartons.divide(BigDecimal.valueOf(2)));*/ |
|
|
|
List<EcssCoDelNotifyDetailData> details = palletListMap.getOrDefault(partNo, Collections.emptyList()); |
|
|
|
for (EcssCoDelNotifyDetailData detailData : details) { |
|
|
|
// 每箱 EA = 每卷数量 * 每箱卷数 |
|
|
|
@ -2987,8 +2987,11 @@ public class CoDelServiceImpl implements CoDelService { |
|
|
|
boxListData.setBuNo(inData.getBuNo()); |
|
|
|
boxListData.setDelNo(inData.getDelNo()); |
|
|
|
boxListData.setItemNo(seqNo); |
|
|
|
boxListData.setGrossWeight(grossWeight); |
|
|
|
boxListData.setNetWeight(netWeight); |
|
|
|
// 根据实际箱数计算毛重和净重 |
|
|
|
BigDecimal boxGrossWeight = wholeBoxes.multiply(boxWeight); |
|
|
|
BigDecimal boxNetWeight = boxGrossWeight.subtract(wholeBoxes.divide(BigDecimal.valueOf(2))); |
|
|
|
boxListData.setGrossWeight(boxGrossWeight); |
|
|
|
boxListData.setNetWeight(boxNetWeight); |
|
|
|
boxListData.setBoxQty(wholeBoxes); |
|
|
|
boxListData.setCreateBy(currentUser.getUsername()); |
|
|
|
coDelMapper.saveCodelBoxList(boxListData); |
|
|
|
@ -3020,8 +3023,11 @@ public class CoDelServiceImpl implements CoDelService { |
|
|
|
boxListData.setBuNo(inData.getBuNo()); |
|
|
|
boxListData.setDelNo(inData.getDelNo()); |
|
|
|
boxListData.setItemNo(seqNo); |
|
|
|
boxListData.setGrossWeight(grossWeight); |
|
|
|
boxListData.setNetWeight(netWeight); |
|
|
|
// 零数箱按1箱计算毛重和净重 |
|
|
|
BigDecimal boxGrossWeight = BigDecimal.ONE.multiply(boxWeight); |
|
|
|
BigDecimal boxNetWeight = boxGrossWeight.subtract(BigDecimal.ONE.divide(BigDecimal.valueOf(2))); |
|
|
|
boxListData.setGrossWeight(boxGrossWeight); |
|
|
|
boxListData.setNetWeight(boxNetWeight); |
|
|
|
boxListData.setBoxQty(BigDecimal.ONE); |
|
|
|
boxListData.setCreateBy(currentUser.getUsername()); |
|
|
|
coDelMapper.saveCodelBoxList(boxListData); |
|
|
|
@ -3048,14 +3054,18 @@ public class CoDelServiceImpl implements CoDelService { |
|
|
|
|
|
|
|
} else { |
|
|
|
// 不显示零数箱:直接进一 |
|
|
|
BigDecimal actualBoxQty = detailData.getQty().divide(eaPerBox, 0, RoundingMode.UP); |
|
|
|
EcssCoDelBoxListData boxListData = new EcssCoDelBoxListData(); |
|
|
|
boxListData.setSite(inData.getSite()); |
|
|
|
boxListData.setBuNo(inData.getBuNo()); |
|
|
|
boxListData.setDelNo(inData.getDelNo()); |
|
|
|
boxListData.setItemNo(seqNo); |
|
|
|
boxListData.setGrossWeight(grossWeight); |
|
|
|
boxListData.setNetWeight(netWeight); |
|
|
|
boxListData.setBoxQty(detailData.getQty().divide(eaPerBox, 0, RoundingMode.UP)); |
|
|
|
// 根据实际箱数计算毛重和净重 |
|
|
|
BigDecimal boxGrossWeight = actualBoxQty.multiply(boxWeight); |
|
|
|
BigDecimal boxNetWeight = boxGrossWeight.subtract(actualBoxQty.divide(BigDecimal.valueOf(2))); |
|
|
|
boxListData.setGrossWeight(boxGrossWeight); |
|
|
|
boxListData.setNetWeight(boxNetWeight); |
|
|
|
boxListData.setBoxQty(actualBoxQty); |
|
|
|
boxListData.setCreateBy(currentUser.getUsername()); |
|
|
|
coDelMapper.saveCodelBoxList(boxListData); |
|
|
|
|
|
|
|
|