Merge branch 'master-1011'

This commit is contained in:
fengchenchen
2024-10-12 17:28:16 +08:00
6 changed files with 29 additions and 6 deletions
@@ -3549,8 +3549,14 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
String valContent = ""; String valContent = "";
String valContentTranslation = ""; String valContentTranslation = "";
if ("TEXT".equals(type)) { if ("TEXT".equals(type)) {
itemContent = itemContent.replace("<", "&lt;").replace(">", "&gt;")
.replace("&lt;sub&gt;", "<sub>").replace("&lt;/sub&gt;", "</sub>")
.replace("&lt;sup&gt;", "<sup>").replace("&lt;/sup&gt;", "</sup>");
valContent += "<p>" + itemContent + "</p>"; valContent += "<p>" + itemContent + "</p>";
if (StringUtils.isNotBlank(translation)){ if (StringUtils.isNotBlank(translation)){
translation = translation.replace("<", "&lt;").replace(">", "&gt;")
.replace("&lt;sub&gt;", "<sub>").replace("&lt;/sub&gt;", "</sub>")
.replace("&lt;sup&gt;", "<sup>").replace("&lt;/sup&gt;", "</sup>");
valContentTranslation += "<p>" + translation + "</p>"; valContentTranslation += "<p>" + translation + "</p>";
} }
} else if ("IMG".equals(type)) { } else if ("IMG".equals(type)) {
@@ -3559,9 +3565,26 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
valContentTranslation += "<img class=\"wordImg\" style=\"width:100%;height:100%\" src=\""+ translation +"\">"; valContentTranslation += "<img class=\"wordImg\" style=\"width:100%;height:100%\" src=\""+ translation +"\">";
} }
} else if ("TABLE".equals(type)) { } else if ("TABLE".equals(type)) {
itemContent = itemContent.replace("<", "&lt;").replace(">", "&gt;")
.replace("&lt;sub&gt;", "<sub>").replace("&lt;/sub&gt;", "</sub>")
.replace("&lt;sup&gt;", "<sup>").replace("&lt;/sup&gt;", "</sup>")
.replace("&lt;table border=\"1\" style=\"border-collapse:collapse;width:100%;\"&gt;", "<table border=\"1\" style=\"border-collapse:collapse;width:100%;\">")
.replace("&lt;/table&gt;", "</table>")
.replace("&lt;tr&gt;", "<tr>").replace("&lt;/tr&gt;", "</tr>")
.replace("&lt;td &gt;", "<td>").replace("&lt;/td&gt;", "</td>")
;
valEO.setItemContent(itemContent.replaceAll("\n","<br/>")); valEO.setItemContent(itemContent.replaceAll("\n","<br/>"));
valContent += itemContent; valContent += itemContent;
if (StringUtils.isNotBlank(translation)){ if (StringUtils.isNotBlank(translation)){
translation = translation.replace("<", "&lt;").replace(">", "&gt;")
.replace("&lt;sub&gt;", "<sub>").replace("&lt;/sub&gt;", "</sub>")
.replace("&lt;sup&gt;", "<sup>").replace("&lt;/sup&gt;", "</sup>")
.replace("&lt;table border=\"1\" style=\"border-collapse:collapse;width:100%;\"&gt;", "<table border=\"1\" style=\"border-collapse:collapse;width:100%;\">")
.replace("&lt;/table&gt;", "</table>")
.replace("&lt;tr&gt;", "<tr>").replace("&lt;/tr&gt;", "</tr>")
.replace("&lt;td &gt;", "<td>").replace("&lt;/td&gt;", "</td>")
;
valEO.setTranslation(translation.replaceAll("\n","<br/>")); valEO.setTranslation(translation.replaceAll("\n","<br/>"));
valContentTranslation += translation; valContentTranslation += translation;
} }
@@ -3598,7 +3621,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
if (StringUtils.isBlank(value)) { if (StringUtils.isBlank(value)) {
continue; continue;
} }
String str = map.get(key).toString(); String str = map.get(key).toString().replace("<", "&lt;").replace(">", "&gt;");
if (StringUtils.isBlank(str)) { if (StringUtils.isBlank(str)) {
map.put(key,value); map.put(key,value);
}else { }else {
@@ -107,7 +107,7 @@ public class POIReadExcelToHtml {
} }
if (null == row) { if (null == row) {
sb.append("<tr><td > </td></tr>"); sb.append("<tr><td> </td></tr>");
continue; continue;
}else if(row.getZeroHeight()){ }else if(row.getZeroHeight()){
continue; continue;
@@ -485,7 +485,7 @@ download:
watermark: watermark:
font-size: 13.0 font-size: 13.0
# 每页几行 # 每页几行
lineNumPerPage: 8 lineNumPerPage: 4
# 每页几列 # 每页几列
columnNumPerPage: 3 columnNumPerPage: 3
# 倾斜角度 # 倾斜角度
@@ -480,7 +480,7 @@ download:
watermark: watermark:
font-size: 13.0 font-size: 13.0
# 每页几行 # 每页几行
lineNumPerPage: 8 lineNumPerPage: 4
# 每页几列 # 每页几列
columnNumPerPage: 3 columnNumPerPage: 3
# 倾斜角度 # 倾斜角度
@@ -486,7 +486,7 @@ download:
watermark: watermark:
font-size: 13.0 font-size: 13.0
# 每页几行 # 每页几行
lineNumPerPage: 8 lineNumPerPage: 4
# 每页几列 # 每页几列
columnNumPerPage: 3 columnNumPerPage: 3
# 倾斜角度 # 倾斜角度
@@ -485,7 +485,7 @@ download:
watermark: watermark:
font-size: 13.0 font-size: 13.0
# 每页几行 # 每页几行
lineNumPerPage: 8 lineNumPerPage: 4
# 每页几列 # 每页几列
columnNumPerPage: 3 columnNumPerPage: 3
# 倾斜角度 # 倾斜角度