From cb1de1bfcd43a578329c3291e109c74a6fd5042a Mon Sep 17 00:00:00 2001 From: lijiarao Date: Thu, 1 Aug 2024 17:38:19 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"add=20=E6=96=87=E6=A1=A3=E6=8B=86?= =?UTF-8?q?=E5=88=86=E5=AF=BC=E5=87=BA=20=E5=A2=9E=E5=8A=A0=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E8=AF=91=E6=96=87"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit ca028ee43b6c257b810817b4e938af1ebb5db7b0. --- .../split/dto/FileSpiltValTableExportDto.java | 2 - .../split/dto/FileSplitValImgExportDto.java | 1 - .../impl/FileSplitItemsEOServiceImpl.java | 78 +++---------------- 3 files changed, 11 insertions(+), 70 deletions(-) diff --git a/laws-modules/src/main/java/com/jero/modules/split/dto/FileSpiltValTableExportDto.java b/laws-modules/src/main/java/com/jero/modules/split/dto/FileSpiltValTableExportDto.java index 2fccfb56..0724f4af 100644 --- a/laws-modules/src/main/java/com/jero/modules/split/dto/FileSpiltValTableExportDto.java +++ b/laws-modules/src/main/java/com/jero/modules/split/dto/FileSpiltValTableExportDto.java @@ -18,6 +18,4 @@ public class FileSpiltValTableExportDto { private List> tableEOList; private String tableHtCon; - - private String tableHtConTranslation; } diff --git a/laws-modules/src/main/java/com/jero/modules/split/dto/FileSplitValImgExportDto.java b/laws-modules/src/main/java/com/jero/modules/split/dto/FileSplitValImgExportDto.java index f02cb7ef..67ba9c37 100644 --- a/laws-modules/src/main/java/com/jero/modules/split/dto/FileSplitValImgExportDto.java +++ b/laws-modules/src/main/java/com/jero/modules/split/dto/FileSplitValImgExportDto.java @@ -13,5 +13,4 @@ public class FileSplitValImgExportDto { private String imgName; private String imgPath; - private String imgPathTranslation; } diff --git a/laws-modules/src/main/java/com/jero/modules/split/service/impl/FileSplitItemsEOServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/split/service/impl/FileSplitItemsEOServiceImpl.java index f3faddcb..e192a147 100644 --- a/laws-modules/src/main/java/com/jero/modules/split/service/impl/FileSplitItemsEOServiceImpl.java +++ b/laws-modules/src/main/java/com/jero/modules/split/service/impl/FileSplitItemsEOServiceImpl.java @@ -3876,7 +3876,6 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl ossFileList = ossFileService.getFileInfosByConnectId(connectId); List fileNameList = new ArrayList<>(); if (ossFileList != null && !ossFileList.isEmpty()) { @@ -4150,16 +4143,15 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl -1) { @@ -4167,7 +4159,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl -1) { - content = content.substring(0,content.lastIndexOf("\n")); - } - } - - if("TABLE".equals(fileSplitValExportDto.getValType())){ - /* 连接跳转*/ - content = fileSplitValExportDto.getValContent()+"translation"; - CreationHelper createHelper = workbook.getCreationHelper(); - Hyperlink hyperlink1 = createHelper.createHyperlink(HyperlinkType.DOCUMENT); - String tableName = "#\'"+ content + "\'!A1"; - hyperlink1.setAddress(tableName); - cell2.setHyperlink(hyperlink1);// 链接 - row1.getCell(cellNum).setCellStyle(cellStyleLink); - } else if ("IMG".equals(fileSplitValExportDto.getValType())) { - /* 连接跳转*/ - content = fileSplitValExportDto.getValContent()+"translation"; - CreationHelper createHelper = workbook.getCreationHelper(); - Hyperlink hyperlink1 = createHelper.createHyperlink(HyperlinkType.FILE); - String imgName = content; - hyperlink1.setAddress(imgName); - cell2.setHyperlink(hyperlink1);// 链接 - row1.getCell(cellNum).setCellStyle(cellStyleLink); - } - cell2.setCellValue(content); // IllegalArgumentException异常,excel单元格最大字符长度有限制 - } - else if ("interpretation_articles".equals(fieldName)) { + } else if ("interpretation_articles".equals(fieldList.get(cellNum))) { // 条文解读特殊处理 HSSFCell cell2 = row1.createCell(cellNum); row1.getCell(cellNum).setCellStyle(cellStyle); @@ -4303,8 +4261,6 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl") < 0) { if (tableHtml.indexOf("") < 0) { tableHtml = tableHtml.replaceFirst("",""); @@ -4317,18 +4273,6 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl]*?>|<[\\s]*?\\/[\\s]*?br[\\s]*?>", cnt); workbook = ConvertHtml2Excel.table2Excel(tableHtml,workbook,tableName); - - if (StringUtils.isNotEmpty(tableHtmlTranslation) && tableHtmlTranslation.indexOf("") < 0) { - if (tableHtmlTranslation.indexOf("") < 0) { - tableHtmlTranslation = tableHtmlTranslation.replaceFirst("",""); - tableHtmlTranslation = tableHtmlTranslation.replaceFirst("",""); - } else { - tableHtmlTranslation = tableHtmlTranslation.replaceFirst("",""); - tableHtmlTranslation = tableHtmlTranslation.replaceFirst("",""); - } - } - tableHtmlTranslation = tableHtmlTranslation.replaceAll("<[\\s]*?br[^>]*?>|<[\\s]*?\\/[\\s]*?br[\\s]*?>", cnt); - workbook = ConvertHtml2Excel.table2Excel(tableHtmlTranslation,workbook,tableName+"translation"); // for (int r=0;r colTableList = rowtableList.get(r); // HSSFRow tRow = sheetTable.createRow(colTableList.get(0).getRowNum()-1);