fix 条款导出报错
This commit is contained in:
+12
-8
@@ -4379,6 +4379,8 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
|||||||
String content = exportDto.get(fieldName).toString();
|
String content = exportDto.get(fieldName).toString();
|
||||||
if (StringUtils.isNotEmpty(content)) {
|
if (StringUtils.isNotEmpty(content)) {
|
||||||
content = content.replaceAll("null","");
|
content = content.replaceAll("null","");
|
||||||
|
content = content.replaceAll("<p>","");
|
||||||
|
content = content.replaceAll("</p>","\n");
|
||||||
if (content.lastIndexOf("\n") > -1) {
|
if (content.lastIndexOf("\n") > -1) {
|
||||||
content = content.substring(0,content.lastIndexOf("\n"));
|
content = content.substring(0,content.lastIndexOf("\n"));
|
||||||
}
|
}
|
||||||
@@ -4509,16 +4511,18 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
|||||||
tableHtml = tableHtml.replaceAll("<[\\s]*?br[^>]*?>|<[\\s]*?\\/[\\s]*?br[\\s]*?>", cnt);
|
tableHtml = tableHtml.replaceAll("<[\\s]*?br[^>]*?>|<[\\s]*?\\/[\\s]*?br[\\s]*?>", cnt);
|
||||||
workbook = ConvertHtml2Excel.table2Excel(tableHtml,workbook,tableName);
|
workbook = ConvertHtml2Excel.table2Excel(tableHtml,workbook,tableName);
|
||||||
|
|
||||||
if (StringUtils.isNotEmpty(tableHtmlTranslation) && tableHtmlTranslation.indexOf("<tbody>") < 0) {
|
if (StringUtils.isNotEmpty(tableHtmlTranslation)) {
|
||||||
if (tableHtmlTranslation.indexOf("<thead>") < 0) {
|
if (!tableHtmlTranslation.contains("<tbody>")){
|
||||||
tableHtmlTranslation = tableHtmlTranslation.replaceFirst("<tr>","<tbody><tr>");
|
if (!tableHtmlTranslation.contains("<thead>")) {
|
||||||
tableHtmlTranslation = tableHtmlTranslation.replaceFirst("</table>","</tbody></table>");
|
tableHtmlTranslation = tableHtmlTranslation.replaceFirst("<tr>","<tbody><tr>");
|
||||||
} else {
|
tableHtmlTranslation = tableHtmlTranslation.replaceFirst("</table>","</tbody></table>");
|
||||||
tableHtmlTranslation = tableHtmlTranslation.replaceFirst("</thead>","</thead><tbody>");
|
} else {
|
||||||
tableHtmlTranslation = tableHtmlTranslation.replaceFirst("</table>","</tbody></table>");
|
tableHtmlTranslation = tableHtmlTranslation.replaceFirst("</thead>","</thead><tbody>");
|
||||||
|
tableHtmlTranslation = tableHtmlTranslation.replaceFirst("</table>","</tbody></table>");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
tableHtmlTranslation = tableHtmlTranslation.replaceAll("<[\\s]*?br[^>]*?>|<[\\s]*?\\/[\\s]*?br[\\s]*?>", cnt);
|
||||||
}
|
}
|
||||||
tableHtmlTranslation = tableHtmlTranslation.replaceAll("<[\\s]*?br[^>]*?>|<[\\s]*?\\/[\\s]*?br[\\s]*?>", cnt);
|
|
||||||
workbook = ConvertHtml2Excel.table2Excel(tableHtmlTranslation,workbook,tableName+"translation");
|
workbook = ConvertHtml2Excel.table2Excel(tableHtmlTranslation,workbook,tableName+"translation");
|
||||||
// for (int r=0;r<rowtableList.size();r++) {
|
// for (int r=0;r<rowtableList.size();r++) {
|
||||||
// List<SarFileSplitItemsTableEO> colTableList = rowtableList.get(r);
|
// List<SarFileSplitItemsTableEO> colTableList = rowtableList.get(r);
|
||||||
|
|||||||
Reference in New Issue
Block a user