|
|
|
@ -92,7 +92,7 @@ public class AskServiceImpl implements AskService {
|
|
|
|
|
.eq(AskPatientAnswer::getLibraryQuestionId, library.getId()).last("limit 1").one();
|
|
|
|
|
// 如果没有找到回答,去默认回答里面看看有没有
|
|
|
|
|
if (ObjectUtil.isEmpty(askPatientAnswer)) {
|
|
|
|
|
log.info("{}:病历配置的回答:{}:为空,尝试回答默认答案", rasaResult, askPatientAnswer.getId());
|
|
|
|
|
log.info("{}:病历配置,未找到回答结果,尝试回答默认答案", rasaResult);
|
|
|
|
|
// 首先看看default里面是不是存在,如果存在,就从default里面去找
|
|
|
|
|
if (CollUtil.isNotEmpty(library.getDefaultAnswer())) {
|
|
|
|
|
String resText = library.getDefaultAnswer().get(RandomUtil.randomInt(0, library.getDefaultAnswer().size()));
|
|
|
|
@ -164,18 +164,17 @@ public class AskServiceImpl implements AskService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void setActionRelation(TalkResultResVO talkResultResVO){
|
|
|
|
|
private void setActionRelation(TalkResultResVO talkResultResVO) {
|
|
|
|
|
Integer type = talkResultResVO.getType();
|
|
|
|
|
String actionId = talkResultResVO.getActionId();
|
|
|
|
|
if (StrUtil.isEmpty(actionId) || null == type){
|
|
|
|
|
if (StrUtil.isEmpty(actionId) || null == type) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 体格检查
|
|
|
|
|
if (type.equals(2)){
|
|
|
|
|
if (type.equals(2)) {
|
|
|
|
|
ConfigPhysicalTool configPhysicalTool = configPhysicalToolService.getById(actionId);
|
|
|
|
|
if (null != configPhysicalTool){
|
|
|
|
|
if (null != configPhysicalTool) {
|
|
|
|
|
talkResultResVO.setItemName(configPhysicalTool.getToolName());
|
|
|
|
|
talkResultResVO.setItemImage(configPhysicalTool.getIconBase64());
|
|
|
|
|
talkResultResVO.setRequireLocation(configPhysicalTool.getRequireLocation());
|
|
|
|
@ -183,9 +182,9 @@ public class AskServiceImpl implements AskService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 辅助检查
|
|
|
|
|
if (type.equals(3)){
|
|
|
|
|
if (type.equals(3)) {
|
|
|
|
|
ConfigAncillaryItem configAncillaryItem = configAncillaryItemService.getById(actionId);
|
|
|
|
|
if (null != configAncillaryItem){
|
|
|
|
|
if (null != configAncillaryItem) {
|
|
|
|
|
talkResultResVO.setItemName(configAncillaryItem.getItemName());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|