WMS收货管理更多属性字段显示
This commit is contained in:
+33
-2
@@ -252,10 +252,41 @@ public class StockReceiptOrderApplicationService {
|
||||
// 5. 清空质检相关字段(如果是否质检为否)
|
||||
clearQualityInspectionFieldsRecursively(receiptMaterialDetailPOList);
|
||||
|
||||
// 6. 汇总第一层明细的净重、毛重、体积、面积
|
||||
BigDecimal totalNetWeight = BigDecimal.ZERO;
|
||||
BigDecimal totalGrossWeight = BigDecimal.ZERO;
|
||||
BigDecimal totalVolume = BigDecimal.ZERO;
|
||||
BigDecimal totalArea = BigDecimal.ZERO;
|
||||
if (!CollectionUtils.isEmpty(receiptMaterialDetailPOList)) {
|
||||
// receiptMaterialDetailPOList 已经是树形结构,第一层明细的 level 应该是 1 或 null
|
||||
for (ReceiptMaterialDetailPO detail : receiptMaterialDetailPOList) {
|
||||
// 只汇总第一层明细(level=1或没有level字段)
|
||||
if (detail.getLevel() == null || detail.getLevel() == 1) {
|
||||
if (detail.getTotalNetWeight() != null) {
|
||||
totalNetWeight = totalNetWeight.add(detail.getTotalNetWeight());
|
||||
}
|
||||
if (detail.getTotalGrossWeight() != null) {
|
||||
totalGrossWeight = totalGrossWeight.add(detail.getTotalGrossWeight());
|
||||
}
|
||||
if (detail.getTotalVolume() != null) {
|
||||
totalVolume = totalVolume.add(detail.getTotalVolume());
|
||||
}
|
||||
if (detail.getTotalArea() != null) {
|
||||
totalArea = totalArea.add(detail.getTotalArea());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stockReceiptOrderPO.setTotalNetWeight(totalNetWeight);
|
||||
stockReceiptOrderPO.setTotalGrossWeight(totalGrossWeight);
|
||||
stockReceiptOrderPO.setTotalVolume(totalVolume);
|
||||
stockReceiptOrderPO.setTotalArea(totalArea);
|
||||
|
||||
stockReceiptOrderPO.setMaterialDetailList(receiptMaterialDetailPOList);
|
||||
log.info("返回收货单信息,receiptOrderId={}, materialDetailList大小={}",
|
||||
log.info("返回收货单信息,receiptOrderId={}, materialDetailList大小={}, totalNetWeight={}, totalGrossWeight={}, totalVolume={}, totalArea={}",
|
||||
stockReceiptOrderPO.getReceiptOrderId(),
|
||||
receiptMaterialDetailPOList != null ? receiptMaterialDetailPOList.size() : 0);
|
||||
receiptMaterialDetailPOList != null ? receiptMaterialDetailPOList.size() : 0,
|
||||
totalNetWeight, totalGrossWeight, totalVolume, totalArea);
|
||||
return stockReceiptOrderPO;
|
||||
}
|
||||
|
||||
|
||||
+16
@@ -140,4 +140,20 @@ public class StockReceiptOrderPO extends StockInOrderBasePO {
|
||||
|
||||
@ApiModelProperty("收货作业单号")
|
||||
private String receiptTaskNumber;
|
||||
|
||||
@ApiModelProperty("总净重(KG)")
|
||||
@Excel(name = "总净重(KG)")
|
||||
private BigDecimal totalNetWeight;
|
||||
|
||||
@ApiModelProperty("总毛重(KG)")
|
||||
@Excel(name = "总毛重(KG)")
|
||||
private BigDecimal totalGrossWeight;
|
||||
|
||||
@ApiModelProperty("总体积(CBM)")
|
||||
@Excel(name = "总体积(CBM)")
|
||||
private BigDecimal totalVolume;
|
||||
|
||||
@ApiModelProperty("总面积(SQM)")
|
||||
@Excel(name = "总面积(SQM)")
|
||||
private BigDecimal totalArea;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user