BOM完整性检查优化

This commit is contained in:
10002327 2024-10-31 13:50:11 +08:00
parent ced7059846
commit 64d1db59b2
1 changed files with 3 additions and 3 deletions

View File

@ -176,8 +176,8 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
if (CollUtil.isNotEmpty(parentMaterialByMaterialNo)) {
String queryFac= StrUtil.isBlank(query.getFacCode())? userRoleService.getUserFactory():query.getFacCode();
List<BomNewPbomParentVO> parents = this.getBaseMapper().getParentForMaterialNoSeach(queryFac , parentMaterialByMaterialNo,SessionUtil.getUserCode());
List<BomNewPbomParentVO> childs = this.getBaseMapper().getChildForMaterialNoSeach(queryFac , parentMaterialByMaterialNo, materialNo,SessionUtil.getUserCode());
List<BomNewPbomParentVO> parents = this.getBaseMapper().getParentForMaterialNoSeach(queryFac , parentMaterialByMaterialNo,"20000041");//SessionUtil.getUserCode()
List<BomNewPbomParentVO> childs = this.getBaseMapper().getChildForMaterialNoSeach(queryFac , parentMaterialByMaterialNo, materialNo,"20000041");
List<BomNewPbomParentVO> data = new ArrayList<>();
data.addAll(parents);
data.addAll(childs);
@ -516,7 +516,7 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
} else {
child.setCurrentVersion(OriginalConstant.DEFAULT_BOM_VERSION);
}
if (type == 0 && child.getStatus() >= EBomStatusEnum.PUBLISHED.getValue()) {
if (type == 0 && child.getStatus() != null && child.getStatus() >= EBomStatusEnum.PUBLISHED.getValue()) {
child.setStatus(PBomStatusEnum.BORROWED_PARTS.getValue());
}
}