Merge remote-tracking branch 'origin/feature/DM/nflg-bom-transition' into feature/DM/nflg-bom-transition

This commit is contained in:
大米 2024-07-02 14:45:31 +08:00
commit e6550b9cf0
3 changed files with 7 additions and 6 deletions

View File

@ -2866,14 +2866,13 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
return bomRowIds.stream().map(bomRowId -> { return bomRowIds.stream().map(bomRowId -> {
CheckBomProjectTypeVO vo = new CheckBomProjectTypeVO(); CheckBomProjectTypeVO vo = new CheckBomProjectTypeVO();
vo.setBomRowId(bomRowId); vo.setBomRowId(bomRowId);
if (CollUtil.isEmpty(children)) { List<BomNewEbomChildEntity> cc = children.stream().filter(c -> c.getParentRowId().equals(bomRowId)).collect(Collectors.toList());
if (CollUtil.isEmpty(cc)) {
vo.setExistsQ(false); vo.setExistsQ(false);
vo.setAllIsF(false); vo.setAllIsF(false);
} else { } else {
vo.setExistsQ(children.stream().anyMatch(c -> c.getParentRowId().equals(bomRowId) vo.setExistsQ(cc.stream().anyMatch(c -> StrUtil.equals(c.getProjectType(), ProjectTypeInputTypeEnum.ProjectTypeEnum.TYPE_Q.getValue())));
&& StrUtil.equals(c.getProjectType(), ProjectTypeInputTypeEnum.ProjectTypeEnum.TYPE_Q.getValue()))); vo.setAllIsF(cc.stream().allMatch(c -> StrUtil.equals(c.getProjectType(), ProjectTypeInputTypeEnum.ProjectTypeEnum.TYPE_F.getValue())));
vo.setAllIsF(children.stream().allMatch(c -> c.getParentRowId().equals(bomRowId)
&& StrUtil.equals(c.getProjectType(), ProjectTypeInputTypeEnum.ProjectTypeEnum.TYPE_F.getValue())));
} }
return vo; return vo;
}).collect(Collectors.toList()); }).collect(Collectors.toList());

View File

@ -233,7 +233,8 @@ public class BomNewPbomExportToSAPImpl implements IBomNewPbomExportToSAP {
LOGGER.debug("{} 物料提层到顶级发货包且合并 编号:{},父级编号:{},数量:{},合并后总数:{},描述:{}", TAG, it.getMaterialNo(), p.getMaterialNo(), it.getNum().toString(), cct.getMENGE(), it.getMaterialDesc()); LOGGER.debug("{} 物料提层到顶级发货包且合并 编号:{},父级编号:{},数量:{},合并后总数:{},描述:{}", TAG, it.getMaterialNo(), p.getMaterialNo(), it.getNum().toString(), cct.getMENGE(), it.getMaterialDesc());
} }
} }
} else if (!Objects.equals(it.getVirtualPartType(), VirtualPackageTypeEnum.DIRECT_DELIVERY_PACKAGE.getValue())) { // } else if (!Objects.equals(it.getVirtualPartType(), VirtualPackageTypeEnum.DIRECT_DELIVERY_PACKAGE.getValue())) {
} else {
LOGGER.debug("{} 添加物料 编号:{},父级编号:{},数量:{},描述:{}", TAG, it.getMaterialNo(), p.getMaterialNo(), it.getNum().toString(), it.getMaterialDesc()); LOGGER.debug("{} 添加物料 编号:{},父级编号:{},数量:{},描述:{}", TAG, it.getMaterialNo(), p.getMaterialNo(), it.getNum().toString(), it.getMaterialDesc());
children.add(convert(cp, it, p.getMaterialNo(), ignore)); children.add(convert(cp, it, p.getMaterialNo(), ignore));
} }

View File

@ -199,6 +199,7 @@ public class CheckEBomException {
if (CollUtil.isNotEmpty(child) && child.stream() if (CollUtil.isNotEmpty(child) && child.stream()
.allMatch(c -> StrUtil.equals(c.getProjectType(), ProjectTypeInputTypeEnum.ProjectTypeEnum.TYPE_F.getValue()))) { .allMatch(c -> StrUtil.equals(c.getProjectType(), ProjectTypeInputTypeEnum.ProjectTypeEnum.TYPE_F.getValue()))) {
parent.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_17.getValue()); parent.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_17.getValue());
child.forEach(c -> c.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_17.getValue()));
} }
} }
} }