fix: 修复root_is设置问题

This commit is contained in:
曹鹏飞 2024-03-28 13:33:33 +08:00
parent ffcf1d6991
commit 0a2b65f0d1
5 changed files with 5 additions and 4 deletions

View File

@ -167,6 +167,7 @@ public class OriginalBomApi extends BaseApi {
//更新-原始BOM跟节点
CompletableFuture.runAsync(() -> {
originalParentService.getBaseMapper().updateRootState_1(OriginalStatusEnum.OVER_CONVERT.getValue());
originalParentService.getBaseMapper().updateRootState_2(OriginalStatusEnum.OVER_CONVERT.getValue());
originalParentService.getBaseMapper().updateRootState_3(OriginalStatusEnum.OVER_CONVERT.getValue());
});

View File

@ -38,7 +38,7 @@ public interface BomNewOriginalParentMapper extends BaseMapper<BomNewOriginalPar
/**
* 更新是否根节点状态
*/
void updateRootState_1();
void updateRootState_1(@Param("status") Integer status);
void updateRootState_2(@Param("status") Integer status);
void updateRootState_3(@Param("status") Integer status);

View File

@ -428,7 +428,7 @@ public class BomNewOriginalParentService extends ServiceImpl<BomNewOriginalParen
public void computeLevelNumAndRootState() {
try {
this.getBaseMapper().updateRootState_1();
this.getBaseMapper().updateRootState_1(OriginalStatusEnum.UN_CONVERT.getValue());
this.getBaseMapper().updateRootState_2(OriginalStatusEnum.UN_CONVERT.getValue());
this.getBaseMapper().updateRootState_3(OriginalStatusEnum.UN_CONVERT.getValue());
// this.compucteLevelNum();

View File

@ -195,7 +195,7 @@
<update id="updateRootState">
update t_bom_new_ebom_parent
set root_is=0, user_root_is=0
where last_version_is = 1;
where last_version_is = 1 AND `status` &lt; 4;
update t_bom_new_ebom_parent a left join (

View File

@ -146,7 +146,7 @@
update t_bom_new_original_parent
set root_is=0,
user_root_is=0
where last_version_is = 1
where last_version_is = 1 and `status`= #{status}
</update>
<!--处理根节点-->
<update id="updateRootState_2">