From 342dcf74848a7666e4b4ad2112a1f5e7bace224d Mon Sep 17 00:00:00 2001 From: ZLI263 Date: Tue, 16 Sep 2025 12:39:32 +0800 Subject: [PATCH] =?UTF-8?q?=E9=93=AD=E7=89=8C=20=E9=87=8D=E6=96=B0?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E4=B8=80=E4=B8=AA=E5=AF=B9=E8=B1=A1=E9=93=BE?= =?UTF-8?q?=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/TmNameplateCorpusServiceImpl.java | 45 ++++++++++--------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/ai-analytic-center-biz/src/main/java/com/volvo/ai/analytic/center/service/impl/TmNameplateCorpusServiceImpl.java b/ai-analytic-center-biz/src/main/java/com/volvo/ai/analytic/center/service/impl/TmNameplateCorpusServiceImpl.java index 982573b..6cd3c1f 100644 --- a/ai-analytic-center-biz/src/main/java/com/volvo/ai/analytic/center/service/impl/TmNameplateCorpusServiceImpl.java +++ b/ai-analytic-center-biz/src/main/java/com/volvo/ai/analytic/center/service/impl/TmNameplateCorpusServiceImpl.java @@ -162,28 +162,7 @@ public class TmNameplateCorpusServiceImpl extends ServiceImpl portraitFuture = CompletableFuture.runAsync(() -> { - //"analysisScene": "分析类型", // 1、企微会话 2、AI通话录音 3、AI铭牌(客流) 4、AI铭牌(试驾) - - - inputMap.put("businessId",item.getCustomerFlowId()); - inputMap.put("communicateDate",item.getNameplateEndTime()); - inputMap.put("analysisScene", "3"); - diFyImageReq.setInputs(inputMap); - // 创建新的DiFyReq对象以避免线程安全问题 - diFyImageReq.setFlowId(oneTokenPortrait); - log.info("runDify execDifyFlow ,客户画像场景 ,token : {} , 对象: {}", oneTokenPortrait, diFyImageReq); - JSONObject execDifyFlowForPortrait = diFyService.executeDifyFlow(diFyImageReq, BusinessTypeEnum.CORPUS_PORTRAIT_NAMEPLATE.getCode(), - JSONObject.toJSONString(corpusReportDTO), null); - - log.info("runDify execDifyFlow ,铭牌语料 ,客户画像场景,返回: {}", execDifyFlowForPortrait); - - }, executorService); - long endTime2 = System.currentTimeMillis(); - log.info("第二个业务场景(用户画像)执行时间: {} ms", (endTime2 - startTime2)); - + log.info("第1个业务场景, 优先执行。 "); long startTime = System.currentTimeMillis(); CompletableFuture summaryFuture = CompletableFuture.runAsync(() -> { //第一个业务场景 开始: 总结和分类业务场景 @@ -195,6 +174,28 @@ public class TmNameplateCorpusServiceImpl extends ServiceImpl portraitFuture = CompletableFuture.runAsync(() -> { + //"analysisScene": "分析类型", // 1、企微会话 2、AI通话录音 3、AI铭牌(客流) 4、AI铭牌(试驾) + Map inputMap2 = new HashMap<>(); + inputMap2.put("businessId",item.getCustomerFlowId()); + inputMap2.put("communicateDate",item.getNameplateEndTime()); + inputMap2.put("analysisScene", "3"); + diFyImageReq.setInputs(inputMap2); + // 创建新的DiFyReq对象以避免线程安全问题 + diFyImageReq.setFlowId(oneTokenPortrait); + log.info("runDify execDifyFlow ,客户画像场景 ,token : {} , 对象: {}", oneTokenPortrait, diFyImageReq); + JSONObject execDifyFlowForPortrait = diFyService.executeDifyFlow(diFyImageReq, BusinessTypeEnum.SMART_ASSISTANT_NAMEPLATE.getCode(), + JSONObject.toJSONString(corpusReportDTO), null); + + log.info("runDify execDifyFlow ,铭牌语料 ,客户画像场景,返回: {}", execDifyFlowForPortrait); + + }, executorService); + long endTime2 = System.currentTimeMillis(); + log.info("第二个业务场景(用户画像)执行时间: {} ms", (endTime2 - startTime2)); + + + } catch (Exception e) {