diff --git a/postdischarge-common/src/main/java/com/xinelu/common/enums/ReleaseStatusEnum.java b/postdischarge-common/src/main/java/com/xinelu/common/enums/ReleaseStatusEnum.java index 4ee025b0..19ea15b6 100644 --- a/postdischarge-common/src/main/java/com/xinelu/common/enums/ReleaseStatusEnum.java +++ b/postdischarge-common/src/main/java/com/xinelu/common/enums/ReleaseStatusEnum.java @@ -22,7 +22,7 @@ public enum ReleaseStatusEnum { UNPUBLISHED("UNPUBLISHED"), /** - * 不同意 + * 全部 */ ALL("ALL"), ; 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 c88d202e..b0482083 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 @@ -1,13 +1,18 @@ package com.xinelu.mobile.controller.homepage; +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.dto.patientquestionsubmitresult.PatientQuestionSubmitResultDTO; import com.xinelu.mobile.service.homepage.HomePageService; import com.xinelu.mobile.vo.myfollowup.MyFollowUpVO; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; +import java.util.List; + +import static com.xinelu.common.utils.PageUtils.startPage; /** * 机构信息Controller @@ -17,7 +22,7 @@ import javax.annotation.Resource; */ @RestController @RequestMapping("/postDischarge/homePage") -public class HomePageController { +public class HomePageController extends BaseController { @Resource private HomePageService homePageService; @@ -54,8 +59,21 @@ public class HomePageController { return homePageService.selectQuestionSubmit(patientTaskExecuteRecordId); } + /** + * 问卷提交 + */ @PostMapping("/updateTaskExecuteRecord") public AjaxResult updatePatientTaskExecuteRecord(@RequestBody PatientQuestionSubmitResultDTO dto) { return homePageService.updatePatientTaskExecuteRecord(dto); } + + /** + * 健康日志 + */ + @GetMapping("/selectTaskExecuteRecord") + public TableDataInfo selectPatientTaskExecuteRecord(Long residentId) { + startPage(); + List list = homePageService.selectPatientTaskExecuteRecord(residentId); + return getDataTable(list); + } } 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 e19f7642..380bd43b 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,8 @@ package com.xinelu.mobile.mapper.homepage; +import com.xinelu.manage.domain.patienttaskexecuterecord.PatientTaskExecuteRecord; import com.xinelu.mobile.vo.myfollowup.MyFollowUpVO; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -19,4 +21,13 @@ public interface HomePageMapper { * @return TableDataInfo */ List selectManageRouteNode(MyFollowUpVO myFollowUp); + + /** + * 健康日志 + * + * @param residentId 用户id + * @param nodeExecuteStatus 节点状态 + * @return PatientTaskExecuteRecord + */ + List selectTaskExecuteRecordByResidentId(@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 516c06c0..3e312a8a 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 @@ -2,10 +2,13 @@ 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.dto.patientquestionsubmitresult.PatientQuestionSubmitResultDTO; import com.xinelu.mobile.vo.myfollowup.MyFollowUpVO; +import java.util.List; + public interface HomePageService { /** @@ -40,5 +43,19 @@ public interface HomePageService { */ AjaxResult selectQuestionSubmit(Long patientTaskExecuteRecordId); + /** + * 问卷提交 + * + * @param dto 提交信息 + * @return AjaxResult + */ AjaxResult updatePatientTaskExecuteRecord(PatientQuestionSubmitResultDTO dto); + + /** + * 健康日志 + * + * @param residentId 用户id + * @return AjaxResult + */ + List selectPatientTaskExecuteRecord(Long residentId); } \ 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 d628be23..f69eb4c7 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 @@ -228,6 +228,17 @@ public class HomePageServiceImpl implements HomePageService { return AjaxResult.success(); } + /** + * 健康日志 + * + * @param residentId 用户id + * @return AjaxResult + */ + @Override + public List selectPatientTaskExecuteRecord(Long residentId) { + return homePageMapper.selectTaskExecuteRecordByResidentId(residentId, NodeExecuteStatusEnum.EXECUTED.getInfo()); + } + /** * 更新节点任务表 */ diff --git a/postdischarge-mobile/src/main/resources/mapper/homepage/HomePageMapper.xml b/postdischarge-mobile/src/main/resources/mapper/homepage/HomePageMapper.xml index 4cbd6c97..0d40087b 100644 --- a/postdischarge-mobile/src/main/resources/mapper/homepage/HomePageMapper.xml +++ b/postdischarge-mobile/src/main/resources/mapper/homepage/HomePageMapper.xml @@ -24,11 +24,38 @@ LEFT JOIN patient_task_execute_record pter ON pter.manage_route_node_id = spmrn.id - and resident_id = #{residentId} + and pi.resident_id = #{residentId} - and route_node_name = #{routeNodeName} + and spmrn.route_node_name = #{routeNodeName} + + \ No newline at end of file