diff --git a/ai-analytic-center-biz/src/main/java/com/volvo/ai/analytic/center/service/impl/IntelligentCustomerServiceImpl.java b/ai-analytic-center-biz/src/main/java/com/volvo/ai/analytic/center/service/impl/IntelligentCustomerServiceImpl.java index 11bbf1c..12752ba 100644 --- a/ai-analytic-center-biz/src/main/java/com/volvo/ai/analytic/center/service/impl/IntelligentCustomerServiceImpl.java +++ b/ai-analytic-center-biz/src/main/java/com/volvo/ai/analytic/center/service/impl/IntelligentCustomerServiceImpl.java @@ -108,21 +108,16 @@ public class IntelligentCustomerServiceImpl implements IntelligentCustomerServic String message = null; try { JSONObject outputsJson = execDifyFlow.getJSONObject("outputs"); - JSONObject textJsonObject =outputsJson.getJSONObject("text"); - if(textJsonObject.containsKey("answer")){ - textJsonObject = textJsonObject.getJSONObject("answer"); // 投诉 - } + // 咨询 + JSONObject textJsonObject =outputsJson.getJSONObject("text").getJSONObject("consult"); ConsultDTO consultDTO = new ConsultDTO(); consultDTO.setOrderType(fourInOneMqServiceFilter(IntelligentCustomerTypeEnum.CONSULT.getCode(),textJsonObject.getString("工单类别"))); consultDTO.setProblemDescription(textJsonObject.getString("问题描述")); consultDTO.setContactSex(textJsonObject.getString("工单联系人性别")); consultDTO.setContactName(textJsonObject.getString("工单联系人姓名")); consultDTO.setContactTelephone(textJsonObject.getString("工单联系电话")); - - JSONObject complainObject = outputsJson.getJSONObject("text1"); - if(complainObject.containsKey("answer")){ - complainObject = complainObject.getJSONObject("answer"); // 投诉 - } + // 投诉 + JSONObject complainObject = outputsJson.getJSONObject("text1").getJSONObject("complain"); ComplainDTO complainDTO = new ComplainDTO(); complainDTO.setComplainType(fourInOneMqServiceFilter(IntelligentCustomerTypeEnum.CONSULT_TYPE.getCode(),complainObject.getString("投诉类型"))); complainDTO.setOrderType(fourInOneMqServiceFilter(IntelligentCustomerTypeEnum.COMPLAIN.getCode(),complainObject.getString("工单类别")));