From 3775d26aa452c6f7c615d0ccc0c655a05b53f0d3 Mon Sep 17 00:00:00 2001 From: zhangheng <3226558941@qq.com> Date: Mon, 3 Jun 2024 17:54:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SignPatientManageRouteNodeMapper.java | 6 +++-- .../SignPatientManageRouteNodeMapper.xml | 11 ++++++++-- .../homepage/HomePageController.java | 22 ++++++++++++------- .../service/homepage/HomePageService.java | 5 ++++- .../homepage/Impl/HomePageServiceImpl.java | 9 ++++++-- 5 files changed, 38 insertions(+), 15 deletions(-) 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 2424d0ff..2fdd41f7 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 @@ -88,7 +88,9 @@ public interface SignPatientManageRouteNodeMapper { */ List selectPatientTaskList(PatientTaskDto patientTaskDto); - List selectManageRouteByResidentId(Long residentId); + List selectManageRouteByResidentId(@Param("residentId") Long residentId,@Param("nodeExecuteStatus") String nodeExecuteStatus); - String selectNodeContent(Long id); + String selectNodeContent(Long manageRouteNodeId); + + int updateMessageStatus(SignPatientManageRouteNode signPatientManageRouteNode); } 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 75f26ee8..21ba461f 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.xml @@ -682,7 +682,7 @@ where manage_route_id = #{manageRouteId} - select patient.id as patientId, patient.patient_name, patient.patient_phone, patient.family_member_phone, @@ -750,7 +750,8 @@ spmrn.manage_route_name, spmrn.route_node_name, spmrn.route_node_day, - spmrn.update_time + spmrn.update_time, + spmrn.message_status 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 @@ -766,4 +767,10 @@ from sign_patient_manage_route_node where id = #{id} + + + update sign_patient_manage_route_node + set message_status = #{messageStatus} + where id = #{id} + \ No newline at end of file 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 9e3916d8..ba5dbaf2 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 @@ -4,6 +4,7 @@ import com.xinelu.common.core.controller.BaseController; 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.signpatientmanageroutenode.SignPatientManageRouteNode; import com.xinelu.manage.dto.patientquestionsubmitresult.PatientQuestionSubmitResultDTO; import com.xinelu.mobile.service.homepage.HomePageService; import com.xinelu.mobile.vo.myfollowup.MyFollowUpVO; @@ -53,8 +54,8 @@ public class HomePageController extends BaseController { * 问卷记录信息 */ @GetMapping("/selectQuestionSubmit") - public AjaxResult selectQuestionSubmit(Long patientQuestionSubmitResultId,Long patientTaskExecuteRecordId) { - return homePageService.selectQuestionSubmit(patientQuestionSubmitResultId,patientTaskExecuteRecordId); + public AjaxResult selectQuestionSubmit(Long patientQuestionSubmitResultId, Long patientTaskExecuteRecordId) { + return homePageService.selectQuestionSubmit(patientQuestionSubmitResultId, patientTaskExecuteRecordId); } /** @@ -87,17 +88,22 @@ public class HomePageController extends BaseController { * 微信小程序消息通知跳转页面 */ @GetMapping("/subscriptionMessage") - public AjaxResult subscriptionMessage(Long id){ - return homePageService.subscriptionMessage(id); + public AjaxResult subscriptionMessage(Long id) { + return homePageService.subscriptionMessage(id); } @GetMapping("/messageNotification") - public AjaxResult selectSignPatientManageRouteNode(Long residentId){ + public AjaxResult selectSignPatientManageRouteNode(Long residentId) { return homePageService.selectSignPatientManageRouteNode(residentId); } - @GetMapping("/updateMessageStatus") - private AjaxResult updateMessageStatus(Long manageRouteNodeId){ - return homePageService.updateMessageStatus(manageRouteNodeId); + @GetMapping("/selectNodeContent") + public AjaxResult selectNodeContent(Long manageRouteNodeId) { + return homePageService.selectNodeContent(manageRouteNodeId); + } + + @PostMapping("/updateMessageStatus") + public AjaxResult updateMessageStatus(@RequestBody SignPatientManageRouteNode signPatientManageRouteNode) { + return homePageService.updateMessageStatus(signPatientManageRouteNode); } } \ 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 ecf9e88f..427ac96b 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 @@ -4,6 +4,7 @@ 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.mobile.vo.myfollowup.MyFollowUpVO; @@ -77,5 +78,7 @@ public interface HomePageService { AjaxResult selectSignPatientManageRouteNode(Long residentId); - AjaxResult updateMessageStatus(Long manageRouteNodeId); + AjaxResult selectNodeContent(Long manageRouteNodeId); + + AjaxResult updateMessageStatus(SignPatientManageRouteNode signPatientManageRouteNode); } \ 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 654c16bb..cf2a2723 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 @@ -266,7 +266,7 @@ public class HomePageServiceImpl implements HomePageService { @Override public AjaxResult selectSignPatientManageRouteNode(Long residentId) { - List signPatientManageRouteNodes = signPatientManageRouteNodeMapper.selectManageRouteByResidentId(residentId); + List signPatientManageRouteNodes = signPatientManageRouteNodeMapper.selectManageRouteByResidentId(residentId, NodeExecuteStatusEnum.EXECUTED.getInfo()); if (CollectionUtils.isEmpty(signPatientManageRouteNodes)) { return AjaxResult.success(new ArrayList<>()); } @@ -279,7 +279,12 @@ public class HomePageServiceImpl implements HomePageService { } @Override - public AjaxResult updateMessageStatus(Long manageRouteNodeId) { + public AjaxResult selectNodeContent(Long manageRouteNodeId) { return AjaxResult.success(signPatientManageRouteNodeMapper.selectNodeContent(manageRouteNodeId)); } + + @Override + public AjaxResult updateMessageStatus(SignPatientManageRouteNode signPatientManageRouteNode) { + return AjaxResult.success(signPatientManageRouteNodeMapper.updateMessageStatus(signPatientManageRouteNode)); + } } \ No newline at end of file