Commit 31ba5e43 authored by gaozhaochen's avatar gaozhaochen

update: 问诊机器人回答定制化处理

parent 617814b1
......@@ -53,6 +53,8 @@ public class HpGpIntelligentQAController {
private static final String ERROR_MSG = "使用的人太多啦!等下再用吧!";
private static final Random RANDOM = new Random();
private static final Executor EXECUTOR = Executors.newFixedThreadPool(10);
// 报告查询、医疗知识问答、医疗分诊、预约挂号
private static final Set<String> QA_TYPE= Sets.newHashSet("报告查询","预约挂号");
/**
* 打浦桥科室
......@@ -120,7 +122,7 @@ public class HpGpIntelligentQAController {
public R qaV2(String question) {
if (StrUtil.isNotBlank(question) && question.contains("上周的血检报告出了")) {
IntelligentAnswerVO answerVO = new IntelligentAnswerVO();
answerVO.setAnswer("<a href=\"https://ffyjs.hpwjsns.org.cn/huangpuH5/healthExam\">https://ffyjs.hpwjsns.org.cn/huangpuH5/healthExam</a>");
answerVO.setAnswer("<a href=\"https://www.sh-sict.com/healthExam\">https://www.sh-sict.com/healthExam</a>");
return new R(answerVO);
}
CurrentUser current = SecurityUtils.getCurrentUser();
......@@ -167,6 +169,12 @@ public class HpGpIntelligentQAController {
JSONObject bodyJson = JSON.parseObject(body);
String chat = bodyJson.getString("Chat");
JSONArray departmentArray = bodyJson.getJSONArray("Department");
String medicalType = bodyJson.getString("Medical_type");
if(StrUtil.isNotBlank(medicalType) && QA_TYPE.contains(medicalType)){
IntelligentAnswerVO answerVO = new IntelligentAnswerVO();
answerVO.setAnswer("<a href=\"https://www.sh-sict.com/healthExam\">https://www.sh-sict.com/healthExam</a>");
return new R(answerVO);
}
if (StrUtil.isBlank(chat)) {
return new R();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment