Browse Source

优化重签速度

yangyj 1 year ago
parent
commit
cc2a61f037

+ 16 - 2
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ExcelTabController.java

@@ -3974,7 +3974,7 @@ public class ExcelTabController extends BladeController {
                 List<AppWbsTreeContractVO> tableAll = wbsTreeContractService.searchNodeAllTable(noId, classify, contractId, projectId, null);
                 JSONArray array = new JSONArray();
                 if (tableAll != null && tableAll.size() >= 1) {
-                    for (AppWbsTreeContractVO tab : tableAll) {
+                  /*  for (AppWbsTreeContractVO tab : tableAll) {
                         try {
                             Map<String, Object> jo = excelTabService.getBussDataInfo(tab.getPKeyId(), 0);
                             String s = new Gson().toJson(jo);
@@ -3993,7 +3993,21 @@ public class ExcelTabController extends BladeController {
                         } finally {
                             continue;
                         }
-                    }
+                    }*/
+                    /*只需加载第一张即可,生效会自动补全*/
+                    AppWbsTreeContractVO tab =tableAll.get(0);
+                    Map<String, Object> jo = excelTabService.getBussDataInfo(tab.getPKeyId(), 0);
+                    String s = new Gson().toJson(jo);
+                    //字符串转jsonobject
+                    JSONObject obj = JSON.parseObject(s);
+                    obj.put("classify", classify);
+                    obj.put("nodeId", noId);
+                    obj.put("contractId", contractId);
+                    obj.put("pkeyId", tab.getPKeyId());
+                    obj.put("projectId", projectId);
+                    obj.put("isCollapseLoad", true);
+                    obj.put("isRenderForm", true);
+                    array.add(obj);
                 }
                 js2.put("orderList", array);
                 js.put("dataInfo", js2);