复核异常生成异常单

This commit is contained in:
秦鸿展
2026-04-11 15:35:07 +08:00
parent b2720fa655
commit 9bf7a9c0c8
2 changed files with 18 additions and 6 deletions
@@ -256,7 +256,9 @@ public class OutOrderAbnormalImpl extends ServiceImpl<OutOrderAbnormalMapper, Ou
OutOrderAbnormal outOrderAbnormal = new OutOrderAbnormal();
BeanUtils.copyProperties(OutOrderAbnormalBaseDO, outOrderAbnormal);
BeanUtils.copyProperties(pickingMaterialDetail, outOrderAbnormal, IgnoreNullUtil.getNullPropertyNames(pickingMaterialDetail));
overlayAbnormalHeaderOrg(OutOrderAbnormalBaseDO, outOrderAbnormal);
outOrderAbnormal.setAbnormalNumber(OrderSequence.getOrderCode("JHYC"));
outOrderAbnormal.setType(1);
outOrderAbnormal.setAbnormalType(1);
outOrderAbnormal.setQuantity(alloc);
outOrderAbnormal.setActualQuantity(pick);
@@ -296,7 +298,9 @@ public class OutOrderAbnormalImpl extends ServiceImpl<OutOrderAbnormalMapper, Ou
OutOrderAbnormal outOrderAbnormal = new OutOrderAbnormal();
BeanUtils.copyProperties(OutOrderAbnormalBaseDO, outOrderAbnormal);
BeanUtils.copyProperties(outMaterialDetail, outOrderAbnormal, IgnoreNullUtil.getNullPropertyNames(outMaterialDetail));
overlayAbnormalHeaderOrg(OutOrderAbnormalBaseDO, outOrderAbnormal);
outOrderAbnormal.setAbnormalNumber(OrderSequence.getOrderCode("FHYC"));
outOrderAbnormal.setType(2);
outOrderAbnormal.setAbnormalType(2);//复核异常
outOrderAbnormal.setQuantity(pick);
outOrderAbnormal.setActualQuantity(check);
@@ -315,4 +319,16 @@ public class OutOrderAbnormalImpl extends ServiceImpl<OutOrderAbnormalMapper, Ou
return outOrderAbnormalList;
}
/**
* 明细行上的组织可能与出库单头不一致,复制明细后会覆盖异常单头组织;列表按一级组织过滤需与出库单头一致。
*/
private static void overlayAbnormalHeaderOrg(OutOrderAbnormalBaseDO base, OutOrderAbnormal target) {
if (base == null || target == null) {
return;
}
target.setOrganizationId(base.getOrganizationId());
target.setOrganizationName(base.getOrganizationName());
target.setTopOrganizationId(base.getTopOrganizationId());
}
}