Ver código fonte

元素表默认值信息

liuyc 1 ano atrás
pai
commit
f19abc087e

+ 16 - 4
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/TextdictInfoController.java

@@ -508,12 +508,11 @@ public class TextdictInfoController extends BladeController {
     @PostMapping("/save_defaulVal")
     @ApiOperationSupport(order = 7)
     @ApiOperation(value = "保存默认值", notes = "保存默认值")
-    public R<String> saveDefaulVal(@Valid @RequestBody TextdictBy345VO textdictInfo) throws IOException, ClassNotFoundException {
+    public R<String> saveDefaulVal(@Valid @RequestBody TextdictBy345VO textdictInfo) throws Exception {
 
         //当前清表信息
         WbsTreePrivate wbsTreePrivate = wbsTreePrivateMapper.getByPKeyId(textdictInfo.getTableId());
 
-
         //获取当前项目下引用相同模板的元素表信息
         List<WbsTreePrivate> wbsTreePrivatesEqual = wbsTreePrivateMapper.selectList(Wrappers.<WbsTreePrivate>lambdaQuery()
                 .eq(WbsTreePrivate::getProjectId, wbsTreePrivate.getProjectId())
@@ -523,8 +522,11 @@ public class TextdictInfoController extends BladeController {
         String ids = StringUtils.join(pKeyIds, ",");
 
         //读取html页面信息
-        File file1 = ResourceUtil.getFile(wbsTreePrivate.getHtmlUrl());
-        String htmlString = IoUtil.readToString(new FileInputStream(file1));
+        //File file1 = ResourceUtil.getFile(wbsTreePrivate.getHtmlUrl());
+        //String htmlString = IoUtil.readToString(new FileInputStream(file1));
+        InputStream inputStreamByUrl = FileUtils.getInputStreamByUrl(wbsTreePrivate.getHtmlUrl());
+        String htmlString = IoUtil.readToString(inputStreamByUrl);
+
         //样式集合
         Document doc = Jsoup.parse(htmlString);
         //解析
@@ -602,6 +604,16 @@ public class TextdictInfoController extends BladeController {
             FileUtil.writeToFile(writeFile, doc.html(), Boolean.parseBoolean("UTF-8"));
         }
 
+        if (textdictInfo.getType() == 4) { // 默认值
+            if (element.html().indexOf("el-tooltip") >= 0) {
+                element.children().attr("defText", textdictInfo.getTextId());
+            } else {
+                element.attr("defText", textdictInfo.getTextId());
+            }
+            File writeFile = new File(wbsTreePrivate.getHtmlUrl());
+            FileUtil.writeToFile(writeFile, doc.html(), Boolean.parseBoolean("UTF-8"));
+        }
+
         String str1 = wbsTreePrivate.getHtmlUrl().replace("Desktop//privateUrl", "Desktop/privateUrl");
         String replace = str1.replace("\\", "\\\\");
         if (StringUtils.isNotEmpty(ids)) {

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

@@ -379,7 +379,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                         }
                         stopWatch.stop();
                         long totalTime = stopWatch.getTotalTimeMillis();
-                        log.put(FormulaLog.PF, "公式执行消耗时间:" + (double)totalTime / 1000 + "秒");
+                        log.put(FormulaLog.PF, "公式执行消耗时间:" + (double) totalTime / 1000 + "秒");
                         StaticLog.info("公式执行用时:{}", totalTime);
                         updateFormulaLog(log.toJsonString(), pKeyId);
                     }
@@ -393,74 +393,74 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
 
     @Override
     public void formulaFillData2(JSONArray dataArray, ExecuteType type) {
-           try{
-               /*用来保存日志执行情况*/
-               StopWatch stopWatch = new StopWatch();
-               FormulaLog log = new FormulaLog();
-               stopWatch.start("公式处理");
-               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);
-               String tableNames=tableAll.stream().map(NodeTable::getInitTableName).distinct().collect(Collectors.joining("','","'","'"));
-               /*当前工序包含的所有元素信息,还未包含数据*/
-               List<FormData>  processFds =this.formulaService.createFormDataByTableName(tableNames);
-               List<Long> pkeyIds =tableInfoList.stream().map(TableInfo::getPkeyId).map(Long::parseLong).collect(Collectors.toList());
-               List<String> curTableNames=tableAll.stream().filter(e->pkeyIds.contains(e.getPKeyId())).map(NodeTable::getInitTableName).collect(Collectors.toList());
-              /* List<NodeTable> curNodeTables=tableAll.stream().filter(e->curTableNames.contains(e.getInitTableName())).collect(Collectors.toList());*/
-              /*嵌入公式*/
-              this.formulaService.formulaInto(processFds,tableInfoList.get(0).getProjectId(), String.valueOf(nodeId), type);
-              // List<KeyMapper> keyMappers = this.formulaService.getKeyMapperList(tableAll.stream().map(NodeTable::getPKeyId).filter(Func::isNotEmpty).collect(Collectors.toList()), tableInfoList.get(0).getProjectId(), String.valueOf(nodeId), type);
-               if (Func.isNotEmpty(tableAll)) {
-                   //List<Formula> formulas = this.formulaService.getFormulaList(keyMappers);
-                   /*要找到最小加载数量
-                   * 1.根据依赖溯源然后确定当前页面修改数据的影响范围
-                   * 2.区分能部分执行和必须整体执行公式的元素*/
-                  /* List<FormData> relyFds=  curFormDatas.stream().filter(e->e.getFormula()!=null&&e.getFormula().getRelyList()!=null).collect(Collectors.toList());*/
-                   /*当前提交的元素*/
-                   List<FormData> curFormDatas=FormulaUtils.registerFd(curTableNames,processFds);
-                   /*最小加载页面*/
-                   Map<String,List<Long>> tableNamePkeyIdMap =FormulaUtils.relatedPages(curFormDatas,tableAll);
-                   /*加载单元格信息*/
-                   Map<String, Map<String, String>> coordinateMap = createCoordinateMap2(tableNamePkeyIdMap.values().stream().flatMap(Collection::stream).collect(Collectors.toList()), type);
-                   this.formulaService.loadElementData(curFormDatas,tableNamePkeyIdMap);
-                   /*判断哪些元素是可部分执行和整体执行*/
-                   CurrentNode currentNode = null;
-                   Long contractId = null;
-                   Long projectId = null;
-                   if (type.equals(ExecuteType.INSPECTION)) {
-                       WbsTreeContract wtc = this.wbsTreeContractService.getOne(Wrappers.<WbsTreeContract>lambdaQuery().eq(WbsTreeContract::getPKeyId, nodeId));
-                       currentNode = createCurrentNode(wtc);
-                       contractId = Long.parseLong(wtc.getContractId());
-                       projectId = Long.parseLong(wtc.getProjectId());
-                   } else if (type.equals(ExecuteType.TESTING)) {
-                       WbsTreePrivate wtp = this.wbsTreePrivateService.getOne(Wrappers.<WbsTreePrivate>lambdaQuery().eq(WbsTreePrivate::getPKeyId, nodeId));
-                       currentNode = createCurrentNode(wtp);
-                       projectId = Long.parseLong(wtp.getProjectId());
-                   }
-                   if (currentNode != null) {
-                       TableElementConverter tec = new TableElementConverter(tableInfoList,curFormDatas, processFds, tableNamePkeyIdMap,coordinateMap, currentNode, tableAll);
-                       tec.setLog(log);
-                       tec.setExecuteType(type);
-                       tec.setContractId(contractId);
-                       tec.setProjectId(projectId);
-                       if (tec.isPresent()) {
-                           tec.before2();
-                           this.formulaService.execute2(tec);
-                           tec.after2();
-                       } else {
-                           tec.getLog().put(FormulaLog.OTHER, "没有执行任何公式");
-                       }
-                   }
-               }
-               stopWatch.stop();
-               long totalTime = stopWatch.getTotalTimeMillis();
-               log.put(FormulaLog.PF, "公式执行消耗时间:" + (double)totalTime / 1000 + "秒");
-               StaticLog.info("公式执行用时:{}", totalTime);
-               updateFormulaLog(log.toJsonString(), nodeId);
-           }catch (Exception e){
-               e.printStackTrace();
-           }
+        try {
+            /*用来保存日志执行情况*/
+            StopWatch stopWatch = new StopWatch();
+            FormulaLog log = new FormulaLog();
+            stopWatch.start("公式处理");
+            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);
+            String tableNames = tableAll.stream().map(NodeTable::getInitTableName).distinct().collect(Collectors.joining("','", "'", "'"));
+            /*当前工序包含的所有元素信息,还未包含数据*/
+            List<FormData> processFds = this.formulaService.createFormDataByTableName(tableNames);
+            List<Long> pkeyIds = tableInfoList.stream().map(TableInfo::getPkeyId).map(Long::parseLong).collect(Collectors.toList());
+            List<String> curTableNames = tableAll.stream().filter(e -> pkeyIds.contains(e.getPKeyId())).map(NodeTable::getInitTableName).collect(Collectors.toList());
+            /* List<NodeTable> curNodeTables=tableAll.stream().filter(e->curTableNames.contains(e.getInitTableName())).collect(Collectors.toList());*/
+            /*嵌入公式*/
+            this.formulaService.formulaInto(processFds, tableInfoList.get(0).getProjectId(), String.valueOf(nodeId), type);
+            // List<KeyMapper> keyMappers = this.formulaService.getKeyMapperList(tableAll.stream().map(NodeTable::getPKeyId).filter(Func::isNotEmpty).collect(Collectors.toList()), tableInfoList.get(0).getProjectId(), String.valueOf(nodeId), type);
+            if (Func.isNotEmpty(tableAll)) {
+                //List<Formula> formulas = this.formulaService.getFormulaList(keyMappers);
+                /*要找到最小加载数量
+                 * 1.根据依赖溯源然后确定当前页面修改数据的影响范围
+                 * 2.区分能部分执行和必须整体执行公式的元素*/
+                /* List<FormData> relyFds=  curFormDatas.stream().filter(e->e.getFormula()!=null&&e.getFormula().getRelyList()!=null).collect(Collectors.toList());*/
+                /*当前提交的元素*/
+                List<FormData> curFormDatas = FormulaUtils.registerFd(curTableNames, processFds);
+                /*最小加载页面*/
+                Map<String, List<Long>> tableNamePkeyIdMap = FormulaUtils.relatedPages(curFormDatas, tableAll);
+                /*加载单元格信息*/
+                Map<String, Map<String, String>> coordinateMap = createCoordinateMap2(tableNamePkeyIdMap.values().stream().flatMap(Collection::stream).collect(Collectors.toList()), type);
+                this.formulaService.loadElementData(curFormDatas, tableNamePkeyIdMap);
+                /*判断哪些元素是可部分执行和整体执行*/
+                CurrentNode currentNode = null;
+                Long contractId = null;
+                Long projectId = null;
+                if (type.equals(ExecuteType.INSPECTION)) {
+                    WbsTreeContract wtc = this.wbsTreeContractService.getOne(Wrappers.<WbsTreeContract>lambdaQuery().eq(WbsTreeContract::getPKeyId, nodeId));
+                    currentNode = createCurrentNode(wtc);
+                    contractId = Long.parseLong(wtc.getContractId());
+                    projectId = Long.parseLong(wtc.getProjectId());
+                } else if (type.equals(ExecuteType.TESTING)) {
+                    WbsTreePrivate wtp = this.wbsTreePrivateService.getOne(Wrappers.<WbsTreePrivate>lambdaQuery().eq(WbsTreePrivate::getPKeyId, nodeId));
+                    currentNode = createCurrentNode(wtp);
+                    projectId = Long.parseLong(wtp.getProjectId());
+                }
+                if (currentNode != null) {
+                    TableElementConverter tec = new TableElementConverter(tableInfoList, curFormDatas, processFds, tableNamePkeyIdMap, coordinateMap, currentNode, tableAll);
+                    tec.setLog(log);
+                    tec.setExecuteType(type);
+                    tec.setContractId(contractId);
+                    tec.setProjectId(projectId);
+                    if (tec.isPresent()) {
+                        tec.before2();
+                        this.formulaService.execute2(tec);
+                        tec.after2();
+                    } else {
+                        tec.getLog().put(FormulaLog.OTHER, "没有执行任何公式");
+                    }
+                }
+            }
+            stopWatch.stop();
+            long totalTime = stopWatch.getTotalTimeMillis();
+            log.put(FormulaLog.PF, "公式执行消耗时间:" + (double) totalTime / 1000 + "秒");
+            StaticLog.info("公式执行用时:{}", totalTime);
+            updateFormulaLog(log.toJsonString(), nodeId);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
     }
 
     private List<NodeTable> createNodeTables(Long nodeId, String contractId, String projectId, ExecuteType type) {
@@ -493,7 +493,8 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         }
         return coordinateMap;
     }
-    private Map<String, Map<String, String>> createCoordinateMap2( List<Long> pkeyIds, ExecuteType type) {
+
+    private Map<String, Map<String, String>> createCoordinateMap2(List<Long> pkeyIds, ExecuteType type) {
         Map<String, Map<String, String>> coordinateMap = new HashMap<>(pkeyIds.size() * 2);
         if (pkeyIds.size() > 0) {
             if (ExecuteType.TESTING.equals(type)) {
@@ -772,7 +773,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         List<WbsTreeContract> wbsTreeContractList = wbsTreeContractService.getBaseMapper().selectList(Wrappers.<WbsTreeContract>query().lambda()
                 .eq(WbsTreeContract::getContractId, contractId)
                 .eq(WbsTreeContract::getIsDeleted, 0)
-                .eq(WbsTreeContract::getType,1));
+                .eq(WbsTreeContract::getType, 1));
 
         // 数据维数据
         Map<String, List<WbsTreeContract>> Data = new HashMap<>();
@@ -875,7 +876,6 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
     }
 
 
-
     private void processElements(Elements elements) {
         elements.stream().map(this::findParentTd).filter(Objects::nonNull).forEach(element -> element.attr("gscolor", "11"));
     }
@@ -1138,7 +1138,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                 WbsTreeContract wbsTreeContractByP = wbsTreeContractService.getBaseMapper().selectOne(Wrappers.<WbsTreeContract>query().lambda()
                         .eq(WbsTreeContract::getId, wbsTreeContract.getParentId()).eq(WbsTreeContract::getContractId, wbsTreeContract.getContractId()));
                 //处理文件提名
-                String fileName = this.wbsParamService.createFileTitle( wbsTreeContractByP);
+                String fileName = this.wbsParamService.createFileTitle(wbsTreeContractByP);
 
                 //huangjn 保存成功后调用生成资料查询列表数据
                 this.informationQueryClient.saveOrUpdateInformationQueryData(wbsTreeContractByP.getPKeyId() + "", "首件使用字段", "业务ID(主要将来给首件使用)", fileName, Integer.parseInt(tableInfoList.get(0).getClassify()), 2, "false", "源文件(首件字段)", "pdf文件(首件字段)", "首件上传总结报告名称", new ArrayList<>());
@@ -1146,7 +1146,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                 JSONObject json = new JSONObject();
                 json.put("operationObjIds", Func.toStrList(pkids));
                 json.put("operationObjName", wbsTreeContractByP.getNodeName() + "节点数据操作");
-                json.put("saveData",saveData.toString());
+                json.put("saveData", saveData.toString());
 
                 //保存操作记录
                 this.operationLogClient.saveUserOperationLog(1, "资料填报", "工序填报页面", json);
@@ -1265,6 +1265,9 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
             Elements dwtitle = doc.select("el-input[placeholder~=.*承包单位]");
             Elements sgtitle = doc.select("el-input[placeholder~=^施工单位]");
             Elements sgtitle1 = doc.select("el-input[placeholder=安装单位]");
+
+            Elements defText = doc.getElementsByAttribute("defText");
+
             sgtitle.addAll(sgtitle1);
 
             //合同段显示合同编号
@@ -1362,6 +1365,14 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                     }
                 }
             }
+
+            //电签默认值
+            if (defText.size() >= 1) {
+                for (Element element : defText) {
+                    reData.put(element.attr("id"), element.attr("defText"));
+                }
+            }
+
         } catch (FileNotFoundException e) {
             e.printStackTrace();
         } catch (Exception e) {
@@ -1499,7 +1510,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         //获取excel流 和 html流
         InputStream exceInp = CommonUtil.getOSSInputStream(excelTab.getFileUrl());
 
-        Workbook workbook=null;
+        Workbook workbook = null;
         int index = excelTab.getFileUrl().lastIndexOf(".");
         String suffix = excelTab.getFileUrl().substring(index);
 
@@ -1612,14 +1623,14 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                                     Date Start_dataStr = new Date();
                                     Date end_dataStr = new Date();
                                     try {
-                                        if(myData.indexOf("T") >= 0 && myData.indexOf("-") >= 0){
+                                        if (myData.indexOf("T") >= 0 && myData.indexOf("-") >= 0) {
                                             Start_dataStr = sdf.parse(dataVal[0]);
                                             end_dataStr = sdf.parse(dataVal[1]);
-                                        }else{
+                                        } else {
                                             Start_dataStr = formatStr.parse(dataVal[0]);
                                             end_dataStr = formatStr.parse(dataVal[1]);
                                         }
-                                    }catch (ParseException e){
+                                    } catch (ParseException e) {
                                         throw new ServiceException("日期绑定错误");
                                     }
                                     String StartDate = formatStr.format(Start_dataStr);
@@ -1644,7 +1655,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                                     if ((dataDate[0].trim()).equals((dataDate[1].trim()))) {
                                         myData = dataDate[0];
                                     } else {
-                                        myData = dataDate[0].replace("\"","") + "-" + dataDate[1].trim().replace("\"","");
+                                        myData = dataDate[0].replace("\"", "") + "-" + dataDate[1].trim().replace("\"", "");
                                     }
 
                                 }
@@ -1729,35 +1740,35 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
             }
             // 组装电签设置
             Elements dqids = table.getElementsByAttribute("dqid");
