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

Merge remote-tracking branch 'origin/master'

“zhifk” 2 жил өмнө
parent
commit
8c3450657e

+ 8 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/WbsTreePrivateVO4.java

@@ -23,10 +23,14 @@ public class WbsTreePrivateVO4 implements Serializable {
 
     private String nodeName;
 
+    private String fullName;
+
     private Integer nodeType;
 
     private Integer type;
 
+    private Long parentId;
+
     private Integer tableType;
 
     private String tableOwner;
@@ -51,6 +55,10 @@ public class WbsTreePrivateVO4 implements Serializable {
 
     private Integer isLinkTable;
 
+    private String ancestors;
+
+    private Integer sort;
+
     //是否是复制的表 0=否 1=是 (复制表可以删除)
     private Integer isCopyTab;
 

+ 1 - 0
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TrialSelfInspectionRecordServiceImpl.java

@@ -872,6 +872,7 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
     }
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String selfSubmit(TrialSelfInspectionRecordDTO dto) {
         //------初始当前填报的表pKeyIds------
         this.initTrialTabIds(dto);

+ 3 - 2
blade-service/blade-manager/src/main/java/org/springblade/manager/feign/ExcelTabClientImpl.java

@@ -113,10 +113,11 @@ public class ExcelTabClientImpl implements ExcelTabClient {
         } catch (Exception e) {
             if (e.getMessage().contains("字段过长")) {
                 //字段过长,新增失败的异常处理
-                throw new RuntimeException("字段过长,新增失败");
+                throw new RuntimeException("字段过长,操作失败");
             } else {
                 //其他类型的异常处理
-                throw new RuntimeException("保存数据出错");
+                e.printStackTrace();
+                throw new RuntimeException("公式执行异常,操作失败");
             }
         }
 

+ 3 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/WbsTreePrivateMapper.xml

@@ -703,6 +703,7 @@
         SELECT
             p_key_id,
             node_name,
+            full_name,
             node_type,
             case when table_type in(1,9) then 1
                  when table_type in(2,10) then 2
@@ -718,6 +719,7 @@
             html_url,
             excel_id,
             project_id,
+            parent_id,
             type,
             init_table_name,
             init_table_id,
@@ -725,6 +727,7 @@
             pdf_url,
             sort,
             create_time,
+            ancestors,
             (CASE WHEN locate('__',node_name) > 0 THEN 1 ELSE 0 END) AS isCopyTab
         FROM
             m_wbs_tree_private

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

@@ -339,7 +339,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                 List<NodeTable> tableAll = createNodeTables(nodeId, tableInfoList.get(0).getContractId(), tableInfoList.get(0).getProjectId(), type);
                 StopWatch stopWatch = new StopWatch();
                 List<KeyMapper> keyMappers = this.formulaService.getKeyMapperList(tableInfoList.stream().map(TableInfo::getPkeyId).filter(Func::isNotEmpty).map(Long::parseLong).collect(Collectors.toList()), tableInfoList.get(0).getProjectId(), String.valueOf(nodeId), type);
-                if (Func.isNotEmpty(keyMappers)) {
+                if (Func.isNotEmpty(keyMappers) && Func.isNotEmpty(tableAll)) {
                     Map<String, Map<String, String>> coordinateMap = createCoordinateMap(keyMappers, type);
                     stopWatch.start("公式处理");
                     List<Formula> formulas = this.formulaService.getFormulaList(keyMappers);
@@ -702,9 +702,9 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
     }
 
     @Override
-    public void gsColor(Long pKeyId,String nodeId,String projectId,Document doc) {
-        try{
-            List<KeyMapper> keyMappers=this.formulaService.getKeyMapperList(Collections.singletonList(pKeyId),projectId,nodeId,ExecuteType.INSPECTION);
+    public void gsColor(Long pKeyId, String nodeId, String projectId, Document doc) {
+        try {
+            List<KeyMapper> keyMappers = this.formulaService.getKeyMapperList(Collections.singletonList(pKeyId), projectId, nodeId, ExecuteType.INSPECTION);
             if (!keyMappers.isEmpty()) {
                 keyMappers.stream()
                         .filter(e -> e.getFormulaId() != null)
@@ -714,10 +714,11 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                             processElements(doc.select("el-date-picker[keyname^=" + key + "]"));
                         });
             }
-        }catch (Exception e){
+        } catch (Exception e) {
             e.printStackTrace();
         }
     }
+
     private void processElements(Elements elements) {
         elements.forEach(element -> element.parent().attr("gscolor", "11"));
     }
@@ -2372,45 +2373,49 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         FileUtils.setExcelScaleToPdf(excelPath, pdfPath);
         BladeFile bladeFile = newIOSSClient.uploadFile(pkeyId + ".pdf", pdfPath);
 
-        //附件
-        TableFile tableFile1 = tableFileService.getBaseMapper().selectList(Wrappers.<TableFile>query().lambda().eq(TableFile::getTabId, pkeyId + "").eq(TableFile::getType, 1)).stream().findAny().orElse(null);
-        if (tableFile1 != null) {
+        if (bladeFile != null) {
+            //附件
+            TableFile tableFile1 = tableFileService.getBaseMapper().selectList(Wrappers.<TableFile>query().lambda().eq(TableFile::getTabId, pkeyId + "").eq(TableFile::getType, 1)).stream().findAny().orElse(null);
+            if (tableFile1 != null) {
             /*tableFile1.setDomainPdfUrl(bladeFile.getLink());
             tableFileService.saveOrUpdate(tableFile1);*/
-            tableFileService.update(Wrappers.<TableFile>lambdaUpdate().set(TableFile::getDomainPdfUrl, bladeFile.getLink()).eq(TableFile::getId, tableFile1.getId()));
-        } else {
-            TableFile tableFile = new TableFile();
-            String fileExtension = FileUtil.getFileExtension(wbsTreePrivate.getFullName() + ".pdf");
-            tableFile.setTabId(pkeyId + "");
-            tableFile.setName(wbsTreePrivate.getFullName() + ".pdf");
-            tableFile.setType(1);
-            tableFile.setDomainUrl(bladeFile.getLink());
-            tableFile.setIsDeleted(0);
-            tableFile.setExtension(fileExtension);
-            tableFile.setDomainPdfUrl(bladeFile.getLink());
-            tableFile.setTrialRecordId(id);
-            tableFileService.saveOrUpdate(tableFile);
-        }
+                tableFileService.update(Wrappers.<TableFile>lambdaUpdate().set(TableFile::getDomainPdfUrl, bladeFile.getLink()).eq(TableFile::getId, tableFile1.getId()));
+            } else {
+                TableFile tableFile = new TableFile();
+                String fileExtension = FileUtil.getFileExtension(wbsTreePrivate.getFullName() + ".pdf");
+                tableFile.setTabId(pkeyId + "");
+                tableFile.setName(wbsTreePrivate.getFullName() + ".pdf");
+                tableFile.setType(1);
+                tableFile.setDomainUrl(bladeFile.getLink());
+                tableFile.setIsDeleted(0);
+                tableFile.setExtension(fileExtension);
+                tableFile.setDomainPdfUrl(bladeFile.getLink());
+                tableFile.setTrialRecordId(id);
+                tableFileService.saveOrUpdate(tableFile);
+            }
 
-        //获取当前试验记录的中的元素表的附件文件
-        List<TableFile> tableFileList = tableFileService.getBaseMapper().selectList(Wrappers.<TableFile>query().lambda().eq(TableFile::getTabId, pkeyId + "").eq(TableFile::getTrialRecordId, id));
+            //获取当前试验记录的中的元素表的附件文件
+            List<TableFile> tableFileList = tableFileService.getBaseMapper().selectList(Wrappers.<TableFile>query().lambda().eq(TableFile::getTabId, pkeyId + "").eq(TableFile::getTrialRecordId, id));
+            if (tableFileList.size() > 0) {
+                tableFileList.sort(Comparator.comparing(TableFile::getType));
+                List<String> dataListPdf = tableFileList.stream().filter(tableFile ->
+                        tableFile.getDomainPdfUrl() != null
+                                && (tableFile.getType() == 1 || tableFile.getType() == 2)
+                ).map(TableFile::getDomainPdfUrl).collect(Collectors.toList());
 
-        if (tableFileList.size() > 0) {
-            tableFileList.sort(Comparator.comparing(TableFile::getType));
-            List<String> dataListPdf = tableFileList.stream().filter(tableFile ->
-                    tableFile.getDomainPdfUrl() != null
-                            && (tableFile.getType() == 1 || tableFile.getType() == 2)
-            ).map(TableFile::getDomainPdfUrl).collect(Collectors.toList());
+                String pdfPath2 = file_path + "/pdf//" + pkeyId + "_2.pdf";
 
-            String pdfPath2 = file_path + "/pdf//" + pkeyId + "_2.pdf";
+                File tabPdf2 = ResourceUtil.getFile(pdfPath2);
+                if (tabPdf2.exists()) {
+                    tabPdf2.delete();
+                }
+                FileUtils.mergePdfPublicMethods(dataListPdf, pdfPath2);
 
-            File tabPdf2 = ResourceUtil.getFile(pdfPath2);
-            if (tabPdf2.exists()) {
-                tabPdf2.delete();
+                BladeFile bladeFile2 = newIOSSClient.uploadFile(pkeyId + "2.pdf", pdfPath2);
+                if (bladeFile2 != null) {
+                    bladeFile.setLink(bladeFile2.getLink());
+                }
             }
-            FileUtils.mergePdfPublicMethods(dataListPdf, pdfPath2);
-
-            BladeFile bladeFile2 = newIOSSClient.uploadFile(pkeyId + "2.pdf", pdfPath2);
 
             //查询是否存在关系
             String sqlQuery = "select id from u_trial_self_data_record where record_id = " + id + " and tab_id = " + pkeyId;
@@ -2419,16 +2424,15 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
             if (query.size() == 0) {
                 //新增关系
                 sql = "insert into u_trial_self_data_record(id,record_id,tab_id,is_buss_show,is_tab_pdf,is_tab_file_type,pdf_url) values" +
-                        "(" + SnowFlakeUtil.getId() + "," + id + "," + pkeyId + "," + 1 + "," + 2 + "," + 1 + ",'" + bladeFile2.getLink() + "')";
+                        "(" + SnowFlakeUtil.getId() + "," + id + "," + pkeyId + "," + 1 + "," + 2 + "," + 1 + ",'" + bladeFile.getLink() + "')";
             } else {
                 //修改pdfUrl
-                sql = "update u_trial_self_data_record set pdf_url ='" + bladeFile2.getLink() + "' where record_id = " + id + " and tab_id = " + pkeyId;
+                sql = "update u_trial_self_data_record set pdf_url ='" + bladeFile.getLink() + "' where record_id = " + id + " and tab_id = " + pkeyId;
             }
             jdbcTemplate.execute(sql);
 
-            return bladeFile2.getLink();
+            return bladeFile.getLink();
         }
-
         return "";
     }
 

+ 84 - 78
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/FormulaServiceImpl.java

@@ -136,11 +136,13 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
     }
 
     public void textInfo(){
-        List<Map<String,Object>>  textInfoMap= this.jdbcTemplate.queryForList("SELECT b.tab_id pkId,b.col_name val ,CONCAT(a.init_table_name,':',b.col_key)code from m_wbs_tree_contract a inner join m_textdict_info b on a.p_key_id=b.tab_id   " +
-                "where a.p_key_id in("+this.tec.getTableAll().stream().map(NodeTable::getPKeyId).map(Func::toStr).collect(Collectors.joining(","))+") and b.type=8 ");
-        if(Func.isNotEmpty(textInfoMap)){
-            Map<String,List<Map<String,Object>>> tmap = textInfoMap.stream().collect(Collectors.groupingBy(m->m.get("code").toString()));
-            tec.constantMap.put(TEXT_INFO_MAP,tmap);
+        if(ExecuteType.INSPECTION.equals(tec.getExecuteType())){
+            List<Map<String,Object>>  textInfoMap= this.jdbcTemplate.queryForList("SELECT b.tab_id pkId,b.col_name val ,CONCAT(a.init_table_name,':',b.col_key)code from m_wbs_tree_contract a inner join m_textdict_info b on a.p_key_id=b.tab_id   " +
+                    "where a.p_key_id in("+this.tec.getTableAll().stream().map(NodeTable::getPKeyId).map(Func::toStr).collect(Collectors.joining(","))+") and b.type=8 ");
+            if(Func.isNotEmpty(textInfoMap)){
+                Map<String,List<Map<String,Object>>> tmap = textInfoMap.stream().collect(Collectors.groupingBy(m->m.get("code").toString()));
+                tec.constantMap.put(TEXT_INFO_MAP,tmap);
+            }
         }
     }
 
@@ -551,14 +553,17 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
         Optional<NodeTable> aop=tec.getTableAll().stream().filter(e->e.getNodeName().contains("A15")).findAny();
         if(aop.isPresent()){
             /*存在监表,则需要收集检查项目和检查时间等元素*/
-            List<String> wop=tec.getTableAll().stream().filter(e->e.getNodeName().contains("检验单")||e.getNodeName().contains("检验表")).map(NodeTable::getInitTableName).distinct().collect(Collectors.toList());
+            List<String> wop=tec.getTableAll().stream().filter(e->e.getTableType().equals(1)&&!e.getNodeName().contains("附表")).map(NodeTable::getInitTableName).distinct().collect(Collectors.toList());
             if(wop.size()>0){
                 /*存在检验表*/
                 tec.getKeyMappers().stream().filter(e->wop.contains(e.getTableName())&&tec.formDataMap.containsKey(e.getCode())).forEach(k->{
-                    if(k.getEName().contains("实测值")&&k.getEName().contains("偏差值")){
-                        tec.checkItems.add(tec.formDataMap.get(k.getCode()));
+                    /*包含的单元格超过三个就算实测项目*/
+                    /*k.getEName().contains("实测值")&&k.getEName().contains("偏差值")*/
+                    FormData ft=tec.formDataMap.get(k.getCode());
+                    if(ft.getCoordsList().size()>5){
+                        tec.checkItems.add(ft);
                     }else if(k.getEName().contains("检验日期")){
-                        tec.checkDate.add(tec.formDataMap.get(k.getCode()));
+                        tec.checkDate.add(ft);
                     }
                 });
             }else{
@@ -576,11 +581,10 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
             }
         }
         if(tec.checkItems.size()>0){
-            /**排序*/
+            /*排序*/
             List<String> iniTableNames=tec.getTableAll().stream().map(NodeTable::getInitTableName).distinct().collect(Collectors.toList());
             tec.checkItems= tec.checkItems.stream().sorted(Comparator.comparingInt((FormData i)->iniTableNames.indexOf(i.getTableName())).thenComparingInt(FormData::getMaxRow)).collect(Collectors.toList());
         }
-        System.out.println();
 
     }
 
@@ -936,69 +940,70 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
 
     /**分项汇总数据*/
     public void   doForDataBlock(){
-        try {
-            FormulaDataBlock fdb=findFdb();
-            List<ElementBlock> elementBlockList=new ArrayList<>();
-            Map<String,ElementBlock> elementBlockMap =new HashMap<>();
-            Map<String,ItemBlock>itemBlockMap =new HashMap<>();
-            if(Func.isNotBlank(fdb.getVal())) {
-                elementBlockList = JSON.parseArray(fdb.getVal(), ElementBlock.class);
-                elementBlockList.forEach(eb->{
-                    elementBlockMap.put(eb.getCode(),eb);
-                    List<ItemBlock> itemBlockList =eb.getList();
-                    if(itemBlockList.size()>0){
-                        itemBlockList.forEach(ib->{
-                            ib.setCode(eb.getCode());
-                            itemBlockMap.put(ib.getKey(),ib);
-                        });
+        if(ExecuteType.INSPECTION.equals(tec.getExecuteType())) {
+            try {
+                FormulaDataBlock fdb = findFdb();
+                List<ElementBlock> elementBlockList = new ArrayList<>();
+                Map<String, ElementBlock> elementBlockMap = new HashMap<>();
+                Map<String, ItemBlock> itemBlockMap = new HashMap<>();
+                if (Func.isNotBlank(fdb.getVal())) {
+                    elementBlockList = JSON.parseArray(fdb.getVal(), ElementBlock.class);
+                    elementBlockList.forEach(eb -> {
+                        elementBlockMap.put(eb.getCode(), eb);
+                        List<ItemBlock> itemBlockList = eb.getList();
+                        if (itemBlockList.size() > 0) {
+                            itemBlockList.forEach(ib -> {
+                                ib.setCode(eb.getCode());
+                                itemBlockMap.put(ib.getKey(), ib);
+                            });
+                        }
+                    });
+                }
+                List<ElementBlock> finalElementBlockList = elementBlockList;
+                tec.checkItems.stream().filter(e -> !e.empty()).forEach(c -> {
+                    ElementBlock eb = elementBlockMap.get(c.getCode());
+                    ItemBlock targetItem = itemBlockMap.get(c.getCode() + ":" + tec.getCurrentNode().getPkId());
+                    List<Object> list = c.getValues().stream().map(ElementData::getValue).filter(StringUtils::isNotEmpty).collect(Collectors.toList());
+                    /*1.无任何记录,当前页无数据,则不需要处理 2.存在记录当前无数据,则要消除 3.没有记录当前有数据,则需要增加 4.有记录有当前记录,则需更新*/
+                    if (Func.isNotEmpty(list) || targetItem != null) {
+                        FormData designList = itemMatch(c, 0);
+                        FormData pass = itemMatch(c, 1);
+                        if (targetItem == null) {
+                            if (eb == null) {
+                                eb = new ElementBlock();
+                                eb.setCode(c.getCode());
+                                eb.setEName(c.getEName());
+                                eb.setList(new ArrayList<>());
+                                finalElementBlockList.add(eb);
+                                elementBlockMap.put(eb.getCode(), eb);
+                            }
+                            targetItem = new ItemBlock();
+                            targetItem.setCode(c.getCode());
+                            targetItem.setPkeyId(tec.getCurrentNode().getPkId());
+                            eb.getList().add(targetItem);
+                            itemBlockMap.put(targetItem.getKey(), targetItem);
+                        }
+                        if (Func.isNotEmpty(list)) {
+                            targetItem.setSubTotal(list.size());
+                            if (Func.isNotEmpty(designList)) {
+                                targetItem.setDesigns(designList.getValues().stream().map(ElementData::getValue).flatMap(e -> CustomFunction.obj2ListNe(e).stream()).filter(StringUtils::isNumber).map(StringUtils::obj2Double).collect(Collectors.toList()));
+                            }
+                            AtomicInteger index = new AtomicInteger();
+                            int len = targetItem.getDesigns().size();
+                            if (len > 0) {
+                                targetItem.setData(new ArrayList<>(list.stream().map(StringUtils::obj2Double).collect(Collectors.groupingBy(k -> index.getAndIncrement() / len, LinkedHashMap::new, Collectors.toList())).values()));
+                            } else {
+                                targetItem.setData(Collections.singletonList(list.stream().map(StringUtils::obj2Double).collect(Collectors.toList())));
+                            }
+                            if (pass != null && !pass.empty()) {
+                                targetItem.setSubPass((int) Math.round(list.size() * StringUtils.obj2Double(pass.getValues().get(0).getValue()) / 100));
+                            } else {
+                                targetItem.setSubPass(list.size());
+                            }
+                        } else {
+                            eb.getList().remove(targetItem);
+                        }
                     }
-                });
-            }
-            List<ElementBlock> finalElementBlockList = elementBlockList;
-            tec.checkItems.stream().filter(e->!e.empty()).forEach(c->{
-                     ElementBlock eb =elementBlockMap.get(c.getCode());
-                     ItemBlock targetItem=itemBlockMap.get(c.getCode()+":"+tec.getCurrentNode().getPkId());
-                     List<Object> list = c.getValues().stream().map(ElementData::getValue).filter(StringUtils::isNotEmpty).collect(Collectors.toList());
-                     /*1.无任何记录,当前页无数据,则不需要处理 2.存在记录当前无数据,则要消除 3.没有记录当前有数据,则需要增加 4.有记录有当前记录,则需更新*/
-                     if(Func.isNotEmpty(list)||targetItem!=null){
-                         FormData designList=itemMatch(c,0);
-                         FormData pass=itemMatch(c,1);
-                         if(targetItem==null){
-                             if(eb==null){
-                                 eb=new ElementBlock();
-                                 eb.setCode(c.getCode());
-                                 eb.setEName(c.getEName());
-                                 eb.setList(new ArrayList<>());
-                                 finalElementBlockList.add(eb);
-                                 elementBlockMap.put(eb.getCode(),eb);
-                             }
-                             targetItem = new ItemBlock();
-                             targetItem.setCode(c.getCode());
-                             targetItem.setPkeyId(tec.getCurrentNode().getPkId());
-                             eb.getList().add(targetItem);
-                             itemBlockMap.put(targetItem.getKey(),targetItem);
-                         }
-                         if(Func.isNotEmpty(list)){
-                             targetItem.setSubTotal(list.size());
-                             if(Func.isNotEmpty(designList)) {
-                                 targetItem.setDesigns(designList.getValues().stream().map(ElementData::getValue).flatMap(e -> CustomFunction.obj2ListNe(e).stream()).filter(StringUtils::isNumber).map(StringUtils::obj2Double).collect(Collectors.toList()));
-                             }
-                             AtomicInteger index= new AtomicInteger();
-                             int len=targetItem.getDesigns().size();
-                             if(len>0){
-                                 targetItem.setData(new ArrayList<>(list.stream().map(StringUtils::obj2Double).collect(Collectors.groupingBy(k -> index.getAndIncrement() / len,LinkedHashMap::new,Collectors.toList())).values()));
-                             }else{
-                                 targetItem.setData(Collections.singletonList(list.stream().map(StringUtils::obj2Double).collect(Collectors.toList())));
-                             }
-                             if(pass!=null&&!pass.empty()){
-                                 targetItem.setSubPass((int)Math.round(list.size()*StringUtils.obj2Double(pass.getValues().get(0).getValue())/100));
-                             }else{
-                                 targetItem.setSubPass(list.size());
-                             }
-                         }else{
-                             eb.getList().remove(targetItem);
-                         }
-                     }
 //                if(c.executable()){
 //                    /*主要是获取实测值,合格率,合格数量*/
 //                    List<String> relyCode = c.getFormula().getRelyList();
@@ -1010,11 +1015,12 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
 //                        }
 //                    }
 //                }
-            });
-            fdb.setVal(JSON.toJSONString(elementBlockList));
-            this.formulaDataBlockService.saveOrUpdate(fdb);
-        }catch (Exception e){
-            e.printStackTrace();
+                });
+                fdb.setVal(JSON.toJSONString(elementBlockList));
+                this.formulaDataBlockService.saveOrUpdate(fdb);
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
         }
     }
 

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

@@ -1807,7 +1807,8 @@ public class WbsTreePrivateServiceImpl extends BaseServiceImpl<WbsTreePrivateMap
         if (type.equals("1")) {
             TableInfo tableInfo = tableInfoService.getById(tabId);
             WbsTree wbsTree = wbsTreeMapper.selectById(linkids);
-            wbsTree.setInitTableName(tableInfo.getTabChName());
+            //wbsTree.setInitTableName(tableInfo.getTabChName());
+            wbsTree.setInitTableName(tableInfo.getTabEnName());
             wbsTree.setInitTableId(tableInfo.getId());
             wbsTree.setFillRate(tableInfo.getFillRate());
             wbsTree.setTableOwner(tableInfo.getTableOwner());
@@ -1896,9 +1897,9 @@ public class WbsTreePrivateServiceImpl extends BaseServiceImpl<WbsTreePrivateMap
         String roleAndTabOwner = roleAndTabOwners.stream().filter(("7")::equals).findAny().orElse(null);
         if (StringUtils.isNotEmpty(roleAndTabOwner)) {
             //试验tabOwner=7,默认加载全部tabOwner=7的表
-            if ("1".equals(tableType)) {
+            if ("1".equals(tableType) || "9".equals(tableType)) {
                 tableType = "1,9"; //记录表
-            } else if ("2".equals(tableType)) {
+            } else if ("2".equals(tableType) || "10".equals(tableType)) {
                 tableType = "2,10";  //报告单
             }
             return baseMapper.selectWbsTreeTrialTabList(tableType, wbsTreePrivate.getProjectId(), wbsTreePrivate.getWbsId(), wbsTreePrivate.getId(), contractId);