diff --git a/postdischarge-mobile/src/main/java/com/xinelu/mobile/controller/homepage/HomePageController.java b/postdischarge-mobile/src/main/java/com/xinelu/mobile/controller/homepage/HomePageController.java index 54cea4ca..e4abca75 100644 --- a/postdischarge-mobile/src/main/java/com/xinelu/mobile/controller/homepage/HomePageController.java +++ b/postdischarge-mobile/src/main/java/com/xinelu/mobile/controller/homepage/HomePageController.java @@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import java.util.List; +import java.util.Objects; /** * 小程序首页Controller @@ -35,11 +36,11 @@ public class HomePageController extends BaseController { } /** - * 获取话术信息详细信息 + * 获取话术信息详细信息(随访) */ @GetMapping("/selectScriptInfo") - public AjaxResult selectScriptInfo(Long templateId) { - return AjaxResult.success(homePageService.selectScriptInfo(templateId)); + public AjaxResult selectScriptInfo(Long patientTaskExecuteRecordId) { + return AjaxResult.success(homePageService.selectScriptInfo(patientTaskExecuteRecordId)); } /** @@ -51,15 +52,18 @@ public class HomePageController extends BaseController { } /** - * 问卷记录信息 + * 问卷记录信息(消息记录) */ @GetMapping("/selectQuestionSubmit") public AjaxResult selectQuestionSubmit(Long patientQuestionSubmitResultId, Long patientTaskExecuteRecordId) { + if (Objects.isNull(patientQuestionSubmitResultId) && Objects.isNull(patientTaskExecuteRecordId)) { + return AjaxResult.error("请选择记录信息!"); + } return homePageService.selectQuestionSubmit(patientQuestionSubmitResultId, patientTaskExecuteRecordId); } /** - * 问卷提交 + * 问卷提交(消息记录) */ @PostMapping("/updateTaskExecuteRecord") public AjaxResult updatePatientTaskExecuteRecord(@RequestBody PatientQuestionSubmitResultDTO dto) { @@ -85,7 +89,7 @@ public class HomePageController extends BaseController { } /** - * 消息通知列表 + * 消息通知列表(消息记录) */ @GetMapping("/messageNotification") public AjaxResult selectSignPatientManageRouteNode(Long residentId) { @@ -93,7 +97,7 @@ public class HomePageController extends BaseController { } /** - * 消息推送内容 + * 消息推送内容(消息记录) */ @GetMapping("/selectMessageContent") public AjaxResult selectMessageContent(Long manageRouteNodeId) { @@ -101,7 +105,7 @@ public class HomePageController extends BaseController { } /** - * 修改消息状态 + * 修改消息状态(消息记录) */ @PostMapping("/updateMessageStatus") public AjaxResult updateMessageStatus(@RequestBody SignPatientManageRouteNode signPatientManageRouteNode) { diff --git a/postdischarge-mobile/src/main/java/com/xinelu/mobile/mapper/homepage/HomePageMapper.java b/postdischarge-mobile/src/main/java/com/xinelu/mobile/mapper/homepage/HomePageMapper.java index cb21e255..28063a5a 100644 --- a/postdischarge-mobile/src/main/java/com/xinelu/mobile/mapper/homepage/HomePageMapper.java +++ b/postdischarge-mobile/src/main/java/com/xinelu/mobile/mapper/homepage/HomePageMapper.java @@ -1,6 +1,7 @@ package com.xinelu.mobile.mapper.homepage; import com.xinelu.manage.domain.patienttaskexecuterecord.PatientTaskExecuteRecord; +import com.xinelu.manage.vo.signpatientmanageroute.PhonePush; import com.xinelu.mobile.vo.homepage.MessageTabulationVO; import com.xinelu.mobile.vo.myfollowup.MyFollowUpVO; import com.xinelu.mobile.vo.satisfactionquestionnaire.SatisfactionQuestionnaire; @@ -67,8 +68,6 @@ public interface HomePageMapper { */ int updateNodeExecuteStatusByIds(@Param("signPatientManageRouteNodeIds") List signPatientManageRouteNodeIds); - PatientTaskExecuteRecord selectPatientTaskExecuteRecordByManageRouteNodeId(Long manageRouteNodeId); - /** * 查询个人任务消息 * @@ -78,5 +77,16 @@ public interface HomePageMapper { */ List selectManageRouteByResidentId(@Param("residentId") Long residentId, @Param("nodeExecuteStatus") String nodeExecuteStatus); + /** + * 查询患者管理任务执行记录表 + * + * @param manageRouteNodeId id + * @return PatientTaskExecuteRecord + */ PatientTaskExecuteRecord selectPatientManageRouteByManageRouteNodeId(Long manageRouteNodeId); + + /** + * 话术类型代办处理详情 + */ + PhonePush selectPhoneNodeContent(Long patientTaskExecuteRecordId); } \ No newline at end of file diff --git a/postdischarge-mobile/src/main/java/com/xinelu/mobile/service/homepage/HomePageService.java b/postdischarge-mobile/src/main/java/com/xinelu/mobile/service/homepage/HomePageService.java index 91ea049e..838c5772 100644 --- a/postdischarge-mobile/src/main/java/com/xinelu/mobile/service/homepage/HomePageService.java +++ b/postdischarge-mobile/src/main/java/com/xinelu/mobile/service/homepage/HomePageService.java @@ -3,9 +3,9 @@ package com.xinelu.mobile.service.homepage; import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.common.core.page.TableDataInfo; import com.xinelu.manage.domain.patienttaskexecuterecord.PatientTaskExecuteRecord; -import com.xinelu.manage.domain.scriptInfo.ScriptInfo; import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode; import com.xinelu.manage.dto.patientquestionsubmitresult.PatientQuestionSubmitResultDTO; +import com.xinelu.manage.vo.signpatientmanageroute.PhonePush; import com.xinelu.mobile.vo.myfollowup.MyFollowUpVO; import java.util.List; @@ -23,10 +23,10 @@ public interface HomePageService { /** * 查询话术信息 * - * @param templateId 话术信息主键 + * @param patientTaskExecuteRecordId 话术信息主键 * @return 话术信息 */ - ScriptInfo selectScriptInfo(Long templateId); + PhonePush selectScriptInfo(Long patientTaskExecuteRecordId); /** * 问卷信息 diff --git a/postdischarge-mobile/src/main/java/com/xinelu/mobile/service/homepage/Impl/HomePageServiceImpl.java b/postdischarge-mobile/src/main/java/com/xinelu/mobile/service/homepage/Impl/HomePageServiceImpl.java index a234bee4..16541e50 100644 --- a/postdischarge-mobile/src/main/java/com/xinelu/mobile/service/homepage/Impl/HomePageServiceImpl.java +++ b/postdischarge-mobile/src/main/java/com/xinelu/mobile/service/homepage/Impl/HomePageServiceImpl.java @@ -13,7 +13,6 @@ import com.xinelu.manage.domain.patientquestionsubmitresult.PatientQuestionSubmi import com.xinelu.manage.domain.patienttaskexecuterecord.PatientTaskExecuteRecord; import com.xinelu.manage.domain.questioninfo.QuestionInfo; import com.xinelu.manage.domain.questionsubject.QuestionSubject; -import com.xinelu.manage.domain.scriptInfo.ScriptInfo; import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode; import com.xinelu.manage.dto.patientquestionoptionresult.PatientQuestionOptionResultDTO; import com.xinelu.manage.dto.patientquestionsubjectresult.PatientQuestionSubjectResultDTO; @@ -32,6 +31,7 @@ import com.xinelu.manage.vo.propagandainfo.PropagandaMaterialsVo; import com.xinelu.manage.vo.questionInfo.QuestionVO; import com.xinelu.manage.vo.questionsubject.QuestionSubjectVO; import com.xinelu.manage.vo.questionsubjectoption.QuestionSubjectOptionVO; +import com.xinelu.manage.vo.signpatientmanageroute.PhonePush; import com.xinelu.mobile.mapper.homepage.HomePageMapper; import com.xinelu.mobile.service.homepage.HomePageService; import com.xinelu.mobile.vo.homepage.MessageContentVO; @@ -91,7 +91,7 @@ public class HomePageServiceImpl implements HomePageService { */ @Override public TableDataInfo myFollowUp(MyFollowUpVO myFollowUp) { - myFollowUp.setRouteNodeName(RouteNodeNameEnum.AFTER_DISCHARGE.getInfo()); + myFollowUp.setNodeExecuteStatus(NodeExecuteStatusEnum.EXECUTED.getInfo()); List myFollowUpList = homePageMapper.selectManageRouteNode(myFollowUp); int total = myFollowUpList.size(); if (CollectionUtils.isEmpty(myFollowUpList)) { @@ -101,7 +101,7 @@ public class HomePageServiceImpl implements HomePageService { if (Objects.nonNull(myFollowUpVO) && Objects.nonNull(myFollowUpVO.getDischargeTime())) { myFollowUpVO.setFollowDate(myFollowUpVO.getDischargeTime().plusDays(myFollowUpVO.getRouteNodeDay())); } - myFollowUpVO.setFollowName("出院后第" + myFollowUpVO.getRouteNodeDay() + "天"); + myFollowUpVO.setFollowName(myFollowUpVO.getManageRouteNodeName() + myFollowUpVO.getRouteNodeDay() + "天"); } myFollowUpList.sort(Comparator.comparing(MyFollowUpVO::getFollowDate).reversed()); //处理上面查询的list集合 @@ -118,12 +118,12 @@ public class HomePageServiceImpl implements HomePageService { /** * 查询话术信息 * - * @param templateId 话术信息主键 + * @param patientTaskExecuteRecordId 话术信息主键 * @return 话术信息 */ @Override - public ScriptInfo selectScriptInfo(Long templateId) { - return scriptInfoMapper.selectScriptInfoById(templateId); + public PhonePush selectScriptInfo(Long patientTaskExecuteRecordId) { + return homePageMapper.selectPhoneNodeContent(patientTaskExecuteRecordId); } /** @@ -341,7 +341,12 @@ public class HomePageServiceImpl implements HomePageService { //副文本塞值 if (!TaskContentEnum.PROPAGANDA_ARTICLE.getInfo().equals(signPatientManageRouteNode.getTaskType()) && !TaskContentEnum.QUESTIONNAIRE_SCALE.getInfo().equals(signPatientManageRouteNode.getTaskType()) && !TaskContentEnum.ARTIFICIAL_FOLLOW_UP.getInfo().equals(signPatientManageRouteNode.getTaskType())) { messageContentVO.setTaskType(TaskContentEnum.TEXT_REMIND.getInfo()); - messageContentVO.setNodeContent(signPatientManageRouteNode.getNodeContent()); + if (StringUtils.isNotBlank(signPatientManageRouteNode.getNodeContent())) { + messageContentVO.setNodeContent(signPatientManageRouteNode.getNodeContent()); + } + if (StringUtils.isNotBlank(signPatientManageRouteNode.getTextRemindContent())) { + messageContentVO.setNodeContent(signPatientManageRouteNode.getTextRemindContent()); + } } return AjaxResult.success(messageContentVO); } diff --git a/postdischarge-mobile/src/main/java/com/xinelu/mobile/vo/myfollowup/MyFollowUpVO.java b/postdischarge-mobile/src/main/java/com/xinelu/mobile/vo/myfollowup/MyFollowUpVO.java index f77f780b..b7671386 100644 --- a/postdischarge-mobile/src/main/java/com/xinelu/mobile/vo/myfollowup/MyFollowUpVO.java +++ b/postdischarge-mobile/src/main/java/com/xinelu/mobile/vo/myfollowup/MyFollowUpVO.java @@ -24,6 +24,8 @@ public class MyFollowUpVO { private String manageRouteNodeName; + private String nodeExecuteStatus; + /** * 用户id */ diff --git a/postdischarge-mobile/src/main/resources/mapper/homepage/HomePageMapper.xml b/postdischarge-mobile/src/main/resources/mapper/homepage/HomePageMapper.xml index f092e739..f699daee 100644 --- a/postdischarge-mobile/src/main/resources/mapper/homepage/HomePageMapper.xml +++ b/postdischarge-mobile/src/main/resources/mapper/homepage/HomePageMapper.xml @@ -20,21 +20,23 @@ IF(pter.id is NULL,0,1) sign, CASE WHEN spmrn.task_type = 'PHONE_OUTBOUND' THEN spmrn.phone_id - WHEN spmrn.task_type = 'QUESTIONNAIRE_SCALE' THEN spmrn.question_info_id WHEN spmrn.task_type = 'ARTIFICIAL_FOLLOW_UP' THEN spmrn.follow_template_id END AS templateId - FROM patient_info pi - LEFT JOIN sign_patient_manage_route spmr ON spmr.patient_id = pi.id - LEFT JOIN sign_patient_manage_route_node spmrn ON spmrn.manage_route_id = spmr.id + FROM sign_patient_manage_route_node spmrn + LEFT JOIN sign_patient_manage_route spmr ON spmrn.manage_route_id = spmr.id + LEFT JOIN patient_info pi ON spmr.id = pi.id LEFT JOIN patient_task_execute_record pter ON pter.manage_route_node_id = spmrn.id - spmrn.task_type in('PHONE_OUTBOUND','QUESTIONNAIRE_SCALE','ARTIFICIAL_FOLLOW_UP') + spmrn.task_type in('PHONE_OUTBOUND','ARTIFICIAL_FOLLOW_UP') and pi.resident_id = #{residentId} and spmrn.route_node_name = #{routeNodeName} + + and spmrn.node_execute_status = #{nodeExecuteStatus} + @@ -67,13 +69,13 @@ - select * - from patient_task_execute_record - where manage_route_node_id = #{manageRouteNodeId} - - + + \ No newline at end of file