From 25bec878d1c3fced72f7dc05913b08c2e323bb33 Mon Sep 17 00:00:00 2001 From: zhangheng <3226558941@qq.com> Date: Tue, 9 Jul 2024 18:46:55 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SignPatientManageRouteNodeMapper.java | 9 ---- .../SignPatientManageRouteNodeMapper.xml | 19 ------- .../homepage/HomePageController.java | 8 --- .../mapper/homepage/HomePageMapper.java | 14 +++++- .../service/homepage/HomePageService.java | 8 --- .../homepage/Impl/HomePageServiceImpl.java | 21 ++------ .../vo/homepage/MessageTabulationVO.java | 50 +++++++++++++++++++ .../mapper/homepage/HomePageMapper.xml | 29 +++++++++++ 8 files changed, 96 insertions(+), 62 deletions(-) create mode 100644 postdischarge-mobile/src/main/java/com/xinelu/mobile/vo/homepage/MessageTabulationVO.java diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.java index f69764aa..7cd40a42 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.java @@ -94,15 +94,6 @@ public interface SignPatientManageRouteNodeMapper { */ List selectPatientTaskList(PatientTaskDto patientTaskDto); - /** - * 查询个人任务消息 - * - * @param residentId 用户id - * @param nodeExecuteStatus 状态 - * @return SignPatientManageRouteNode - */ - List selectManageRouteByResidentId(@Param("residentId") Long residentId, @Param("nodeExecuteStatus") String nodeExecuteStatus); - /** * 修改消息状态 * diff --git a/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.xml index 52618356..0a699656 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.xml @@ -764,25 +764,6 @@ group by patient.hospital_agency_id, patient.id - - update sign_patient_manage_route_node set message_status = #{messageStatus} 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 974c2dbe..54cea4ca 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 @@ -84,14 +84,6 @@ public class HomePageController extends BaseController { return homePageService.satisfactionQuestionnaire(residentId); } - /** - * 微信小程序消息通知跳转页面 - */ - @GetMapping("/subscriptionMessage") - public AjaxResult subscriptionMessage(Long id) { - return homePageService.subscriptionMessage(id); - } - /** * 消息通知列表 */ 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 cc22e2d7..55a10f75 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.mobile.vo.homepage.MessageTabulationVO; import com.xinelu.mobile.vo.myfollowup.MyFollowUpVO; import com.xinelu.mobile.vo.satisfactionquestionnaire.SatisfactionQuestionnaire; import com.xinelu.mobile.vo.wechatofficialaccountcallback.PatientVO; @@ -61,8 +62,19 @@ public interface HomePageMapper { /** * 修改执行状态 * - * @param signPatientManageRouteNodeIds + * @param signPatientManageRouteNodeIds 节点id * @return int */ int updateNodeExecuteStatusByIds(@Param("signPatientManageRouteNodeIds") List signPatientManageRouteNodeIds); + + PatientTaskExecuteRecord selectPatientTaskExecuteRecordByManageRouteNodeId(Long manageRouteNodeId); + + /** + * 查询个人任务消息 + * + * @param residentId 用户id + * @param nodeExecuteStatus 状态 + * @return SignPatientManageRouteNode + */ + List selectManageRouteByResidentId(@Param("residentId") Long residentId, @Param("nodeExecuteStatus") String nodeExecuteStatus); } \ 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 c464d150..91ea049e 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 @@ -68,14 +68,6 @@ public interface HomePageService { */ TableDataInfo satisfactionQuestionnaire(Long residentId); - /** - * 微信小程序消息通知跳转页面 - * - * @param id 节点 - * @return AjaxResult - */ - AjaxResult subscriptionMessage(Long id); - /** * 消息通知列表 * 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 c7019ea4..3c26edfe 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 @@ -34,6 +34,7 @@ import com.xinelu.manage.vo.questionsubjectoption.QuestionSubjectOptionVO; import com.xinelu.mobile.mapper.homepage.HomePageMapper; import com.xinelu.mobile.service.homepage.HomePageService; import com.xinelu.mobile.vo.homepage.MessageContentVO; +import com.xinelu.mobile.vo.homepage.MessageTabulationVO; import com.xinelu.mobile.vo.myfollowup.MyFollowUpVO; import com.xinelu.mobile.vo.satisfactionquestionnaire.SatisfactionQuestionnaire; import lombok.extern.slf4j.Slf4j; @@ -253,20 +254,6 @@ public class HomePageServiceImpl implements HomePageService { return pageServiceUtil.getDataTable(satisfactionQuestionnaires); } - /** - * 微信小程序消息通知跳转页面 - * - * @param id 节点 - * @return AjaxResult - */ - @Override - public AjaxResult subscriptionMessage(Long id) { - if (Objects.isNull(id)) { - return AjaxResult.error("该节点以清空!"); - } - return AjaxResult.success(signPatientManageRouteNodeMapper.selectSignPatientManageRouteNodeById(id)); - } - /** * 消息通知列表 * @@ -275,11 +262,11 @@ public class HomePageServiceImpl implements HomePageService { */ @Override public AjaxResult selectSignPatientManageRouteNode(Long residentId) { - List signPatientManageRouteNodes = signPatientManageRouteNodeMapper.selectManageRouteByResidentId(residentId, NodeExecuteStatusEnum.EXECUTED.getInfo()); + List signPatientManageRouteNodes = homePageMapper.selectManageRouteByResidentId(residentId, NodeExecuteStatusEnum.EXECUTED.getInfo()); if (CollectionUtils.isEmpty(signPatientManageRouteNodes)) { return AjaxResult.success(new ArrayList<>()); } - for (SignPatientManageRouteNode manageRouteNode : signPatientManageRouteNodes) { + for (MessageTabulationVO manageRouteNode : signPatientManageRouteNodes) { if (Objects.isNull(manageRouteNode) || TaskContentEnum.PHONE_OUTBOUND.getInfo().equals(manageRouteNode.getTaskType())) { signPatientManageRouteNodes.remove(manageRouteNode); } @@ -333,7 +320,7 @@ public class HomePageServiceImpl implements HomePageService { if (TaskContentEnum.PROPAGANDA_ARTICLE.getInfo().equals(signPatientManageRouteNode.getTaskType())) { //查询宣教信息 PropagandaMaterialsVo propagandaMaterialsVo = propagandaInfoService.selectPropagandaInfoById(signPatientManageRouteNode.getPropagandaInfoId()); - messageContentVO.setTaskType(messageContentVO.getTaskType()); + messageContentVO.setTaskType(TaskContentEnum.PROPAGANDA_ARTICLE.getInfo()); messageContentVO.setPropagandaContent(JSONObject.parseObject(JSONObject.toJSONString(propagandaMaterialsVo))); } //副文本塞值 diff --git a/postdischarge-mobile/src/main/java/com/xinelu/mobile/vo/homepage/MessageTabulationVO.java b/postdischarge-mobile/src/main/java/com/xinelu/mobile/vo/homepage/MessageTabulationVO.java new file mode 100644 index 00000000..85fbe55b --- /dev/null +++ b/postdischarge-mobile/src/main/java/com/xinelu/mobile/vo/homepage/MessageTabulationVO.java @@ -0,0 +1,50 @@ +package com.xinelu.mobile.vo.homepage; + +import lombok.Data; + +/** + * 消息列表返回VO + */ +@Data +public class MessageTabulationVO { + + /** + * 用户id + */ + private Long residentId; + + /** + * 执行记录表id + */ + private Long patientTaskExecuteRecordId; + + /** + * 路径名称(任务名称) + */ + private String manageRouteName; + + /** + * 节点id + */ + private Long manageRouteNodeId; + + /** + * 管理路径节点名称 + */ + private String routeNodeName; + + /** + * 管理路径节点时间,时间单位为:天 + */ + private Integer routeNodeDay; + + /** + * 任务类型,电话外呼:PHONE_OUTBOUND,问卷量表:QUESTIONNAIRE_SCALE,宣教文章:PROPAGANDA_ARTICLE,文字提醒:TEXT_REMIND,人工随访:ARTIFICIAL_FOLLOW_UP,短信提醒:SMS_REMIND + */ + private String taskType; + + /** + * 是否随访标记 0:否 1:是 + */ + private Integer sign; +} diff --git a/postdischarge-mobile/src/main/resources/mapper/homepage/HomePageMapper.xml b/postdischarge-mobile/src/main/resources/mapper/homepage/HomePageMapper.xml index 61ad6e1a..d085528b 100644 --- a/postdischarge-mobile/src/main/resources/mapper/homepage/HomePageMapper.xml +++ b/postdischarge-mobile/src/main/resources/mapper/homepage/HomePageMapper.xml @@ -148,4 +148,33 @@ #{signPatientManageRouteNodeIds} + + + + \ No newline at end of file From f49f838ba0e10256ddca5a12cc71624409f15718 Mon Sep 17 00:00:00 2001 From: youxilong Date: Wed, 10 Jul 2024 09:47:51 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E6=89=8B?= =?UTF-8?q?=E6=9C=BA=E5=8F=B7=E4=B8=8Eopenid=E8=A7=A3=E7=BB=91=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manage/mapper/residentinfo/ResidentInfoMapper.java | 7 +++++++ .../mapper/manage/residentinfo/ResidentInfoMapper.xml | 6 +++++- .../Impl/AppletPersonCenterServiceImpl.java | 4 +++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/residentinfo/ResidentInfoMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/residentinfo/ResidentInfoMapper.java index fa2b0598..70ed372c 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/residentinfo/ResidentInfoMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/residentinfo/ResidentInfoMapper.java @@ -78,4 +78,11 @@ public interface ResidentInfoMapper { * @return 居民基本信息 */ List getResidentInfoByPhoneAndName(@Param("phone") String phone, @Param("patientName") String patientName); + + /** + * 更新用户openid + * @param residentInfo 用户信息 + * @return 结果 + */ + int updateResidentInfoOpenid(ResidentInfo residentInfo); } diff --git a/postdischarge-manage/src/main/resources/mapper/manage/residentinfo/ResidentInfoMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/residentinfo/ResidentInfoMapper.xml index e3d682b6..762c29e6 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/residentinfo/ResidentInfoMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/residentinfo/ResidentInfoMapper.xml @@ -173,7 +173,11 @@ where id = #{id} - + + UPDATE resident_info SET open_id = #{openId} WHERE id = #{id} + + + delete from resident_info where id = #{id} diff --git a/postdischarge-mobile/src/main/java/com/xinelu/mobile/service/appletpersoncenter/Impl/AppletPersonCenterServiceImpl.java b/postdischarge-mobile/src/main/java/com/xinelu/mobile/service/appletpersoncenter/Impl/AppletPersonCenterServiceImpl.java index 0d220c7d..5a075f78 100644 --- a/postdischarge-mobile/src/main/java/com/xinelu/mobile/service/appletpersoncenter/Impl/AppletPersonCenterServiceImpl.java +++ b/postdischarge-mobile/src/main/java/com/xinelu/mobile/service/appletpersoncenter/Impl/AppletPersonCenterServiceImpl.java @@ -279,6 +279,7 @@ public class AppletPersonCenterServiceImpl implements AppletPersonCenterService // 更新用户的openid ResidentInfo residentInfo = residentInfos.get(0); residentInfo.setOpenId(openId); + residentInfo.setUpdateTime(LocalDateTime.now()); residentInfoMapper.updateResidentInfo(residentInfo); log.info("用户注册成功,姓名:{},手机号:{},openid:{}", verifySmsCodeDTO.getPatientName(), verifySmsCodeDTO.getPhoneNum(), openId); return AjaxResult.success("注册成功!", residentInfo); @@ -310,7 +311,8 @@ public class AppletPersonCenterServiceImpl implements AppletPersonCenterService // 清空openid字段,更新用户信息 residentInfo.setOpenId(null); - residentInfoMapper.updateResidentInfo(residentInfo); + residentInfo.setUpdateTime(LocalDateTime.now()); + residentInfoMapper.updateResidentInfoOpenid(residentInfo); log.info("解绑成功,手机号:{},openId:{}", phoneNum, openId); return AjaxResult.success("解绑成功!"); } catch (Exception e) { From bb9cadb72e57ee97f2153665caf3bc7bc1c21c80 Mon Sep 17 00:00:00 2001 From: youxilong Date: Wed, 10 Jul 2024 09:53:31 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../appletpersoncenter/Impl/AppletPersonCenterServiceImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/postdischarge-mobile/src/main/java/com/xinelu/mobile/service/appletpersoncenter/Impl/AppletPersonCenterServiceImpl.java b/postdischarge-mobile/src/main/java/com/xinelu/mobile/service/appletpersoncenter/Impl/AppletPersonCenterServiceImpl.java index 5a075f78..16d1156f 100644 --- a/postdischarge-mobile/src/main/java/com/xinelu/mobile/service/appletpersoncenter/Impl/AppletPersonCenterServiceImpl.java +++ b/postdischarge-mobile/src/main/java/com/xinelu/mobile/service/appletpersoncenter/Impl/AppletPersonCenterServiceImpl.java @@ -279,6 +279,7 @@ public class AppletPersonCenterServiceImpl implements AppletPersonCenterService // 更新用户的openid ResidentInfo residentInfo = residentInfos.get(0); residentInfo.setOpenId(openId); + residentInfo.setUpdateBy(residentInfo.getPatientName()); residentInfo.setUpdateTime(LocalDateTime.now()); residentInfoMapper.updateResidentInfo(residentInfo); log.info("用户注册成功,姓名:{},手机号:{},openid:{}", verifySmsCodeDTO.getPatientName(), verifySmsCodeDTO.getPhoneNum(), openId); @@ -311,6 +312,7 @@ public class AppletPersonCenterServiceImpl implements AppletPersonCenterService // 清空openid字段,更新用户信息 residentInfo.setOpenId(null); + residentInfo.setUpdateBy(residentInfo.getPatientName()); residentInfo.setUpdateTime(LocalDateTime.now()); residentInfoMapper.updateResidentInfoOpenid(residentInfo); log.info("解绑成功,手机号:{},openId:{}", phoneNum, openId); From 15ae7531d6af831c201ed6451c2ce218201d3b9c Mon Sep 17 00:00:00 2001 From: zhangheng <3226558941@qq.com> Date: Wed, 10 Jul 2024 15:09:50 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PatientQuestionSubjectResult.java | 4 ++-- .../mobile/mapper/homepage/HomePageMapper.java | 2 ++ .../homepage/Impl/HomePageServiceImpl.java | 15 +++++++++++++++ .../mobile/vo/homepage/MessageContentVO.java | 10 ++++++++++ .../mapper/homepage/HomePageMapper.xml | 17 ++++++++++++++++- 5 files changed, 45 insertions(+), 3 deletions(-) diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientquestionsubjectresult/PatientQuestionSubjectResult.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientquestionsubjectresult/PatientQuestionSubjectResult.java index 4f498b01..46f7429a 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientquestionsubjectresult/PatientQuestionSubjectResult.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientquestionsubjectresult/PatientQuestionSubjectResult.java @@ -87,14 +87,14 @@ public class PatientQuestionSubjectResult extends BaseEntity { * 回答(填空题) */ @ApiModelProperty(value = "回答") - @Excel(name = "回答", readConverterExp = "填=空题") + @Excel(name = "回答", readConverterExp = "填空题") private String fillBlanksAnswer; /** * 选项个数(打分题) */ @ApiModelProperty(value = "选项个数") - @Excel(name = "选项个数", readConverterExp = "打=分题") + @Excel(name = "选项个数", readConverterExp = "打分题") private Integer optionCount; /** 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 55a10f75..cb21e255 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 @@ -77,4 +77,6 @@ public interface HomePageMapper { * @return SignPatientManageRouteNode */ List selectManageRouteByResidentId(@Param("residentId") Long residentId, @Param("nodeExecuteStatus") String nodeExecuteStatus); + + PatientTaskExecuteRecord selectPatientManageRouteByManageRouteNodeId(Long manageRouteNodeId); } \ No newline at end of file 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 3c26edfe..a234bee4 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 @@ -21,6 +21,7 @@ import com.xinelu.manage.dto.patientquestionsubmitresult.PatientQuestionSubmitRe import com.xinelu.manage.mapper.patientquestionoptionresult.PatientQuestionOptionResultMapper; import com.xinelu.manage.mapper.patientquestionsubjectresult.PatientQuestionSubjectResultMapper; import com.xinelu.manage.mapper.patientquestionsubmitresult.PatientQuestionSubmitResultMapper; +import com.xinelu.manage.mapper.patienttaskexecuterecord.PatientTaskExecuteRecordMapper; import com.xinelu.manage.mapper.questioninfo.QuestionInfoMapper; import com.xinelu.manage.mapper.questionsubject.QuestionSubjectMapper; import com.xinelu.manage.mapper.questionsubjectoption.QuestionSubjectOptionMapper; @@ -79,6 +80,8 @@ public class HomePageServiceImpl implements HomePageService { private SignPatientManageRouteNodeMapper signPatientManageRouteNodeMapper; @Resource private IPropagandaInfoService propagandaInfoService; + @Resource + private PatientTaskExecuteRecordMapper patientTaskExecuteRecordMapper; /** * 我的随访列表 @@ -175,8 +178,20 @@ public class HomePageServiceImpl implements HomePageService { @Transactional(rollbackFor = Exception.class) public AjaxResult updatePatientTaskExecuteRecord(PatientQuestionSubmitResultDTO dto) { LocalDateTime time = LocalDateTime.now(); + //新增患者管理任务执行记录表 + PatientTaskExecuteRecord patientTaskExecuteRecord = homePageMapper.selectPatientManageRouteByManageRouteNodeId(dto.getManageRouteNodeId()); + patientTaskExecuteRecord.setExecuteTime(time); + patientTaskExecuteRecord.setCreateTime(time); + patientTaskExecuteRecordMapper.insertPatientTaskExecuteRecord(patientTaskExecuteRecord); + //患者问卷提交结果信息表 PatientQuestionSubmitResult patientQuestionSubmitResult = new PatientQuestionSubmitResult(); BeanUtils.copyBeanProp(patientQuestionSubmitResult, dto); + patientQuestionSubmitResult.setTaskExecuteRecordId(patientTaskExecuteRecord.getId()); + patientQuestionSubmitResult.setQuestionInfoId(dto.getQuestionInfoId()); + patientQuestionSubmitResult.setPatientId(patientTaskExecuteRecord.getPatientId()); + patientQuestionSubmitResult.setPatientName(patientTaskExecuteRecord.getPatientName()); + patientQuestionSubmitResult.setManageRouteId(patientTaskExecuteRecord.getManageRouteId()); + patientQuestionSubmitResult.setManageRouteName(patientTaskExecuteRecord.getManageRouteName()); patientQuestionSubmitResult.setCreateTime(time); // 新增患者问卷提交结果 if (patientQuestionSubmitResultMapper.insertPatientQuestionSubmitResult(patientQuestionSubmitResult) <= 0) { diff --git a/postdischarge-mobile/src/main/java/com/xinelu/mobile/vo/homepage/MessageContentVO.java b/postdischarge-mobile/src/main/java/com/xinelu/mobile/vo/homepage/MessageContentVO.java index 6a0af36e..19f93260 100644 --- a/postdischarge-mobile/src/main/java/com/xinelu/mobile/vo/homepage/MessageContentVO.java +++ b/postdischarge-mobile/src/main/java/com/xinelu/mobile/vo/homepage/MessageContentVO.java @@ -10,6 +10,16 @@ import lombok.Data; @Data public class MessageContentVO { + /** + * 签约患者管理任务路径节点表 + */ + private Long manageRouteNodeId; + + /** + * 患者id + */ + private Long patientId; + /** * 任务类型 */ diff --git a/postdischarge-mobile/src/main/resources/mapper/homepage/HomePageMapper.xml b/postdischarge-mobile/src/main/resources/mapper/homepage/HomePageMapper.xml index d085528b..f092e739 100644 --- a/postdischarge-mobile/src/main/resources/mapper/homepage/HomePageMapper.xml +++ b/postdischarge-mobile/src/main/resources/mapper/homepage/HomePageMapper.xml @@ -165,7 +165,8 @@ spmrn.update_time, spmrn.message_status, IF(pter.id is NULL, 0, 1) sign, - pter.id patientTaskExecuteRecordId + pter.id patientTaskExecuteRecordId, + spmrn.task_type from sign_patient_manage_route_node spmrn LEFT JOIN sign_patient_manage_route spmr ON spmr.id = spmrn.manage_route_id LEFT JOIN patient_info pi on pi.id = spmr.patient_id @@ -177,4 +178,18 @@ and pi.del_flag = 0 Order BY spmrn.update_time DESC + + \ No newline at end of file From 40b960951ec8fd7ae2e2473123e14f1d517dbb5a Mon Sep 17 00:00:00 2001 From: zhangheng <3226558941@qq.com> Date: Wed, 10 Jul 2024 17:26:22 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../homepage/HomePageController.java | 20 +++++---- .../mapper/homepage/HomePageMapper.java | 14 +++++- .../service/homepage/HomePageService.java | 6 +-- .../homepage/Impl/HomePageServiceImpl.java | 19 +++++--- .../mobile/vo/myfollowup/MyFollowUpVO.java | 2 + .../mapper/homepage/HomePageMapper.xml | 45 +++++++++++++------ 6 files changed, 72 insertions(+), 34 deletions(-) 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 From 1ab53abaae975e3e58195db0d93a04325e817666 Mon Sep 17 00:00:00 2001 From: zhangheng <3226558941@qq.com> Date: Wed, 10 Jul 2024 17:32:05 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../signpatientmanageroute/SignPatientManageRouteMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroute/SignPatientManageRouteMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroute/SignPatientManageRouteMapper.xml index 06f81705..a798333c 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroute/SignPatientManageRouteMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroute/SignPatientManageRouteMapper.xml @@ -345,7 +345,7 @@ LEFT JOIN patient_info pi ON spmr.patient_id = pi.id LEFT JOIN patient_visit_record pvr ON pi.patient_visit_record_id = pvr.id - pi.del_flag = '0' AND spmr.task_create_type = 'MANUAL_CREATE' + pi.del_flag = '0' AND spmrn.route_check_status = 'AGREE' AND spmrn.task_type in ('PHONE_OUTBOUND','QUESTIONNAIRE_SCALE','ARTIFICIAL_FOLLOW_UP')