Merge branch 'refs/heads/feature/DM/nflg-bom' into feature/DM/nflg-bom-transition

This commit is contained in:
曹鹏飞 2024-06-04 07:58:25 +08:00
commit bebc7843fa
3 changed files with 4 additions and 3 deletions

View File

@ -893,7 +893,7 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
pBomParentService.getBaseMapper().updateWaitPublicRootState(materialNos);
}
//标记跟节点
upRootMark(parent);
// upRootMark(parent);
// if (CollUtil.isNotEmpty(eBomToPBom.getVirtualPackageCompositionResult())) {
// //先删除
// Set<String> delSet = eBomToPBom.getVirtualPackageCompositionResult().stream().map(u -> StrUtil.join("-", u.getVirtualPackageMaterialNo(), u.getParentMaterialNo())).collect(Collectors.toSet());

View File

@ -151,6 +151,7 @@ public abstract class EBomToPbomBase {
if (Objects.nonNull(oldParent) && oldParent.getStatus()< EBomStatusEnum.PUBLISHED.getValue()) {
SpringUtil.getBean(BomNewPbomChildService.class).getBaseMapper().deleteByMap(ImmutableMap.of("parent_row_id", oldParent.getRowId()));
oldParent.setCurrentVersion(parentVo.getCurrentVersion());
oldParent.setSourceRowId(parentVo.getRowId());
this.pBomParentResult.add(oldParent);
return oldParent;
} else {

View File

@ -251,11 +251,11 @@
<!--更新待发布根节点状态-->
<update id="updateWaitPublicRootState">
update t_bom_new_pbom_parent a left join (
select b.material_no , a.fac_code from t_bom_new_pbom_parent a join t_bom_new_pbom_child b on a.row_id=b.parent_row_id and a.`status` &lt; 4 and a.last_version_is=1
select b.material_no , a.fac_code from t_bom_new_pbom_parent a join t_bom_new_pbom_child b on a.row_id=b.parent_row_id and a.`status` &lt; 4
and b.material_no in <include refid="upRootStateWhr"/>
) b on a.material_no=b.material_no and a.fac_code =b.fac_code
set a.root_state=1
where a.`status` &lt; 4 and last_version_is=1 and b.material_no is null
where a.`status` &lt; 4 and b.material_no is null
and a.material_no in <include refid="upRootStateWhr"/>
</update>