-            for (Element element : dqids){
+            for (Element element : dqids) {
                 String dqid = element.attr("dqid");
-                    Elements x11 = element.getElementsByAttribute("x1");
-                    if(x11!=null && x11.size()>=1){
-                        Element element1 = x11.get(x11.size()-1);
-                       int x1 = Func.toInt(element1.attr("x1"));
-                       int y1 = Func.toInt(element1.attr("y1"));
-
-                        Row row = sheet.getRow(y1 - 1);
-                        if (row != null) {
-                            Cell cell = row.getCell(x1 - 1);
-                            if (cell != null || ObjectUtils.isNotEmpty(cell)) {
-                                short fontIndex = cell.getCellStyle().getFontIndex();
-                                Font oldfontAt = workbook.getFontAt(fontIndex);
-                                Font redFont = workbook.createFont();
-                                redFont.setColor(IndexedColors.WHITE.getIndex()); //设置字体颜色
-                                redFont.setFontHeightInPoints(Short.valueOf("1"));//设置字体大小
-                                redFont.setFontName(oldfontAt.getFontName());//设置字体
-                                String CellValue = cell.getStringCellValue().trim();
-
-                                CellStyle newStyle = workbook.createCellStyle(); //创建单元格样式
-                                newStyle.cloneStyleFrom(cell.getCellStyle());
-                                newStyle.setFont(redFont);
-                                newStyle.setShrinkToFit(true);
-                                cell.setCellStyle(newStyle);
-                                cell.setCellValue(dqid);
-                            }
+                Elements x11 = element.getElementsByAttribute("x1");
+                if (x11 != null && x11.size() >= 1) {
+                    Element element1 = x11.get(x11.size() - 1);
+                    int x1 = Func.toInt(element1.attr("x1"));
+                    int y1 = Func.toInt(element1.attr("y1"));
+
+                    Row row = sheet.getRow(y1 - 1);
+                    if (row != null) {
+                        Cell cell = row.getCell(x1 - 1);
+                        if (cell != null || ObjectUtils.isNotEmpty(cell)) {
+                            short fontIndex = cell.getCellStyle().getFontIndex();
+                            Font oldfontAt = workbook.getFontAt(fontIndex);
+                            Font redFont = workbook.createFont();
+                            redFont.setColor(IndexedColors.WHITE.getIndex()); //设置字体颜色
+                            redFont.setFontHeightInPoints(Short.valueOf("1"));//设置字体大小
+                            redFont.setFontName(oldfontAt.getFontName());//设置字体
+                            String CellValue = cell.getStringCellValue().trim();
+
+                            CellStyle newStyle = workbook.createCellStyle(); //创建单元格样式
+                            newStyle.cloneStyleFrom(cell.getCellStyle());
+                            newStyle.setFont(redFont);
+                            newStyle.setShrinkToFit(true);
+                            cell.setCellStyle(newStyle);
+                            cell.setCellValue(dqid);
                         }
                     }
+                }
             }
         }
 
@@ -1765,13 +1776,13 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         FileOutputStream outputStream = new FileOutputStream(excelPath);
         workbook.write(outputStream);
 
-        FileUtils.excelToPdf(excelPath,pdfPath);
-      //  com.spire.xls.Workbook workbook2 = new com.spire.xls.Workbook();
+        FileUtils.excelToPdf(excelPath, pdfPath);
+        //  com.spire.xls.Workbook workbook2 = new com.spire.xls.Workbook();
 
-      //  workbook2.loadFromFile(excelPath);
+        //  workbook2.loadFromFile(excelPath);
         //设置转换后的PDF页面高宽适应工作表的内容大小
         //workbook2.getConverterSetting().setSheetFitToPage(true);
-       // workbook2.saveToFile(pdfPath, FileFormat.PDF);
+        // workbook2.saveToFile(pdfPath, FileFormat.PDF);
 
         BladeFile bladeFile = newIOSSClient.uploadFile(pkeyId + ".pdf", pdfPath);
 
@@ -2888,14 +2899,14 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         //构造阻塞器
         CountDownLatch cdl = new CountDownLatch(dataArray.size());
         // 构造多线程保存用户数据到表中 并生成excel
-        for (int i=0; i<dataArray.size();i++){
+        for (int i = 0; i < dataArray.size(); i++) {
             JSONObject jsonObject = dataArray.getJSONObject(i);
             Thread countUserThread = new Thread(() -> {
                 try {
                     SaveOneTabInfo(jsonObject);
                 } catch (Exception e) {
                     e.printStackTrace();
-                }finally {
+                } finally {
                     cdl.countDown();//标记已经完成一个任务
                 }
             });
@@ -2910,7 +2921,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
 
     // 保存单表
     public void SaveOneTabInfo(JSONObject tableInfo) throws Exception {
-        System.out.println("---------="+new Date().toLocaleString());
+        System.out.println("---------=" + new Date().toLocaleString());
         String pKeyId = tableInfo.getString("pkeyId");
 
         tableInfo.fluentRemove("contractId")
@@ -2941,8 +2952,8 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         //获取excel流 和 html流
         InputStream exceInp = CommonUtil.getOSSInputStream(excelTab.getFileUrl());
 
-        System.out.println("---------2="+new Date().toLocaleString());
-        Workbook workbook=null;
+        System.out.println("---------2=" + new Date().toLocaleString());
+        Workbook workbook = null;
         int index = excelTab.getFileUrl().lastIndexOf(".");
         String suffix = excelTab.getFileUrl().substring(index);
 
@@ -2956,7 +2967,6 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         sheet.setForceFormulaRecalculation(true);
 
 
-
         String sqll = " insert into table_data_info (id, p_key_id, tab_key,key_val) values (?, ?, ?,?)  ";
         String delSql = "delete from table_data_info where p_key_id=" + pKeyId;
         List<Object[]> list = new ArrayList<>();
@@ -2967,10 +2977,10 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
             Document doc = Jsoup.parse(htmlString);
             Element table = doc.select("table").first();
             if (ObjectUtil.isNotEmpty(tableInfo)) {
-                for(String key : tableInfo.keySet()){
-                    if(key.contains("key")&&key.contains("__")){
+                for (String key : tableInfo.keySet()) {
+                    if (key.contains("key") && key.contains("__")) {
                         Long id = SnowFlakeUtil.getId();
-                        list.add(new Object[]{id,pKeyId,key,tableInfo.getString(key)});
+                        list.add(new Object[]{id, pKeyId, key, tableInfo.getString(key)});
 
                         Elements datas = doc.getElementsByAttributeValue("keyname", key);
                         Element data = null;
@@ -3006,14 +3016,14 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                                         Date Start_dataStr = new Date();
                                         Date end_dataStr = new Date();
                                         try {
-                                            if(myData.indexOf("T") >= 0 && myData.indexOf("-") >= 0){
+                                            if (myData.indexOf("T") >= 0 && myData.indexOf("-") >= 0) {
                                                 Start_dataStr = sdf.parse(dataVal[0]);
                                                 end_dataStr = sdf.parse(dataVal[1]);
-                                            }else{
+                                            } else {
                                                 Start_dataStr = formatStr.parse(dataVal[0]);
                                                 end_dataStr = formatStr.parse(dataVal[1]);
                                             }
-                                        }catch (ParseException e){
+                                        } catch (ParseException e) {
                                             throw new ServiceException("日期绑定错误");
                                         }
                                         String StartDate = formatStr.format(Start_dataStr);
@@ -3121,11 +3131,11 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
 
                 // 组装电签设置
                 Elements dqids = table.getElementsByAttribute("dqid");
-                for (Element element : dqids){
+                for (Element element : dqids) {
                     String dqid = element.attr("dqid");
                     Elements x11 = element.getElementsByAttribute("x1");
-                    if(x11!=null && x11.size()>=1){
-                        Element element1 = x11.get(x11.size()-1);
+                    if (x11 != null && x11.size() >= 1) {
+                        Element element1 = x11.get(x11.size() - 1);
                         int x1 = Func.toInt(element1.attr("x1"));
                         int y1 = Func.toInt(element1.attr("y1"));