|
|
@ -92,7 +92,7 @@ public class AskServiceImpl implements AskService {
|
|
|
|
.eq(AskPatientAnswer::getLibraryQuestionId, library.getId()).last("limit 1").one();
|
|
|
|
.eq(AskPatientAnswer::getLibraryQuestionId, library.getId()).last("limit 1").one();
|
|
|
|
// 如果没有找到回答,去默认回答里面看看有没有
|
|
|
|
// 如果没有找到回答,去默认回答里面看看有没有
|
|
|
|
if (ObjectUtil.isEmpty(askPatientAnswer)) {
|
|
|
|
if (ObjectUtil.isEmpty(askPatientAnswer)) {
|
|
|
|
log.info("{}:病历配置的回答:{}:为空,尝试回答默认答案", rasaResult, askPatientAnswer.getId());
|
|
|
|
log.info("{}:病历配置,未找到回答结果,尝试回答默认答案", rasaResult);
|
|
|
|
// 首先看看default里面是不是存在,如果存在,就从default里面去找
|
|
|
|
// 首先看看default里面是不是存在,如果存在,就从default里面去找
|
|
|
|
if (CollUtil.isNotEmpty(library.getDefaultAnswer())) {
|
|
|
|
if (CollUtil.isNotEmpty(library.getDefaultAnswer())) {
|
|
|
|
String resText = library.getDefaultAnswer().get(RandomUtil.randomInt(0, library.getDefaultAnswer().size()));
|
|
|
|
String resText = library.getDefaultAnswer().get(RandomUtil.randomInt(0, library.getDefaultAnswer().size()));
|
|
|
@ -164,7 +164,6 @@ public class AskServiceImpl implements AskService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void setActionRelation(TalkResultResVO talkResultResVO) {
|
|
|
|
private void setActionRelation(TalkResultResVO talkResultResVO) {
|
|
|
|
Integer type = talkResultResVO.getType();
|
|
|
|
Integer type = talkResultResVO.getType();
|
|
|
|
String actionId = talkResultResVO.getActionId();
|
|
|
|
String actionId = talkResultResVO.getActionId();
|
|
|
|