Эх сурвалжийг харах

Merge branch 'refs/heads/feature-lihb-20251201-syncPrivateStatus' into dev

LHB 1 өдөр өмнө
parent
commit
5830a07462

+ 2 - 1
blade-service/blade-business/src/main/java/org/springblade/business/controller/InformationWriteQueryController.java

@@ -4395,9 +4395,10 @@ public R<Boolean> saveContractTreeNode(@RequestBody AddContractTreeNodeVO vo) {
                 //if (Optional.ofNullable(half.getNodeType()).orElse(7) <= 6) {
                 //if (Optional.ofNullable(half.getNodeType()).orElse(7) <= 6) {
                     newData.setIsTypePrivatePid(half.getPKeyId());
                     newData.setIsTypePrivatePid(half.getPKeyId());
                 //}
                 //}
+                //2025年12月05日10:18更改需求,需要与项目级一致
                 if (half.getType() != null && new Integer("2").equals(half.getType())) {
                 if (half.getType() != null && new Integer("2").equals(half.getType())) {
                     //2023年8月1日14:41:03更改需求,isBussShow默认=1
                     //2023年8月1日14:41:03更改需求,isBussShow默认=1
-                    newData.setIsBussShow(1);
+                    newData.setIsBussShow(half.getDefaultConceal() + 1);
                 }
                 }
 
 
                 //获取当前所有复制的节点的最大sort
                 //获取当前所有复制的节点的最大sort

+ 20 - 2
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/WbsSynchronousServiceImpl.java

@@ -286,6 +286,7 @@ public class WbsSynchronousServiceImpl {
                     templateNodes.forEach(f -> {
                     templateNodes.forEach(f -> {
                         f.setPKeyId(f.getId());
                         f.setPKeyId(f.getId());
                         f.setTreePId(f.getId());
                         f.setTreePId(f.getId());
+                        f.setDefaultConceal(0);
                     });
                     });
 
 
                 } else {
                 } else {
@@ -341,6 +342,10 @@ public class WbsSynchronousServiceImpl {
                 //新增数据二次筛选  只保留任务选中的表单   但可能新增的数据包含新节点
                 //新增数据二次筛选  只保留任务选中的表单   但可能新增的数据包含新节点
                 if (CollectionUtil.isNotEmpty(formList)) {
                 if (CollectionUtil.isNotEmpty(formList)) {
                     addPrivateNodes = addPrivateNodes.stream().filter(f -> f.getType() == 1 || formList.contains(f.getPKeyId())).collect(Collectors.toList());
                     addPrivateNodes = addPrivateNodes.stream().filter(f -> f.getType() == 1 || formList.contains(f.getPKeyId())).collect(Collectors.toList());
+                    //新增表单时
+                    addPrivateNodes.forEach(f->{
+                        f.setIsBussShow(f.getDefaultConceal() + 1);
+                    });
                 }
                 }
 
 
                 //筛选出需要更新的节点  同时做数据隔离
                 //筛选出需要更新的节点  同时做数据隔离
@@ -442,6 +447,11 @@ public class WbsSynchronousServiceImpl {
                                 editPrivateNode.setFullName(templateNode.getFullName());
                                 editPrivateNode.setFullName(templateNode.getFullName());
                                 //绑定实体表
                                 //绑定实体表
                                 editPrivateNode.setInitTableName(templateNode.getInitTableName());
                                 editPrivateNode.setInitTableName(templateNode.getInitTableName());
+                                //绑定隐藏信息
+                                editPrivateNode.setStatus(templateNode.getStatus());
+                                editPrivateNode.setDefaultConceal(templateNode.getDefaultConceal());
+                                //合同段是根据这个字段隐藏的
+                                editPrivateNode.setIsBussShow(templateNode.getDefaultConceal() + 1);
 
 
                                 if (StringUtil.isBlank(templateNode.getHtmlUrl())) {
                                 if (StringUtil.isBlank(templateNode.getHtmlUrl())) {
                                     throw new ServiceException(templateNode.getNodeName() + "( " + templateNode.getPKeyId() + ")HTML文件不存在");
                                     throw new ServiceException(templateNode.getNodeName() + "( " + templateNode.getPKeyId() + ")HTML文件不存在");
@@ -789,6 +799,10 @@ public class WbsSynchronousServiceImpl {
                                     if (collect.contains(2) && (templateNode.getHtmlUrl() == null || templateNode.getInitTableName() == null || templateNode.getExcelId() == null)) {
                                     if (collect.contains(2) && (templateNode.getHtmlUrl() == null || templateNode.getInitTableName() == null || templateNode.getExcelId() == null)) {
                                         errorMsg.append(editContractNode.getNodeName() + "(" + editContractNode.getPKeyId() + ")").append("未配置清表;");
                                         errorMsg.append(editContractNode.getNodeName() + "(" + editContractNode.getPKeyId() + ")").append("未配置清表;");
                                     } else {
                                     } else {
+                                        //隐藏状态
+                                        editContractNode.setStatus(templateNode.getStatus());
+                                        editContractNode.setIsBussShow(templateNode.getIsBussShow());
+                                        //四要素
                                         editContractNode.setExcelId(templateNode.getExcelId());
                                         editContractNode.setExcelId(templateNode.getExcelId());
                                         editContractNode.setInitTableName(templateNode.getInitTableName());
                                         editContractNode.setInitTableName(templateNode.getInitTableName());
                                         editContractNode.setHtmlUrl(templateNode.getHtmlUrl());
                                         editContractNode.setHtmlUrl(templateNode.getHtmlUrl());
@@ -818,7 +832,12 @@ public class WbsSynchronousServiceImpl {
                     //合同段新增节点
                     //合同段新增节点
                     List<WbsTreeContract> addContractNode = null;
                     List<WbsTreeContract> addContractNode = null;
                     if (addPrivateNodes != null && (CollectionUtil.isEmpty(collect) || collect.contains(1))) {
                     if (addPrivateNodes != null && (CollectionUtil.isEmpty(collect) || collect.contains(1))) {
-                        addContractNode = BeanUtil.copyProperties(addPrivateNodes, WbsTreeContract.class);
+                        addContractNode = new ArrayList<>();
+                        for (WbsTreePrivate addPrivateNode : addPrivateNodes) {
+                            WbsTreeContract wbsTreeContract1 = BeanUtil.copyProperties(addPrivateNode, WbsTreeContract.class);
+                            wbsTreeContract1.setIsBussShow(addPrivateNode.getDefaultConceal() + 1);
+                            addContractNode.add(wbsTreeContract1);
+                        }
                     }
                     }
 
 
                     if (CollectionUtil.isNotEmpty(addContractNode)) {
                     if (CollectionUtil.isNotEmpty(addContractNode)) {
@@ -1081,7 +1100,6 @@ public class WbsSynchronousServiceImpl {
                 //当前新增节点的父节点
                 //当前新增节点的父节点
                 WbsTreeContract parent = addContractParentNodes.get(0);
                 WbsTreeContract parent = addContractParentNodes.get(0);
 
 
-                addContractNode.setIsBussShow(1);
                 addContractNode.setIsDeleted(0);
                 addContractNode.setIsDeleted(0);
                 addContractNode.setStatus(1);
                 addContractNode.setStatus(1);
                 addContractNode.setParentId(parent.getId());
                 addContractNode.setParentId(parent.getId());