fix(wms/coil): 为镀铬操作类型豁免分卷净重与规格厚度校验
在钢卷分卷和批量分卷的业务逻辑中,当操作类型为501(镀铬)时,豁免以下校验: 1. 子卷净重不超过母卷净重的校验 2. 子卷规格厚度不超过母卷规格厚度的校验 3. 批量分卷时所有子卷总重不超过母卷净重的校验 调整前,所有分卷操作均强制进行净重和规格厚度校验;调整后,镀铬操作类型(501)可跳过这些校验,以适应镀铬产线的特殊业务场景。
This commit is contained in:
@@ -4994,7 +4994,7 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
|||||||
if (childCoilBo.getActualWarehouseId() != null) {
|
if (childCoilBo.getActualWarehouseId() != null) {
|
||||||
validateActualWarehouseForAssign(childCoilBo.getActualWarehouseId(), null);
|
validateActualWarehouseForAssign(childCoilBo.getActualWarehouseId(), null);
|
||||||
}
|
}
|
||||||
|
if (pendingAction.getActionType() != 501 && childCoilBo.getActionType() != null) {
|
||||||
// 校验子卷净重不超过母卷
|
// 校验子卷净重不超过母卷
|
||||||
if (childCoilBo.getNetWeight() != null && parentCoil.getNetWeight() != null) {
|
if (childCoilBo.getNetWeight() != null && parentCoil.getNetWeight() != null) {
|
||||||
if (childCoilBo.getNetWeight().compareTo(parentCoil.getNetWeight()) > 0) {
|
if (childCoilBo.getNetWeight().compareTo(parentCoil.getNetWeight()) > 0) {
|
||||||
@@ -5011,6 +5011,7 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
|||||||
throw new RuntimeException("子卷规格厚度[" + childSpecThickness + "]不能超过母卷规格厚度[" + parentSpecThickness + "]");
|
throw new RuntimeException("子卷规格厚度[" + childSpecThickness + "]不能超过母卷规格厚度[" + parentSpecThickness + "]");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 5. 创建子钢卷(参考普通分卷逻辑,但不设置母卷为历史数据)
|
// 5. 创建子钢卷(参考普通分卷逻辑,但不设置母卷为历史数据)
|
||||||
calculateTheoretical(childCoilBo);
|
calculateTheoretical(childCoilBo);
|
||||||
@@ -5129,6 +5130,7 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
|||||||
.map(WmsMaterialCoil::getCurrentCoilNo)
|
.map(WmsMaterialCoil::getCurrentCoilNo)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
if (pendingAction.getActionType() != 501) {
|
||||||
// 校验所有子卷总重不超过母卷净重
|
// 校验所有子卷总重不超过母卷净重
|
||||||
if (parentCoil.getNetWeight() != null) {
|
if (parentCoil.getNetWeight() != null) {
|
||||||
BigDecimal totalChildWeight = childCoils.stream()
|
BigDecimal totalChildWeight = childCoils.stream()
|
||||||
@@ -5139,6 +5141,7 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
|||||||
throw new RuntimeException("所有子卷总重[" + totalChildWeight + "]不能超过母卷净重[" + parentCoil.getNetWeight() + "]");
|
throw new RuntimeException("所有子卷总重[" + totalChildWeight + "]不能超过母卷净重[" + parentCoil.getNetWeight() + "]");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 如果母卷即将成为历史卷 证明已经加工完成则释放库位
|
// 如果母卷即将成为历史卷 证明已经加工完成则释放库位
|
||||||
if (parentCoil.getActualWarehouseId() != null){
|
if (parentCoil.getActualWarehouseId() != null){
|
||||||
|
|||||||
Reference in New Issue
Block a user