From d75d50ab45d67c1ffe979ebb5ca0c7f0777a3372 Mon Sep 17 00:00:00 2001 From: zhangheng <3226558941@qq.com> Date: Fri, 19 Apr 2024 14:58:07 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=88=91=E7=9A=84=E9=9A=8F=E8=AE=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/homepage/HomePageController.java | 14 ++++++++++++-- .../mobile/mapper/homepage/HomePageMapper.java | 3 ++- .../mobile/service/homepage/HomePageService.java | 14 +++++++++++++- .../homepage/Impl/HomePageServiceImpl.java | 16 +++++++++++++--- .../mobile/vo/myfollowup/MyFollowUpVO.java | 12 +++++++++++- .../resources/mapper/homepage/HomePageMapper.xml | 4 +++- 6 files changed, 54 insertions(+), 9 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 26fcfe2d..0fb203af 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,7 +1,9 @@ package com.xinelu.mobile.controller.homepage; +import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.common.core.page.TableDataInfo; import com.xinelu.mobile.service.homepage.HomePageService; +import com.xinelu.mobile.vo.myfollowup.MyFollowUpVO; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -22,7 +24,15 @@ public class HomePageController { private HomePageService homePageService; @GetMapping("/myFollowUp") - public TableDataInfo myFollowUp(Long residentId) { - return homePageService.myFollowUp(residentId); + public TableDataInfo myFollowUp(MyFollowUpVO myFollowUp) { + return homePageService.myFollowUp(myFollowUp); + } + + /** + * 获取话术信息详细信息 + */ + @GetMapping("/selectScriptInfo") + public AjaxResult selectScriptInfo(Long phoneId) { + return AjaxResult.success(homePageService.selectScriptInfo(phoneId)); } } 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 5b44fb86..1dc67e3c 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,5 +1,6 @@ package com.xinelu.mobile.mapper.homepage; +import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode; import com.xinelu.mobile.vo.myfollowup.MyFollowUpVO; import org.apache.ibatis.annotations.Param; @@ -13,5 +14,5 @@ import java.util.List; */ public interface HomePageMapper { - List selectManageRouteNode(@Param("residentId") Long residentId, @Param("routeNodeName") String routeNodeName); + List selectManageRouteNode(MyFollowUpVO myFollowUp); } \ 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 b849ecb4..45962375 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 @@ -1,8 +1,20 @@ 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.scriptInfo.ScriptInfo; +import com.xinelu.mobile.vo.myfollowup.MyFollowUpVO; public interface HomePageService { - TableDataInfo myFollowUp(Long residentId); + TableDataInfo myFollowUp(MyFollowUpVO myFollowUp); + + /** + * 查询话术信息 + * + * @param phoneId 话术信息主键 + * @return 话术信息 + */ + ScriptInfo selectScriptInfo(Long phoneId); + } \ 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 0a00fb65..2ec52375 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 @@ -3,6 +3,8 @@ package com.xinelu.mobile.service.homepage.Impl; import com.xinelu.common.core.page.TableDataInfo; import com.xinelu.common.enums.RouteNodeNameEnum; import com.xinelu.common.utils.PageServiceUtil; +import com.xinelu.manage.domain.scriptInfo.ScriptInfo; +import com.xinelu.manage.mapper.scriptInfo.ScriptInfoMapper; import com.xinelu.mobile.mapper.homepage.HomePageMapper; import com.xinelu.mobile.service.homepage.HomePageService; import com.xinelu.mobile.vo.myfollowup.MyFollowUpVO; @@ -24,11 +26,14 @@ public class HomePageServiceImpl implements HomePageService { private HomePageMapper homePageMapper; @Resource private PageServiceUtil pageServiceUtil; + @Resource + private ScriptInfoMapper scriptInfoMapper; @Override - public TableDataInfo myFollowUp(Long residentId) { + public TableDataInfo myFollowUp(MyFollowUpVO myFollowUp) { + myFollowUp.setRouteNodeName(RouteNodeNameEnum.AFTER_ADMISSION.getInfo()); pageServiceUtil.startPage(); - List myFollowUpList = homePageMapper.selectManageRouteNode(residentId, RouteNodeNameEnum.AFTER_ADMISSION.getInfo()); + List myFollowUpList = homePageMapper.selectManageRouteNode(myFollowUp); if (CollectionUtils.isEmpty(myFollowUpList)) { return pageServiceUtil.getDataTable(new ArrayList<>()); } @@ -36,9 +41,14 @@ public class HomePageServiceImpl implements HomePageService { if (Objects.nonNull(myFollowUpVO) && Objects.nonNull(myFollowUpVO.getDischargeTime())) { myFollowUpVO.setFollowDate(myFollowUpVO.getDischargeTime().plusDays(myFollowUpVO.getRouteNodeDay())); } - myFollowUpVO.setRouteNodeName("出院后第" + myFollowUpVO.getRouteNodeDay() + "天"); + myFollowUpVO.setFollowName("出院后第" + myFollowUpVO.getRouteNodeDay() + "天"); } myFollowUpList.sort(Comparator.comparing(MyFollowUpVO::getFollowDate).reversed()); return pageServiceUtil.getDataTable(myFollowUpList); } + + @Override + public ScriptInfo selectScriptInfo(Long phoneId) { + return scriptInfoMapper.selectScriptInfoById(phoneId); + } } \ No newline at end of file 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 2bb39a4d..5a2b8a15 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 @@ -1,7 +1,9 @@ package com.xinelu.mobile.vo.myfollowup; import com.fasterxml.jackson.annotation.JsonFormat; +import com.xinelu.common.core.domain.BaseEntity; import lombok.Data; +import lombok.EqualsAndHashCode; import java.time.LocalDate; @@ -11,9 +13,15 @@ import java.time.LocalDate; * @author xinelu * @date 2024-04-18 */ +@EqualsAndHashCode(callSuper = true) @Data -public class MyFollowUpVO { +public class MyFollowUpVO extends BaseEntity { + private Long residentId; + + private Long manageRouteNodeId; + + private Long phoneId; /** * 随访时间 */ @@ -24,6 +32,8 @@ public class MyFollowUpVO { */ private String routeNodeName; + private String followName; + /** * 随访方式 */ diff --git a/postdischarge-mobile/src/main/resources/mapper/homepage/HomePageMapper.xml b/postdischarge-mobile/src/main/resources/mapper/homepage/HomePageMapper.xml index 9d597dc7..7c1a5d82 100644 --- a/postdischarge-mobile/src/main/resources/mapper/homepage/HomePageMapper.xml +++ b/postdischarge-mobile/src/main/resources/mapper/homepage/HomePageMapper.xml @@ -5,7 +5,9 @@