yangyj 1 жил өмнө
parent
commit
8616bf6b90

+ 4 - 4
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ExcelTabServiceImpl.java

@@ -352,7 +352,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                 /*用来保存日志执行情况*/
                 FormulaLog log = new FormulaLog();
                 /*每次都是部分表单提交,保证跨节点跨表取数正常,其次是反向依赖的被动刷新*/
-                List<NodeTable> tableAll = createNodeTables(nodeId, tableInfoList.get(0).getContractId(), tableInfoList.get(0).getProjectId(), type);
+                List<NodeTable> tableAll = createNodeTables(nodeId, tableInfoList.get(0).getContractId(), tableInfoList.get(0).getProjectId(), type,tableInfoList.get(0).getClassify());
                 if (tableAll.size() > tableInfoList.size()) {
                     TableInfo example = tableInfoList.get(0);
                     /*补充缺失的数据*/
@@ -448,7 +448,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
             JSONObject tableInfo = dataArray.getJSONObject(0);
             Long nodeId = tableInfo.getLong("nodeId");
             List<TableInfo> tableInfoList = this.getTableInfoList(dataArray);
-            List<NodeTable> tableAll = createNodeTables(nodeId, tableInfoList.get(0).getContractId(), tableInfoList.get(0).getProjectId(), type);
+            List<NodeTable> tableAll = createNodeTables(nodeId, tableInfoList.get(0).getContractId(), tableInfoList.get(0).getProjectId(), type,tableInfoList.get(0).getClassify());
             String tableNames = tableAll.stream().map(NodeTable::getInitTableName).distinct().collect(Collectors.joining("','"));
             /*当前工序包含的所有元素信息,还未包含数据*/
             List<FormData> processFds = this.formulaService.createFormDataByTableName(tableNames);
@@ -510,10 +510,10 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         }
     }
 
-    private List<NodeTable> createNodeTables(Long nodeId, String contractId, String projectId, ExecuteType type) {
+    private List<NodeTable> createNodeTables(Long nodeId, String contractId, String projectId, ExecuteType type ,String tableOwner) {
         List<NodeTable> tableAll = new ArrayList<>();
         if (type.equals(ExecuteType.INSPECTION)) {
-            List<AppWbsTreeContractVO> treeNode = wbsTreeContractService.searchNodeAllTable(nodeId.toString(), "1", contractId, projectId, null);
+            List<AppWbsTreeContractVO> treeNode = wbsTreeContractService.searchNodeAllTable(nodeId.toString(), tableOwner, contractId, projectId, null);
             tableAll = BeanUtil.copyProperties(treeNode, NodeTable.class);
         } else if (type.equals(ExecuteType.TESTING)) {
             List<WbsTreePrivateVO4> wbsTreePrivateVO4s = wbsTreePrivateService.searchNodeAllTable(nodeId.toString(), "1", "9", contractId, projectId, null, null);