fix: 修复root_is设置问题
This commit is contained in:
parent
ffcf1d6991
commit
0a2b65f0d1
|
|
@ -167,6 +167,7 @@ public class OriginalBomApi extends BaseApi {
|
||||||
|
|
||||||
//更新-原始BOM跟节点
|
//更新-原始BOM跟节点
|
||||||
CompletableFuture.runAsync(() -> {
|
CompletableFuture.runAsync(() -> {
|
||||||
|
originalParentService.getBaseMapper().updateRootState_1(OriginalStatusEnum.OVER_CONVERT.getValue());
|
||||||
originalParentService.getBaseMapper().updateRootState_2(OriginalStatusEnum.OVER_CONVERT.getValue());
|
originalParentService.getBaseMapper().updateRootState_2(OriginalStatusEnum.OVER_CONVERT.getValue());
|
||||||
originalParentService.getBaseMapper().updateRootState_3(OriginalStatusEnum.OVER_CONVERT.getValue());
|
originalParentService.getBaseMapper().updateRootState_3(OriginalStatusEnum.OVER_CONVERT.getValue());
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -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_2(@Param("status") Integer status);
|
||||||
void updateRootState_3(@Param("status") Integer status);
|
void updateRootState_3(@Param("status") Integer status);
|
||||||
|
|
|
||||||
|
|
@ -428,7 +428,7 @@ public class BomNewOriginalParentService extends ServiceImpl<BomNewOriginalParen
|
||||||
public void computeLevelNumAndRootState() {
|
public void computeLevelNumAndRootState() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.getBaseMapper().updateRootState_1();
|
this.getBaseMapper().updateRootState_1(OriginalStatusEnum.UN_CONVERT.getValue());
|
||||||
this.getBaseMapper().updateRootState_2(OriginalStatusEnum.UN_CONVERT.getValue());
|
this.getBaseMapper().updateRootState_2(OriginalStatusEnum.UN_CONVERT.getValue());
|
||||||
this.getBaseMapper().updateRootState_3(OriginalStatusEnum.UN_CONVERT.getValue());
|
this.getBaseMapper().updateRootState_3(OriginalStatusEnum.UN_CONVERT.getValue());
|
||||||
// this.compucteLevelNum();
|
// this.compucteLevelNum();
|
||||||
|
|
|
||||||
|
|
@ -195,7 +195,7 @@
|
||||||
<update id="updateRootState">
|
<update id="updateRootState">
|
||||||
update t_bom_new_ebom_parent
|
update t_bom_new_ebom_parent
|
||||||
set root_is=0, user_root_is=0
|
set root_is=0, user_root_is=0
|
||||||
where last_version_is = 1;
|
where last_version_is = 1 AND `status` < 4;
|
||||||
|
|
||||||
|
|
||||||
update t_bom_new_ebom_parent a left join (
|
update t_bom_new_ebom_parent a left join (
|
||||||
|
|
|
||||||
|
|
@ -146,7 +146,7 @@
|
||||||
update t_bom_new_original_parent
|
update t_bom_new_original_parent
|
||||||
set root_is=0,
|
set root_is=0,
|
||||||
user_root_is=0
|
user_root_is=0
|
||||||
where last_version_is = 1
|
where last_version_is = 1 and `status`= #{status}
|
||||||
</update>
|
</update>
|
||||||
<!--处理根节点-->
|
<!--处理根节点-->
|
||||||
<update id="updateRootState_2">
|
<update id="updateRootState_2">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue