13 changed files with 483 additions and 21 deletions
@ -0,0 +1,87 @@ |
|||
package com.acupuncture.web.controller.web; |
|||
|
|||
import com.acupuncture.common.annotation.Anonymous; |
|||
import com.acupuncture.common.core.domain.BaseDto; |
|||
import com.acupuncture.common.core.domain.JsonResponse; |
|||
import com.acupuncture.system.domain.dto.FmsFollowupDto; |
|||
import com.acupuncture.system.domain.vo.FmsFollowupVo; |
|||
import com.acupuncture.system.service.FmsFollowupQueueService; |
|||
import com.acupuncture.system.service.FmsFollowupService; |
|||
import com.github.pagehelper.PageHelper; |
|||
import com.github.pagehelper.PageInfo; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import javax.annotation.Resource; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zzc |
|||
* @Package com.acupuncture.web.controller.web |
|||
* @Date 2025/2/11 16:45 |
|||
* @description: |
|||
*/ |
|||
@Slf4j |
|||
@Api(tags = "随访相关") |
|||
@RestController |
|||
@RequestMapping("/followup") |
|||
public class FmsFollowupController { |
|||
@Resource |
|||
private FmsFollowupQueueService fmsFollowupQueueService; |
|||
@Resource |
|||
private FmsFollowupService fmsFollowupService; |
|||
|
|||
@ApiOperation("查询公共队列") |
|||
@PostMapping("/commonQueue") |
|||
@Anonymous |
|||
public JsonResponse<PageInfo<FmsFollowupVo.FollowupQueueVO>> queryCommonQueue(@RequestBody @Validated BaseDto<FmsFollowupDto.QueueQuery> dto) { |
|||
if (dto.getPageNum() > 0) { |
|||
PageHelper.startPage(dto.getPageNum(), dto.getPageSize()); |
|||
} |
|||
return JsonResponse.ok(new PageInfo<>(fmsFollowupQueueService.queryCommonQueue(dto.getParam().getName()))); |
|||
} |
|||
|
|||
@ApiOperation("查询随访队列") |
|||
@PostMapping("/query") |
|||
public JsonResponse<PageInfo<FmsFollowupVo.FollowupQueueVO>> queryQueue(@RequestBody @Validated BaseDto<FmsFollowupDto.FollowupQueueQueryDTO> dto){ |
|||
if (dto.getPageNum() > 0) { |
|||
PageHelper.startPage(dto.getPageNum(), dto.getPageSize()); |
|||
} |
|||
return JsonResponse.ok(new PageInfo<>(fmsFollowupService.queryQueue(dto.getParam()))); |
|||
} |
|||
|
|||
@ApiOperation("查询随访患者") |
|||
@PostMapping("/queryPatient") |
|||
public JsonResponse<PageInfo<FmsFollowupVo.FollowupPatient>> queryPatient(@RequestBody @Validated BaseDto<FmsFollowupDto.FollowupPatientQueryDTO> dto){ |
|||
if (dto.getPageNum() > 0) { |
|||
PageHelper.startPage(dto.getPageNum(), dto.getPageSize()); |
|||
} |
|||
return JsonResponse.ok(new PageInfo<>(fmsFollowupService.queryPatient(dto.getParam()))); |
|||
} |
|||
|
|||
@ApiOperation("查询随访任务") |
|||
@PostMapping("/queryTask") |
|||
public JsonResponse<PageInfo<FmsFollowupVo.FollowupTaskVO>> queryTask(@RequestBody @Validated BaseDto<FmsFollowupDto.FollowupTaskQueryDTO> dto){ |
|||
return JsonResponse.ok(new PageInfo<>(fmsFollowupService.queryTask(dto.getParam()))); |
|||
} |
|||
|
|||
@ApiOperation("标记为失访") |
|||
@PostMapping("/updStatus") |
|||
public JsonResponse<Integer> markAsLost(@RequestBody @Validated FmsFollowupDto.FollowupLostDTO dto){ |
|||
fmsFollowupService.markAsLost(dto); |
|||
return JsonResponse.ok(); |
|||
} |
|||
|
|||
@ApiOperation("完成随访") |
|||
@PostMapping("/followPatient") |
|||
public JsonResponse<Integer> completeFollowup(@RequestBody @Validated FmsFollowupDto.FollowupCompleteDTO dto){ |
|||
fmsFollowupService.completeFollowup(dto); |
|||
return JsonResponse.ok(); |
|||
} |
|||
} |
@ -0,0 +1,53 @@ |
|||
package com.acupuncture.system.service; |
|||
|
|||
import com.acupuncture.system.domain.dto.FmsFollowupDto; |
|||
import com.acupuncture.system.domain.vo.FmsFollowupVo; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zzc |
|||
* @Package com.acupuncture.system.service |
|||
* @Date 2025/2/11 16:46 |
|||
* @description: |
|||
*/ |
|||
public interface FmsFollowupService { |
|||
/** |
|||
* 查询随访队列 |
|||
* @param dto |
|||
* @return |
|||
*/ |
|||
List<FmsFollowupVo.FollowupQueueVO> queryQueue(FmsFollowupDto.FollowupQueueQueryDTO dto); |
|||
|
|||
/** |
|||
* 查询随访患者 |
|||
* @param dto |
|||
* @return |
|||
*/ |
|||
List<FmsFollowupVo.FollowupPatient> queryPatient(FmsFollowupDto.FollowupPatientQueryDTO dto); |
|||
|
|||
/** |
|||
* 查询随访任务 |
|||
* @param dto |
|||
* @return |
|||
*/ |
|||
List<FmsFollowupVo.FollowupTaskVO> queryTask(FmsFollowupDto.FollowupTaskQueryDTO dto); |
|||
/** |
|||
* 标记为失访 |
|||
* @param dto |
|||
*/ |
|||
void markAsLost(FmsFollowupDto.FollowupLostDTO dto); |
|||
/** |
|||
* 完成随访 |
|||
* @param dto |
|||
*/ |
|||
void completeFollowup(FmsFollowupDto.FollowupCompleteDTO dto); |
|||
|
|||
/** |
|||
* 定时任务添加随访工单 |
|||
*/ |
|||
void task(); |
|||
|
|||
} |
@ -0,0 +1,68 @@ |
|||
package com.acupuncture.system.service.impl; |
|||
|
|||
import cn.hutool.core.collection.CollectionUtil; |
|||
import com.acupuncture.system.domain.dto.FmsFollowupDto; |
|||
import com.acupuncture.system.domain.vo.FmsFollowupVo; |
|||
import com.acupuncture.system.persist.dao.FmsFollowupDao; |
|||
import com.acupuncture.system.service.FmsFollowupService; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import javax.annotation.Resource; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zzc |
|||
* @Package com.acupuncture.system.service |
|||
* @Date 2025/2/11 16:46 |
|||
* @description: |
|||
*/ |
|||
@Service |
|||
public class FmsFollowupServiceImpl implements FmsFollowupService { |
|||
|
|||
@Resource |
|||
private FmsFollowupDao fmsFollowupDao; |
|||
|
|||
|
|||
@Override |
|||
public List<FmsFollowupVo.FollowupQueueVO> queryQueue(FmsFollowupDto.FollowupQueueQueryDTO dto) { |
|||
return fmsFollowupDao.selectQueueList(dto.getId()); |
|||
} |
|||
|
|||
@Override |
|||
public List<FmsFollowupVo.FollowupPatient> queryPatient(FmsFollowupDto.FollowupPatientQueryDTO dto) { |
|||
return fmsFollowupDao.queryPatient(dto.getId()); |
|||
} |
|||
|
|||
@Override |
|||
public List<FmsFollowupVo.FollowupTaskVO> queryTask(FmsFollowupDto.FollowupTaskQueryDTO dto) { |
|||
return fmsFollowupDao.selectTaskList(dto); |
|||
} |
|||
|
|||
@Override |
|||
public void markAsLost(FmsFollowupDto.FollowupLostDTO dto) { |
|||
fmsFollowupDao.updateStatusToLost(dto); |
|||
} |
|||
|
|||
@Override |
|||
public void completeFollowup(FmsFollowupDto.FollowupCompleteDTO dto) { |
|||
fmsFollowupDao.completeFollowup(dto); |
|||
} |
|||
|
|||
@Override |
|||
public void task() { |
|||
//获取随访患者列表,根据患者出院日时间和队列添加工单
|
|||
//1. 查询队列
|
|||
List<FmsFollowupVo.FollowupQueueVO> queueList = fmsFollowupDao.selectQueueList(null); |
|||
if (CollectionUtil.isEmpty(queueList)) { |
|||
//查询公共队列
|
|||
List<FmsFollowupVo.FollowupQueueVO> queueResults = fmsFollowupDao.queryCommonQueue(null); |
|||
} |
|||
//2. 查询队列随访患者列表
|
|||
List<FmsFollowupVo.FollowupPatient> patientList = fmsFollowupDao.queryPatient(null); |
|||
//3. 判断随访类型
|
|||
//4. 根据频次和总月数添加
|
|||
|
|||
} |
|||
|
|||
|
|||
} |
Loading…
Reference in new issue