重复分配修改;
This commit is contained in:
+4
@@ -444,4 +444,8 @@ public class OutMaterialDetail extends BaseVOEntity {
|
|||||||
@ApiModelProperty("复核总面积(SQM)")
|
@ApiModelProperty("复核总面积(SQM)")
|
||||||
@Excel(name = "复核总面积(SQM)")
|
@Excel(name = "复核总面积(SQM)")
|
||||||
private BigDecimal checkArea;
|
private BigDecimal checkArea;
|
||||||
|
|
||||||
|
@ApiModelProperty("是否已分配")
|
||||||
|
@Excel(name = "是否已分配")
|
||||||
|
private String isAllocated;
|
||||||
}
|
}
|
||||||
+10
-5
@@ -299,10 +299,14 @@ public class OutMaterialDetailImpl extends ServiceImpl<OutMaterialDetailMapper,
|
|||||||
totalAllocationQuantity = totalAllocationQuantity.add(outMaterialDetail.getAlreadyAllocationQuantity());
|
totalAllocationQuantity = totalAllocationQuantity.add(outMaterialDetail.getAlreadyAllocationQuantity());
|
||||||
}
|
}
|
||||||
stockOutOrderPO.setAllocationQuantity(totalAllocationQuantity);
|
stockOutOrderPO.setAllocationQuantity(totalAllocationQuantity);
|
||||||
//保存物料明细信息
|
|
||||||
saveOrUpdateBatch(outMaterialDetailList);
|
|
||||||
//分配(修改库存)
|
//分配(修改库存)
|
||||||
xgkc(outMaterialDetailList,outOrderNumber,loginUser);
|
xgkc(outMaterialDetailList,outOrderNumber,loginUser);
|
||||||
|
//保存物料明细信息
|
||||||
|
//给MaterialDetailList中的每一项的isAllocated赋值为1
|
||||||
|
outMaterialDetailList.forEach(outMaterialDetail -> {
|
||||||
|
outMaterialDetail.setIsAllocated("1");
|
||||||
|
});
|
||||||
|
saveOrUpdateBatch(outMaterialDetailList);
|
||||||
|
|
||||||
return stockOutOrderPO;
|
return stockOutOrderPO;
|
||||||
}
|
}
|
||||||
@@ -416,10 +420,11 @@ public class OutMaterialDetailImpl extends ServiceImpl<OutMaterialDetailMapper,
|
|||||||
StockOutOrder stockOutOrder = stockOutOrderMapper.selectOne(new QueryWrapper<StockOutOrder>().lambda().eq(StockOutOrder::getOutOrderNumber, outOrderNumber));
|
StockOutOrder stockOutOrder = stockOutOrderMapper.selectOne(new QueryWrapper<StockOutOrder>().lambda().eq(StockOutOrder::getOutOrderNumber, outOrderNumber));
|
||||||
for (OutMaterialDetail outMaterialDetail : outMaterialDetailList) {
|
for (OutMaterialDetail outMaterialDetail : outMaterialDetailList) {
|
||||||
BigDecimal alreadyAllocationQuantity = outMaterialDetail.getAlreadyAllocationQuantity();
|
BigDecimal alreadyAllocationQuantity = outMaterialDetail.getAlreadyAllocationQuantity();
|
||||||
// 如果已经分配数量大于0,则跳过本次循环(该明细已分配过,不再重复处理)
|
String isAllocated = outMaterialDetail.getIsAllocated();
|
||||||
/*if (alreadyAllocationQuantity != null && alreadyAllocationQuantity.compareTo(BigDecimal.ZERO) > 0) {
|
// 如果已经分配过,则跳过本次循环(该明细已分配过,不再重复处理)
|
||||||
|
if (isAllocated != null && "1".equals(isAllocated)) {
|
||||||
continue;
|
continue;
|
||||||
}*/
|
}
|
||||||
Long materialInventoryId = outMaterialDetail.getMaterialInventoryId();
|
Long materialInventoryId = outMaterialDetail.getMaterialInventoryId();
|
||||||
BigDecimal allocationQuantity = outMaterialDetail.getAllocationQuantity();
|
BigDecimal allocationQuantity = outMaterialDetail.getAllocationQuantity();
|
||||||
if (ObjectUtils.isEmpty(allocationQuantity)) {
|
if (ObjectUtils.isEmpty(allocationQuantity)) {
|
||||||
|
|||||||
+4
@@ -462,4 +462,8 @@ public class OutMaterialDetailPO extends StockOutOrderBaseDO {
|
|||||||
@ApiModelProperty("复核总面积(SQM)")
|
@ApiModelProperty("复核总面积(SQM)")
|
||||||
@Excel(name = "复核总面积(SQM)")
|
@Excel(name = "复核总面积(SQM)")
|
||||||
private BigDecimal checkArea;
|
private BigDecimal checkArea;
|
||||||
|
|
||||||
|
@ApiModelProperty("是否已分配")
|
||||||
|
@Excel(name = "是否已分配")
|
||||||
|
private String isAllocated;
|
||||||
}
|
}
|
||||||
+3
@@ -420,4 +420,7 @@ public class OutMaterialDetailDO extends BaseVOEntity {
|
|||||||
@Excel(name = "复核总面积(SQM)")
|
@Excel(name = "复核总面积(SQM)")
|
||||||
private BigDecimal checkArea;
|
private BigDecimal checkArea;
|
||||||
|
|
||||||
|
@ApiModelProperty("是否已分配")
|
||||||
|
@Excel(name = "是否已分配")
|
||||||
|
private String isAllocated;
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user