mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-09 02:46:50 +08:00
[DAT] 文档去重
This commit is contained in:
@@ -57,10 +57,7 @@ import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@EnableConfigurationProperties({CaseAiProperties.class})
|
||||
@@ -373,6 +370,7 @@ public class CaseAiChatServiceImpl implements ICaseAiChatService {
|
||||
try {
|
||||
// 先处理文件引用,收集CaseReferVo数据
|
||||
List<CaseReferVo> currentCaseRefers = new ArrayList<>();
|
||||
Set<String> docIds = new HashSet<>();
|
||||
|
||||
JSONObject fileRefer = responseData.getJSONObject("fileRefer");
|
||||
if (fileRefer != null && fileRefer.containsKey("files")) {
|
||||
@@ -383,7 +381,8 @@ public class CaseAiChatServiceImpl implements ICaseAiChatService {
|
||||
if (docId != null) {
|
||||
// 根据docId从 case_document_log 表查询案例数据
|
||||
CaseReferVo caseRefer = getCaseReferByDocId(docId);
|
||||
if (caseRefer != null) {
|
||||
if (caseRefer != null && !docIds.contains(docId)) {
|
||||
docIds.add(docId);
|
||||
currentCaseRefers.add(caseRefer);
|
||||
conversationData.addCaseRefer(caseRefer); // 也添加到总的收集器中
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user