Jelajahi Sumber

bug

Signed-off-by: liuyc <56808083@qq.com>
liuyc 1 tahun lalu
induk
melakukan
79e3443ad6

+ 5 - 2
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ContractInfoServiceImpl.java

@@ -202,13 +202,16 @@ public class ContractInfoServiceImpl extends BaseServiceImpl<ContractInfoMapper,
         WbsTreeContract parentNodeRoot = wbsTreeContractMapper.selectOne(Wrappers.<WbsTreeContract>lambdaQuery().eq(WbsTreeContract::getPKeyId, pKeyId).eq(WbsTreeContract::getStatus, 1));
         if (ObjectUtil.isNotEmpty(parentNodeRoot)) {
             //oldId不等于空,说明是复制或新增的节点,通过oldId,获取原始节点
-            String oldId = "";
+            String oldId = null;
             if (ObjectUtil.isNotEmpty(parentNodeRoot.getOldId())) {
+                oldId = parentNodeRoot.getOldId();
                 //在调用递归方法时,创建IdWrapper对象并传递
                 IdWrapper idWrapper = new IdWrapper();
                 this.recursionFindResourceRootNode(idWrapper, parentNodeRoot);
                 //在外部获取更新后的id值
-                oldId = idWrapper.getId();
+                if (ObjectUtil.isNotEmpty(idWrapper.getId())) {
+                    oldId = idWrapper.getId();
+                }
             }
 
             //获取对应的项目树的节点