From ed12ca7cfb0f1510e565a4cce2094dcac17084d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E7=90=A6=E6=B6=9B?= Date: Thu, 7 Dec 2023 18:42:11 +0800 Subject: [PATCH] fix:79078 --- .../java/com/jero/modules/document/utils/ReadWordUtil.java | 2 +- .../laws/home/service/impl/LawsHomeSearchServiceImpl.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/laws-modules/src/main/java/com/jero/modules/document/utils/ReadWordUtil.java b/laws-modules/src/main/java/com/jero/modules/document/utils/ReadWordUtil.java index e686053d..ba00a2b3 100644 --- a/laws-modules/src/main/java/com/jero/modules/document/utils/ReadWordUtil.java +++ b/laws-modules/src/main/java/com/jero/modules/document/utils/ReadWordUtil.java @@ -23,7 +23,7 @@ public class ReadWordUtil { // String path = "E:\\DeskTop\\1111.doc"; // path = "E:\\DeskTop\\22222.docx"; // String path = "E:\\DeskTop\\标准所ISO-用户手册.doc"; - String str = ""; + String str = "--"; try { if (path.endsWith(".doc")) { if(MinioUtil.doesObjectExist(path)){ diff --git a/laws-modules/src/main/java/com/jero/modules/laws/home/service/impl/LawsHomeSearchServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/laws/home/service/impl/LawsHomeSearchServiceImpl.java index a0e2c789..ab179b5b 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/home/service/impl/LawsHomeSearchServiceImpl.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/home/service/impl/LawsHomeSearchServiceImpl.java @@ -48,6 +48,7 @@ import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; import org.apache.shiro.SecurityUtils; import org.jetbrains.annotations.NotNull; +import org.jsoup.Jsoup; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; @@ -56,7 +57,6 @@ import org.springframework.util.ReflectionUtils; import javax.annotation.Resource; import java.lang.reflect.Field; -import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.*; import java.util.concurrent.CompletableFuture; @@ -1315,6 +1315,7 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService { try { String wordContent = s; if (StringUtils.isNotBlank(wordContent)) { + wordContent = Jsoup.parse(wordContent).text(); fileTextAll.append(wordContent).append(","); } } catch (Exception e) {