搜索中心-法规月报-bug58586
This commit is contained in:
+3
-3
@@ -163,7 +163,7 @@ public class LawsMonthlyReportManageEOServiceImpl extends ServiceImpl<LawsMonthl
|
||||
|| ossFile.getFileName().endsWith(".DOC")
|
||||
|| ossFile.getFileName().endsWith(".DOCX")) {
|
||||
|
||||
String wordContent = null;
|
||||
String wordContent = "--"; // 默认文件内容为空 ,不能定义为null,前端会加载不出页面
|
||||
try {
|
||||
wordContent = ReadWordUtil.readWord(ossFile.getUrl(),uploadpath);
|
||||
} catch (Exception e) {
|
||||
@@ -173,7 +173,7 @@ public class LawsMonthlyReportManageEOServiceImpl extends ServiceImpl<LawsMonthl
|
||||
fileText = wordContent;
|
||||
}
|
||||
} else if (ossFile.getFileName().endsWith(".pdf") || ossFile.getFileName().endsWith(".PDF")) {
|
||||
String pdfContent = null;
|
||||
String pdfContent = "--"; // 默认文件内容为空 ,不能定义为null,前端会加载不出页面
|
||||
try {
|
||||
pdfContent = ReadPdfUtil.readPdf(ossFile.getUrl());
|
||||
} catch (Exception e) {
|
||||
@@ -259,7 +259,7 @@ public class LawsMonthlyReportManageEOServiceImpl extends ServiceImpl<LawsMonthl
|
||||
stringMap.put("file_text", fileText);
|
||||
stringMap.put("file_name", fileName);
|
||||
stringMap.put("file_id", fileId);
|
||||
stringMap.put("issue_time", issueTime);
|
||||
stringMap.put("create_time", issueTime);
|
||||
stringMap.put("cut",cut);
|
||||
stringMap.put("flag",flag);
|
||||
|
||||
|
||||
+2
-2
@@ -166,7 +166,7 @@ public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSea
|
||||
Map<String,Object> issueTime = new HashMap<>();
|
||||
Map<String,Object> issueTime1 = new HashMap<>();
|
||||
issueTime.put("order","desc");
|
||||
issueTime1.put("issue_time",issueTime);
|
||||
issueTime1.put("create_time",issueTime);
|
||||
sort.putAll(issueTime1);
|
||||
|
||||
// Map<String,Object> mapSort = new HashMap<>();
|
||||
@@ -258,7 +258,7 @@ public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSea
|
||||
list1.add("</text>");
|
||||
mapTemp.put("pre_tags", list);
|
||||
mapTemp.put("post_tags", list1);
|
||||
mapTemp.put("fragment_size", 200);//高亮字段内容长度,去除html样式标签,统计字数,设置为200
|
||||
mapTemp.put("fragment_size", 550);//高亮字段内容长度,去除html样式标签,统计字数,设置为200
|
||||
mapTemp.put("number_of_fragments", 1);//高亮内容默认分为5段, 此处设置为一段
|
||||
mapTemp.put("type", "plain");
|
||||
mapHighlight.put(key, mapTemp);
|
||||
|
||||
Reference in New Issue
Block a user