PDA上架调整修改
This commit is contained in:
+16
@@ -314,14 +314,26 @@ public class ShelfMaterialDetail extends BaseVOEntity {
|
||||
@Excel(name = "总净重(KG)")
|
||||
private BigDecimal totalNetWeight;
|
||||
|
||||
@ApiModelProperty("累计已上架净重(KG),与 totalNetWeight 同口径累加本次净重")
|
||||
@TableField("total_net_weight")
|
||||
private BigDecimal alreadyShelvesNetWeight;
|
||||
|
||||
@ApiModelProperty("总毛重(KG)")
|
||||
@Excel(name = "总毛重(KG)")
|
||||
private BigDecimal totalGrossWeight;
|
||||
|
||||
@ApiModelProperty("累计已上架毛重(KG),与 totalGrossWeight 同口径累加本次毛重")
|
||||
@TableField("total_gross_weight")
|
||||
private BigDecimal alreadyShelvesGrossWeight;
|
||||
|
||||
@ApiModelProperty("总体积(CBM)")
|
||||
@Excel(name = "总体积(CBM)")
|
||||
private BigDecimal totalVolume;
|
||||
|
||||
@ApiModelProperty("累计已上架体积(CBM),与 totalVolume 同口径累加本次体积")
|
||||
@TableField("total_volume")
|
||||
private BigDecimal alreadyShelvesVolume;
|
||||
|
||||
@ApiModelProperty("总面积(SQM)")
|
||||
@Excel(name = "总面积(SQM)")
|
||||
private BigDecimal totalArea;
|
||||
@@ -333,4 +345,8 @@ public class ShelfMaterialDetail extends BaseVOEntity {
|
||||
@ApiModelProperty("LOT编号")
|
||||
@Excel(name = "LOT编号")
|
||||
private String lotNumber;
|
||||
|
||||
@ApiModelProperty("累计已上架面积(SQM),与 totalArea 同口径累加本次面积")
|
||||
@TableField("total_area")
|
||||
private BigDecimal alreadyShelvesArea;
|
||||
}
|
||||
+12
-1
@@ -290,6 +290,7 @@ public class ShelfMaterialDetailImpl extends ServiceImpl<ShelfMaterialDetailMapp
|
||||
throw new ServiceException("物料明细不能为空");
|
||||
}
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
boolean fromApp = Boolean.TRUE.equals(stockShelfOrderDO.getFromApp());
|
||||
//批量新增或修改物料信息
|
||||
List<ShelfMaterialDetail> shelfMaterialDetailList = new ArrayList<>();
|
||||
// 批量新增序列号
|
||||
@@ -326,11 +327,21 @@ public class ShelfMaterialDetailImpl extends ServiceImpl<ShelfMaterialDetailMapp
|
||||
totalActualQuantity = totalActualQuantity.add(childActualQuantity);
|
||||
}
|
||||
}
|
||||
if (shelfMaterialDetailDO.getShelvesStatus() == 2){//部分上架 第二次上架 这次上架数量覆盖掉已上架数量
|
||||
// 不要覆盖累计已上架数量:alreadyShelvesQuantity 应由上层 assembleParamByShelf 累计计算
|
||||
// 仅当 alreadyShelvesQuantity 为空时,才回退到 shelvesQuantity(兼容旧/缺字段场景)
|
||||
if (shelfMaterialDetailDO.getAlreadyShelvesQuantity() == null) {
|
||||
shelfMaterialDetailDO.setAlreadyShelvesQuantity(shelfMaterialDetailDO.getShelvesQuantity());
|
||||
}
|
||||
ShelfMaterialDetail shelfMaterialDetail = new ShelfMaterialDetail();
|
||||
BeanUtils.copyProperties(shelfMaterialDetailDO, shelfMaterialDetail);
|
||||
// PDA:明细表 shelves_quantity 也要跟累计 already_shelves_quantity 同步
|
||||
// PC:保持旧语义(shelves_quantity=本次上架数量)
|
||||
if (fromApp) {
|
||||
BigDecimal already = shelfMaterialDetailDO.getAlreadyShelvesQuantity();
|
||||
if (already != null) {
|
||||
shelfMaterialDetail.setShelvesQuantity(already);
|
||||
}
|
||||
}
|
||||
shelfMaterialDetail.setUpdateBy(loginUser.getUserid());
|
||||
shelfMaterialDetail.setUpdateByName(loginUser.getUsername());
|
||||
shelfMaterialDetail.setUpdateTime(new Date());
|
||||
|
||||
+16
@@ -77,6 +77,10 @@ public class ShelfMaterialDetailPO extends BaseVOEntity {
|
||||
@Excel(name = "已上架数量")
|
||||
private BigDecimal alreadyShelvesQuantity;
|
||||
|
||||
@ApiModelProperty("待上架数量")
|
||||
@Excel(name = "待上架数量")
|
||||
private BigDecimal pendingShelvesQuantity;
|
||||
|
||||
@ApiModelProperty("上架数量")
|
||||
@Excel(name = "上架数量")
|
||||
private BigDecimal shelvesQuantity;
|
||||
@@ -317,18 +321,30 @@ public class ShelfMaterialDetailPO extends BaseVOEntity {
|
||||
@Excel(name = "总净重(KG)")
|
||||
private BigDecimal totalNetWeight;
|
||||
|
||||
@ApiModelProperty("累计已上架净重(KG),与 totalNetWeight 同口径累加本次净重")
|
||||
private BigDecimal alreadyShelvesNetWeight;
|
||||
|
||||
@ApiModelProperty("总毛重(KG)")
|
||||
@Excel(name = "总毛重(KG)")
|
||||
private BigDecimal totalGrossWeight;
|
||||
|
||||
@ApiModelProperty("累计已上架毛重(KG),与 totalGrossWeight 同口径累加本次毛重")
|
||||
private BigDecimal alreadyShelvesGrossWeight;
|
||||
|
||||
@ApiModelProperty("总体积(CBM)")
|
||||
@Excel(name = "总体积(CBM)")
|
||||
private BigDecimal totalVolume;
|
||||
|
||||
@ApiModelProperty("累计已上架体积(CBM),与 totalVolume 同口径累加本次体积")
|
||||
private BigDecimal alreadyShelvesVolume;
|
||||
|
||||
@ApiModelProperty("总面积(SQM)")
|
||||
@Excel(name = "总面积(SQM)")
|
||||
private BigDecimal totalArea;
|
||||
|
||||
@ApiModelProperty("累计已上架面积(SQM),与 totalArea 同口径累加本次面积")
|
||||
private BigDecimal alreadyShelvesArea;
|
||||
|
||||
@ApiModelProperty("入库单号")
|
||||
@Excel(name = "入库单号")
|
||||
private String inOrderNumber;
|
||||
|
||||
Reference in New Issue
Block a user