分配增加本次分配数量;
This commit is contained in:
+4
@@ -815,6 +815,10 @@ public class StockOutOrderApplicationService {
|
||||
//未进行分配直接跳过
|
||||
continue;
|
||||
}
|
||||
BigDecimal alreadyAllocationQuantity = outMaterialDetailDO.getAlreadyAllocationQuantity();
|
||||
BigDecimal allocationQuantity = outMaterialDetailDO.getAllocationQuantity();
|
||||
BigDecimal nowAllocationQuantity = allocationQuantity.subtract(alreadyAllocationQuantity);
|
||||
outMaterialDetailDO.setNowAllocationQuantity(nowAllocationQuantity);
|
||||
BigDecimal totalAllocationQuantity = BigDecimal.ZERO;//当前作业分配数量
|
||||
//判断收否分配 第一次分配 修改分配数量
|
||||
// if (outMaterialDetailPO.getAllocationQuantity().compareTo(BigDecimal.ZERO) == 0){
|
||||
|
||||
+5
@@ -73,6 +73,11 @@ public class OutMaterialDetail extends BaseVOEntity {
|
||||
@Excel(name = "已分配数量")
|
||||
private BigDecimal alreadyAllocationQuantity;
|
||||
|
||||
@ApiModelProperty("本次分配数量")
|
||||
@Excel(name = "本次分配数量")
|
||||
@TableField(exist = false)
|
||||
private BigDecimal nowAllocationQuantity;
|
||||
|
||||
@ApiModelProperty("分配数量")
|
||||
@Excel(name = "分配数量")
|
||||
private BigDecimal allocationQuantity;
|
||||
|
||||
+5
-6
@@ -418,15 +418,14 @@ public class OutMaterialDetailImpl extends ServiceImpl<OutMaterialDetailMapper,
|
||||
public synchronized void xgkc(List<OutMaterialDetail> outMaterialDetailList,String outOrderNumber,LoginUser loginUser) {
|
||||
StockOutOrder stockOutOrder = stockOutOrderMapper.selectOne(new QueryWrapper<StockOutOrder>().lambda().eq(StockOutOrder::getOutOrderNumber, outOrderNumber));
|
||||
for (OutMaterialDetail outMaterialDetail : outMaterialDetailList) {
|
||||
Long materialDetailId = outMaterialDetail.getMaterialDetailId();
|
||||
OutMaterialDetail isAllocatedDetail = outMaterialDetailMapper.selectById(materialDetailId);
|
||||
String isAllocated = isAllocatedDetail.getIsAllocated();
|
||||
// 如果已经分配过,则跳过本次循环(该明细已分配过,不再重复处理)
|
||||
if (isAllocated != null && "1".equals(isAllocated)) {
|
||||
BigDecimal nowAllocationQuantity = outMaterialDetail.getNowAllocationQuantity();
|
||||
if (nowAllocationQuantity == null && nowAllocationQuantity.compareTo(BigDecimal.ZERO) <= 0) {
|
||||
continue;
|
||||
}
|
||||
Long materialInventoryId = outMaterialDetail.getMaterialInventoryId();
|
||||
BigDecimal allocationQuantity = outMaterialDetail.getAllocationQuantity();
|
||||
|
||||
//分配数量为本次分配数量
|
||||
BigDecimal allocationQuantity = outMaterialDetail.getNowAllocationQuantity();
|
||||
if (ObjectUtils.isEmpty(allocationQuantity)) {
|
||||
allocationQuantity = BigDecimal.ZERO;
|
||||
}
|
||||
|
||||
+5
@@ -80,6 +80,11 @@ public class OutMaterialDetailPO extends StockOutOrderBaseDO {
|
||||
@Excel(name = "分配数量")
|
||||
private BigDecimal allocationQuantity;
|
||||
|
||||
@ApiModelProperty("本次分配数量")
|
||||
@Excel(name = "本次分配数量")
|
||||
@TableField(exist = false)
|
||||
private BigDecimal nowAllocationQuantity;
|
||||
|
||||
@ApiModelProperty("拣货数量")
|
||||
@Excel(name = "拣货数量")
|
||||
private BigDecimal pickingQuantity;
|
||||
|
||||
+7
@@ -1,5 +1,6 @@
|
||||
package com.mhd.wms.domain.outMaterialDetail.repository.todo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
@@ -70,6 +71,12 @@ public class OutMaterialDetailDO extends BaseVOEntity {
|
||||
@Excel(name = "已分配数量")
|
||||
private BigDecimal alreadyAllocationQuantity;
|
||||
|
||||
|
||||
@ApiModelProperty("本次分配数量")
|
||||
@Excel(name = "本次分配数量")
|
||||
@TableField(exist = false)
|
||||
private BigDecimal nowAllocationQuantity;
|
||||
|
||||
@ApiModelProperty("分配数量")
|
||||
@Excel(name = "分配数量")
|
||||
private BigDecimal allocationQuantity;
|
||||
|
||||
Reference in New Issue
Block a user