1、pom工作表发货包在顶级问题修复

This commit is contained in:
大米 2024-06-03 17:49:28 +08:00
parent 75c3b99eff
commit 908b57bb30
3 changed files with 4 additions and 3 deletions

View File

@ -896,7 +896,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>