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