我的随访
This commit is contained in:
parent
8985512315
commit
d75d50ab45
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
@ -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<MyFollowUpVO> selectManageRouteNode(@Param("residentId") Long residentId, @Param("routeNodeName") String routeNodeName);
|
||||
List<MyFollowUpVO> selectManageRouteNode(MyFollowUpVO myFollowUp);
|
||||
}
|
||||
@ -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);
|
||||
|
||||
}
|
||||
@ -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<MyFollowUpVO> myFollowUpList = homePageMapper.selectManageRouteNode(residentId, RouteNodeNameEnum.AFTER_ADMISSION.getInfo());
|
||||
List<MyFollowUpVO> 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);
|
||||
}
|
||||
}
|
||||
@ -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;
|
||||
|
||||
/**
|
||||
* 随访方式
|
||||
*/
|
||||
|
||||
@ -5,7 +5,9 @@
|
||||
<mapper namespace="com.xinelu.mobile.mapper.homepage.HomePageMapper">
|
||||
|
||||
<select id="selectManageRouteNode" resultType="com.xinelu.mobile.vo.myfollowup.MyFollowUpVO">
|
||||
select spmrn.task_type,
|
||||
select
|
||||
spmrn.id manageRouteNodeId,
|
||||
spmrn.task_type,
|
||||
spmrn.route_node_name,
|
||||
IFNULL( spmrn.route_node_day,0) routeNodeDay,
|
||||
pi.discharge_time,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user