|
|
@@ -427,7 +427,7 @@ public class ProjectListController {
|
|
|
@ResponseBody
|
|
|
public void downloadFirstAuditTpl(HttpServletResponse response, ProgramProjectListInfo info) {
|
|
|
Map data = projectListService.getAuditInfoMap(info);
|
|
|
-
|
|
|
+ removeSpanTags(data);
|
|
|
|
|
|
//模板对象
|
|
|
Template template=null;
|
|
|
@@ -482,7 +482,7 @@ public class ProjectListController {
|
|
|
@ResponseBody
|
|
|
public void downloadSecondAuditTpl(HttpServletResponse response, ProgramProjectListInfo info) {
|
|
|
Map data = projectListService.getAuditInfoMap(info);
|
|
|
-
|
|
|
+ removeSpanTags(data);
|
|
|
|
|
|
//模板对象
|
|
|
Template template=null;
|
|
|
@@ -535,7 +535,7 @@ public class ProjectListController {
|
|
|
@ResponseBody
|
|
|
public void downloadThirdlyAuditTpl(HttpServletResponse response, ProgramProjectListInfo info) {
|
|
|
Map data = projectListService.getAuditInfoMap(info);
|
|
|
-
|
|
|
+ removeSpanTags(data);
|
|
|
|
|
|
//模板对象
|
|
|
Template template=null;
|
|
|
@@ -862,4 +862,25 @@ public class ProjectListController {
|
|
|
public void insertMembers(String projectId,String membersId,String userId) throws Exception {
|
|
|
projectListService.addMembers(projectId,membersId,userId);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 清理 Map 中所有字符串类型数据的 span 标签,保留标签内文本。
|
|
|
+ *
|
|
|
+ * @param data 模板数据
|
|
|
+ */
|
|
|
+ private void removeSpanTags(Map<String, Object> data) {
|
|
|
+ if (data == null || data.isEmpty()) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ data.replaceAll((key, value) -> {
|
|
|
+ if (!(value instanceof String)) {
|
|
|
+ return value;
|
|
|
+ }
|
|
|
+
|
|
|
+ return ((String) value)
|
|
|
+ .replaceAll("(?i)<span\\b[^>]*>", "")
|
|
|
+ .replaceAll("(?i)</span\\s*>", "");
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|