From b042766862cb9b1beb413b2934c8919ad4a8912b Mon Sep 17 00:00:00 2001 From: zhuangyuanke Date: Tue, 17 Dec 2024 08:58:33 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=B9=B4=E9=BE=84=20?= =?UTF-8?q?=E5=85=BC=E5=AE=B9bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SignPatientManageRouteServiceImpl.java | 27 ++++++++++++++++--- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/impl/SignPatientManageRouteServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/impl/SignPatientManageRouteServiceImpl.java index c6962e2e..a842c682 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/impl/SignPatientManageRouteServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/impl/SignPatientManageRouteServiceImpl.java @@ -24,6 +24,7 @@ import com.xinelu.manage.domain.patientquestionsubmitresult.PatientQuestionSubmi import com.xinelu.manage.domain.patienttaskexecuterecord.PatientTaskExecuteRecord; import com.xinelu.manage.domain.patientvisitrecord.PatientVisitRecord; import com.xinelu.manage.domain.phonedialrecord.PhoneDialRecord; +import com.xinelu.manage.domain.questioninfo.QuestionInfo; import com.xinelu.manage.domain.scriptInfo.ScriptInfo; import com.xinelu.manage.domain.shortmessagesendrecord.ShortMessageSendRecord; import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute; @@ -477,7 +478,9 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout @Override public AjaxResult selectFollowPatientInfo(Long id) { ManualFollowPatientVO patientVO = signPatientManageRouteMapper.selectFollowPatientInfo(id); - // 设置年龄 + if (Objects.isNull(patientVO.getAge())) + // 设置年龄 + patientVO.setAge(AgeUtil.getAgeMonth(patientVO.getBirthDate().toString())); if (ObjectUtils.isEmpty(patientVO)) { return AjaxResult.error("患者信息不存在!"); } @@ -1097,8 +1100,7 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout signPatientManageRouteNode.setTaskExcuteType(TaskExcuteTypeEnum.BATCH_TASK.getInfo()); signPatientManageRouteNode.setSn(signPatientManageRoute.getSn()); - } - else + } else signPatientManageRouteNode.setTaskExcuteType(TaskExcuteTypeEnum.ACTUAL_TIME_TASK.getInfo()); signPatientManageRouteNode.setNodePlanTime(routeNode.getNodePlanTime()); @@ -1122,13 +1124,30 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout signPatientManageRouteNode.setQuestionnaireName(StringUtils.isBlank(routeNode.getQuestionnaireName()) ? null : routeNode.getQuestionnaireName()); signPatientManageRouteNode.setQuestionnaireContent(StringUtils.isBlank(routeNode.getQuestionnaireContent()) ? null : routeNode.getQuestionnaireContent()); signPatientManageRouteNode.setQuestionExpirationDate(Objects.isNull(routeNode.getQuestionExpirationDate()) ? null : routeNode.getQuestionExpirationDate()); - signPatientManageRouteNode.setPhoneDialMethod(StringUtils.isBlank(routeNode.getPhoneDialMethod()) ? null : routeNode.getPhoneDialMethod()); + + //如果是电话外呼,则设置外呼标识为1 zyk 20241216 + if (StringUtils.equals(PhoneDialMethodEnum.AI.getInfo(), routeNode.getPhoneDialMethod()) || StringUtils.equals(PhoneDialMethodEnum.COMMON.getInfo(), routeNode.getPhoneDialMethod())) { + signPatientManageRouteNode.setPhoneDialMethod(StringUtils.isBlank(routeNode.getPhoneDialMethod()) ? null : routeNode.getPhoneDialMethod()); + signPatientManageRouteNode.setPhonePushSign(Objects.isNull(routeNode.getPhonePushSign()) ? null : routeNode.getPhonePushSign()); + } + //根据问卷ID,获取问卷信息 zyk 20241216 + QuestionInfo questionInfo = questionInfoService.selectQuestionInfoById(signPatientManageRouteNode.getQuestionInfoId()); + + if (ObjectUtils.isNotEmpty(questionInfo)) { + signPatientManageRouteNode.setScriptInfoId(questionInfo.getScriptInfoId()); + signPatientManageRouteNode.setRobotPublishId(questionInfo.getRobotPublishId()); + // 节点是否是AI电话 zyk 20241216 + if (com.xinelu.common.utils.StringUtils.equals(PhoneDialMethodEnum.AI.getInfo(), routeNode.getPhoneDialMethod()) && com.xinelu.common.utils.StringUtils.isBlank(questionInfo.getRobotPublishId())) { + throw new ServiceException("第三方机器人id为空"); + } + } } //宣教 if (Objects.nonNull(routeNode) && TaskNodeTypeEnum.PROPAGANDA_ARTICLE.getInfo().equals(routeNode.getTaskNodeType())) { signPatientManageRouteNode.setPropagandaInfoId(Objects.isNull(routeNode.getPropagandaInfoId()) ? null : routeNode.getPropagandaInfoId()); signPatientManageRouteNode.setPropagandaTitle(StringUtils.isBlank(routeNode.getPropagandaTitle()) ? null : routeNode.getPropagandaTitle()); signPatientManageRouteNode.setPropagandaContent(StringUtils.isBlank(routeNode.getPropagandaContent()) ? null : routeNode.getPropagandaContent()); + } //文字提醒 if (Objects.nonNull(routeNode) && TaskNodeTypeEnum.TEXT_REMIND.getInfo().equals(routeNode.getTaskNodeType())) {