From 10cf5c90901b65162616025b6788bc778da318d3 Mon Sep 17 00:00:00 2001 From: zren25 Date: Mon, 9 Jun 2025 17:45:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=8B=E4=BB=B6=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/CorpusPortraitServiceImpl.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/ai-analytic-center-biz/src/main/java/com/volvo/ai/analytic/center/service/impl/CorpusPortraitServiceImpl.java b/ai-analytic-center-biz/src/main/java/com/volvo/ai/analytic/center/service/impl/CorpusPortraitServiceImpl.java index 7760e9a..4310667 100644 --- a/ai-analytic-center-biz/src/main/java/com/volvo/ai/analytic/center/service/impl/CorpusPortraitServiceImpl.java +++ b/ai-analytic-center-biz/src/main/java/com/volvo/ai/analytic/center/service/impl/CorpusPortraitServiceImpl.java @@ -124,7 +124,7 @@ public class CorpusPortraitServiceImpl implements CorpusPortraitService { if (null != execDifyFlow && execDifyFlow.get("status").equals("succeeded")) { JSONObject text = execDifyFlow.getJSONObject("outputs"); - huaWeiService.sendEvent(setCloudEvents(aiAnalysisRequestId, text.toJSONString()), ltoChannelId); + huaWeiService.sendEvent(setCloudEvents(aiAnalysisRequestId, text.toJSONString(), "DCC"), ltoChannelId); } try { @@ -144,11 +144,12 @@ public class CorpusPortraitServiceImpl implements CorpusPortraitService { } - public CloudEvents setCloudEvents(String aiAnalysisRequestId, String text){ + public CloudEvents setCloudEvents(String aiAnalysisRequestId, String text, String eventType){ + log.info("setCloudEvents aiAnalysisRequestId:{},type:{}", aiAnalysisRequestId,eventType); // 发送消息 CloudEvents cloudEvents = new CloudEvents(); cloudEvents.setId(aiAnalysisRequestId); - cloudEvents.setType("APPLICATION"); + cloudEvents.setType(eventType); cloudEvents.setSource(sourceId); cloudEvents.setSpecversion("1.0"); cloudEvents.setDatacontenttype("application/json"); @@ -218,13 +219,13 @@ public class CorpusPortraitServiceImpl implements CorpusPortraitService { corpusReportDTO.setUserId(userId); corpusReportDTO.setAnalysisScene(1l); // 获取配置 - JSONObject execDifyFlow = diFyService.executeDifyFlow(diFyImageReq, BusinessTypeEnum.SMART_ASSISTANT_QIWEI.getCode(), JSONObject.toJSONString(corpusReportDTO), null); + JSONObject execDifyFlow = diFyService.executeDifyFlow(diFyImageReq, BusinessTypeEnum.CORPUS_PORTRAIT_QIWEI.getCode(), JSONObject.toJSONString(corpusReportDTO), null); log.info("runDify execDifyFlow {}", execDifyFlow); String aiAnalysisRequestId = execDifyFlow.getString("aiAnalysisRequestId"); if (null != execDifyFlow && execDifyFlow.get("status").equals("succeeded")) { JSONObject text = execDifyFlow.getJSONObject("outputs"); - huaWeiService.sendEvent(setCloudEvents(aiAnalysisRequestId, text.toJSONString()),ltoChannelId); + huaWeiService.sendEvent(setCloudEvents(aiAnalysisRequestId, text.toJSONString(),"QIWEI"),ltoChannelId); } try { @@ -268,13 +269,13 @@ public class CorpusPortraitServiceImpl implements CorpusPortraitService { corpusReportDTO.setAnalysisScene(3l); corpusReportDTO.setCarModel(carModel); // 获取配置 - JSONObject execDifyFlow = diFyService.executeDifyFlow(diFyImageReq, BusinessTypeEnum.SMART_ASSISTANT_NAMEPLATE.getCode(), JSONObject.toJSONString(corpusReportDTO),null); + JSONObject execDifyFlow = diFyService.executeDifyFlow(diFyImageReq, BusinessTypeEnum.CORPUS_PORTRAIT_NAMEPLATE.getCode(), JSONObject.toJSONString(corpusReportDTO),null); log.info("runDify execDifyFlow {}", execDifyFlow); String aiAnalysisRequestId = execDifyFlow.getString("aiAnalysisRequestId"); if (null != execDifyFlow && execDifyFlow.get("status").equals("succeeded")) { JSONObject text = execDifyFlow.getJSONObject("outputs"); - huaWeiService.sendEvent(setCloudEvents(aiAnalysisRequestId, text.toJSONString()),ltoChannelId); + huaWeiService.sendEvent(setCloudEvents(aiAnalysisRequestId, text.toJSONString(),"NAMEPLATE"),ltoChannelId); } } catch (Exception e) { log.error("nameplate processItem error {}", e.getMessage());