Merge remote-tracking branch 'origin/3.11_院后第二增量' into dev
This commit is contained in:
commit
0b4bdf0658
@ -0,0 +1,39 @@
|
||||
package com.xinelu.common.constant;
|
||||
|
||||
/**
|
||||
* @description: 路径名称常量类
|
||||
* @author: haown
|
||||
* @create: 2024-04-17 13:27
|
||||
**/
|
||||
public class RouteNodeNameConstants {
|
||||
|
||||
/**
|
||||
* 出院后
|
||||
*/
|
||||
public static final String AFTER_DISCHARGE = "AFTER_DISCHARGE";
|
||||
|
||||
/**
|
||||
* 入院后
|
||||
*/
|
||||
public static final String AFTER_ADMISSION = "AFTER_ADMISSION";
|
||||
|
||||
/**
|
||||
* 就诊后
|
||||
*/
|
||||
public static final String AFTER_CONSULTATION = "AFTER_CONSULTATION";
|
||||
|
||||
/**
|
||||
* 就诊/出院后
|
||||
*/
|
||||
public static final String AFTER_VISIT_DISCHARGE = "AFTER_VISIT_DISCHARGE";
|
||||
|
||||
/**
|
||||
* 术前
|
||||
*/
|
||||
public static final String PREOPERATIVE = "PREOPERATIVE";
|
||||
|
||||
/**
|
||||
* 术后
|
||||
*/
|
||||
public static final String POSTOPERATIVE = "POSTOPERATIVE";
|
||||
}
|
||||
@ -302,14 +302,6 @@ public class PatientInfo extends BaseEntity {
|
||||
@Excel(name = "就诊时间,格式:yyyy-MM-dd HH:mm:ss", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime visitDate;
|
||||
|
||||
/**
|
||||
* 就诊时间(门诊患者),时间格式:yyyy-MM-dd
|
||||
*/
|
||||
@ApiModelProperty(value = "就诊时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "就诊时间", readConverterExp = "门=诊患者")
|
||||
private LocalDate visitTime;
|
||||
|
||||
/**
|
||||
* 出院方式(出院患者)
|
||||
*/
|
||||
|
||||
@ -310,4 +310,11 @@ public class SignPatientManageRouteNode extends BaseEntity {
|
||||
@ApiModelProperty(value = "文字提醒内容")
|
||||
@Excel(name = "文字提醒内容")
|
||||
private String textRemindContent;
|
||||
|
||||
/**
|
||||
* 节点内容
|
||||
*/
|
||||
@ApiModelProperty(value = "节点内容")
|
||||
@Excel(name = "节点内容")
|
||||
private String nodeContent;
|
||||
}
|
||||
|
||||
@ -305,8 +305,8 @@ public class SpecialDiseaseNode extends BaseEntity {
|
||||
* 节点审核时间
|
||||
*/
|
||||
@ApiModelProperty(value = "节点审核时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "节点审核时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "节点审核时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime routeCheckDate;
|
||||
|
||||
/**
|
||||
|
||||
@ -15,6 +15,9 @@ import org.springframework.format.annotation.DateTimeFormat;
|
||||
@Data
|
||||
public class PatientInfoDto {
|
||||
|
||||
@ApiModelProperty("居民信息表主键")
|
||||
private Long residentId;
|
||||
|
||||
@ApiModelProperty(value = "患者姓名")
|
||||
private String patientName;
|
||||
|
||||
|
||||
@ -0,0 +1,28 @@
|
||||
package com.xinelu.manage.dto.signpatientmanageroutenode;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @description: 小程序-患者任务列表查询传输对象
|
||||
* @author: haown
|
||||
* @create: 2024-04-17 15:35
|
||||
**/
|
||||
@ApiModel("小程序-患者任务列表查询传输对象")
|
||||
@Data
|
||||
public class MobilePatientTaskDto {
|
||||
|
||||
/**
|
||||
* 居民信息表主键
|
||||
*/
|
||||
@ApiModelProperty("居民信息表主键")
|
||||
private Long residentId;
|
||||
|
||||
/**
|
||||
* 任务类型列表
|
||||
*/
|
||||
private List<String> taskTypeList;
|
||||
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
package com.xinelu.manage.dto.signpatientmanageroutenode;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @description: 患者任务节点查询传输对象
|
||||
* @author: haown
|
||||
* @create: 2024-04-17 15:59
|
||||
**/
|
||||
@Data
|
||||
public class SignPatientManageRouteNodeDto {
|
||||
|
||||
/** 签约患者管理任务表id */
|
||||
@ApiModelProperty(value = "签约患者管理任务表id")
|
||||
private Long manageRouteId;
|
||||
|
||||
/** 路径名称(任务名称) */
|
||||
@ApiModelProperty(value = "路径名称")
|
||||
private String manageRouteName;
|
||||
|
||||
/** 管理路径节点名称 */
|
||||
@ApiModelProperty(value = "管理路径节点名称")
|
||||
private String routeNodeName;
|
||||
|
||||
/** 管理路径节点时间,时间单位为:天 */
|
||||
@ApiModelProperty(value = "管理路径节点时间,时间单位为:天")
|
||||
private Integer routeNodeDay;
|
||||
|
||||
/** 任务类型,电话外呼:PHONE_OUTBOUND,问卷量表:QUESTIONNAIRE_SCALE,宣教文章:PROPAGANDA_ARTICLE,文字提醒:TEXT_REMIND,人工随访:ARTIFICIAL_FOLLOW_UP */
|
||||
@ApiModelProperty(value = "任务类型,电话外呼:PHONE_OUTBOUND,问卷量表:QUESTIONNAIRE_SCALE,宣教文章:PROPAGANDA_ARTICLE,文字提醒:TEXT_REMIND,人工随访:ARTIFICIAL_FOLLOW_UP")
|
||||
private String taskType;
|
||||
|
||||
/** 任务状态 */
|
||||
@ApiModelProperty(value = "任务状态")
|
||||
private String taskStatus;
|
||||
|
||||
/**
|
||||
* 任务类型列表
|
||||
* */
|
||||
@ApiModelProperty(value = "任务类型列表")
|
||||
private List<String> taskTypeList;
|
||||
}
|
||||
@ -2,6 +2,7 @@ package com.xinelu.manage.mapper.signpatientmanageroutenode;
|
||||
|
||||
import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode;
|
||||
import com.xinelu.manage.dto.signpatientmanageroutenode.PatientTaskDto;
|
||||
import com.xinelu.manage.dto.signpatientmanageroutenode.SignPatientManageRouteNodeDto;
|
||||
import com.xinelu.manage.vo.signpatientmanageroutenode.PatientTaskVo;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@ -31,10 +32,10 @@ public interface SignPatientManageRouteNodeMapper {
|
||||
/**
|
||||
* 查询签约患者管理任务路径节点列表
|
||||
*
|
||||
* @param signPatientManageRouteNode 签约患者管理任务路径节点
|
||||
* @param signPatientManageRouteNodeDto 签约患者管理任务路径节点查询传输对象
|
||||
* @return 签约患者管理任务路径节点集合
|
||||
*/
|
||||
public List<SignPatientManageRouteNode> selectSignPatientManageRouteNodeList(SignPatientManageRouteNode signPatientManageRouteNode);
|
||||
public List<SignPatientManageRouteNode> selectSignPatientManageRouteNodeList(SignPatientManageRouteNodeDto signPatientManageRouteNodeDto);
|
||||
|
||||
/**
|
||||
* 新增签约患者管理任务路径节点
|
||||
|
||||
@ -1,8 +1,11 @@
|
||||
package com.xinelu.manage.service.signpatientmanageroutenode;
|
||||
|
||||
import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode;
|
||||
import com.xinelu.manage.dto.signpatientmanageroutenode.MobilePatientTaskDto;
|
||||
import com.xinelu.manage.dto.signpatientmanageroutenode.PatientTaskDto;
|
||||
import com.xinelu.manage.dto.signpatientmanageroutenode.RouteNodeCheckDto;
|
||||
import com.xinelu.manage.dto.signpatientmanageroutenode.SignPatientManageRouteNodeDto;
|
||||
import com.xinelu.manage.vo.signpatientmanageroutenode.MobileRouteNodeListVo;
|
||||
import com.xinelu.manage.vo.signpatientmanageroutenode.PatientTaskVo;
|
||||
import com.xinelu.manage.vo.signpatientmanageroutenode.SignPatientManageRouteNodeVo;
|
||||
import java.util.List;
|
||||
@ -41,10 +44,10 @@ public interface ISignPatientManageRouteNodeService {
|
||||
/**
|
||||
* 查询签约患者管理任务路径节点列表
|
||||
*
|
||||
* @param signPatientManageRouteNode 签约患者管理任务路径节点
|
||||
* @param signPatientManageRouteNodeDto 签约患者管理任务路径节点查询传输对象
|
||||
* @return 签约患者管理任务路径节点集合
|
||||
*/
|
||||
public List<SignPatientManageRouteNode> selectSignPatientManageRouteNodeList(SignPatientManageRouteNode signPatientManageRouteNode);
|
||||
List<SignPatientManageRouteNode> selectSignPatientManageRouteNodeList(SignPatientManageRouteNodeDto signPatientManageRouteNodeDto);
|
||||
|
||||
/**
|
||||
* 新增签约患者管理任务路径节点
|
||||
@ -91,4 +94,12 @@ public interface ISignPatientManageRouteNodeService {
|
||||
* @return 结果
|
||||
*/
|
||||
int audit(RouteNodeCheckDto routeNodeCheckDto);
|
||||
|
||||
/**
|
||||
* 小程序端任务列表
|
||||
* @param mobilePatientTaskDto 小程序任务列表查询传输对象
|
||||
* @return
|
||||
*/
|
||||
List<MobileRouteNodeListVo> getMobileTaskList(MobilePatientTaskDto mobilePatientTaskDto);
|
||||
|
||||
}
|
||||
|
||||
@ -1,32 +1,44 @@
|
||||
package com.xinelu.manage.service.signpatientmanageroutenode.impl;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.xinelu.common.constant.RouteNodeNameConstants;
|
||||
import com.xinelu.common.constant.TaskContentConstants;
|
||||
import com.xinelu.common.constant.TaskCreateTypeConstant;
|
||||
import com.xinelu.common.constant.VisitMethodConstants;
|
||||
import com.xinelu.common.exception.ServiceException;
|
||||
import com.xinelu.common.utils.StringUtils;
|
||||
import com.xinelu.common.utils.bean.BeanUtils;
|
||||
import com.xinelu.manage.domain.patientinfo.PatientInfo;
|
||||
import com.xinelu.manage.domain.patientvisitrecord.PatientVisitRecord;
|
||||
import com.xinelu.manage.domain.scriptInfo.ScriptInfo;
|
||||
import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute;
|
||||
import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode;
|
||||
import com.xinelu.manage.domain.signpatientrecord.SignPatientRecord;
|
||||
import com.xinelu.manage.dto.patientinfo.PatientInfoDto;
|
||||
import com.xinelu.manage.dto.signpatientmanageroutenode.MobilePatientTaskDto;
|
||||
import com.xinelu.manage.dto.signpatientmanageroutenode.PatientTaskDto;
|
||||
import com.xinelu.manage.dto.signpatientmanageroutenode.RouteNodeCheckDto;
|
||||
import com.xinelu.manage.dto.signpatientmanageroutenode.SignPatientManageRouteNodeDto;
|
||||
import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper;
|
||||
import com.xinelu.manage.mapper.patientvisitrecord.PatientVisitRecordMapper;
|
||||
import com.xinelu.manage.mapper.scriptInfo.ScriptInfoMapper;
|
||||
import com.xinelu.manage.mapper.signpatientmanageroute.SignPatientManageRouteMapper;
|
||||
import com.xinelu.manage.mapper.signpatientmanageroutenode.SignPatientManageRouteNodeMapper;
|
||||
import com.xinelu.manage.mapper.signpatientrecord.SignPatientRecordMapper;
|
||||
import com.xinelu.manage.service.propagandainfo.IPropagandaInfoService;
|
||||
import com.xinelu.manage.service.questioninfo.IQuestionInfoService;
|
||||
import com.xinelu.manage.service.signpatientmanageroutenode.ISignPatientManageRouteNodeService;
|
||||
import com.xinelu.manage.service.specialdiseaseroute.ISpecialDiseaseRouteService;
|
||||
import com.xinelu.manage.vo.propagandainfo.PropagandaMaterialsVo;
|
||||
import com.xinelu.manage.vo.questionInfo.QuestionVO;
|
||||
import com.xinelu.manage.vo.signpatientmanageroutenode.MobileRouteNodeListVo;
|
||||
import com.xinelu.manage.vo.signpatientmanageroutenode.PatientTaskVo;
|
||||
import com.xinelu.manage.vo.signpatientmanageroutenode.SignPatientManageRouteNodeInfoVo;
|
||||
import com.xinelu.manage.vo.signpatientmanageroutenode.SignPatientManageRouteNodeVo;
|
||||
import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteVO;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
@ -58,6 +70,10 @@ public class SignPatientManageRouteNodeServiceImpl implements ISignPatientManage
|
||||
private IPropagandaInfoService propagandaInfoService;
|
||||
@Resource
|
||||
private ISpecialDiseaseRouteService specialDiseaseRouteService;
|
||||
@Resource
|
||||
private SignPatientRecordMapper signPatientRecordMapper;
|
||||
@Resource
|
||||
private PatientVisitRecordMapper patientVisitRecordMapper;
|
||||
|
||||
/**
|
||||
* 查询签约患者管理任务路径节点
|
||||
@ -149,12 +165,12 @@ public class SignPatientManageRouteNodeServiceImpl implements ISignPatientManage
|
||||
/**
|
||||
* 查询签约患者管理任务路径节点列表
|
||||
*
|
||||
* @param signPatientManageRouteNode 签约患者管理任务路径节点
|
||||
* @param signPatientManageRouteNodeDto 签约患者管理任务路径节点查询传输对象
|
||||
* @return 签约患者管理任务路径节点
|
||||
*/
|
||||
@Override
|
||||
public List<SignPatientManageRouteNode> selectSignPatientManageRouteNodeList(SignPatientManageRouteNode signPatientManageRouteNode) {
|
||||
return signPatientManageRouteNodeMapper.selectSignPatientManageRouteNodeList(signPatientManageRouteNode);
|
||||
public List<SignPatientManageRouteNode> selectSignPatientManageRouteNodeList(SignPatientManageRouteNodeDto signPatientManageRouteNodeDto) {
|
||||
return signPatientManageRouteNodeMapper.selectSignPatientManageRouteNodeList(signPatientManageRouteNodeDto);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -231,4 +247,87 @@ public class SignPatientManageRouteNodeServiceImpl implements ISignPatientManage
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
@Override public List<MobileRouteNodeListVo> getMobileTaskList(MobilePatientTaskDto mobilePatientTaskDto) {
|
||||
// 根据居民信息表主键查询患者信息
|
||||
if (mobilePatientTaskDto.getResidentId() == null) {
|
||||
throw new ServiceException("请输入患者信息!");
|
||||
}
|
||||
if (CollectionUtils.isEmpty(mobilePatientTaskDto.getTaskTypeList())) {
|
||||
throw new ServiceException("数据传输有误!");
|
||||
}
|
||||
List<MobileRouteNodeListVo> retList = new ArrayList<>();
|
||||
// 查询患者表信息
|
||||
PatientInfoDto patientQuery = new PatientInfoDto();
|
||||
patientQuery.setResidentId(mobilePatientTaskDto.getResidentId());
|
||||
List<PatientInfo> patientInfoList = patientInfoMapper.selectPatientInfoList(patientQuery);
|
||||
if (CollectionUtils.isEmpty(patientInfoList)) {
|
||||
return retList;
|
||||
}
|
||||
for (PatientInfo patientInfo : patientInfoList) {
|
||||
// 查询患者最新一次签约记录
|
||||
if (patientInfo.getSignPatientRecordId() == null) {
|
||||
continue;
|
||||
}
|
||||
SignPatientRecord signPatientRecord = signPatientRecordMapper.selectByPrimaryKey(patientInfo.getSignPatientRecordId());
|
||||
if (ObjectUtils.isEmpty(signPatientRecord)) {
|
||||
continue;
|
||||
}
|
||||
PatientVisitRecord patientVisitRecord = patientVisitRecordMapper.selectPatientVisitRecordById(signPatientRecord.getPatientVisitRecordId());
|
||||
if (ObjectUtils.isEmpty(patientVisitRecord)) {
|
||||
continue;
|
||||
}
|
||||
// 根据患者签约记录查询自动生成的任务
|
||||
SignPatientManageRoute signPatientManageRoute = new SignPatientManageRoute();
|
||||
signPatientManageRoute.setSignPatientRecordId(patientInfo.getSignPatientRecordId());
|
||||
signPatientManageRoute.setTaskCreateType(TaskCreateTypeConstant.MANUAL_MATCHE);
|
||||
List<SignPatientManageRoute> signRouteList = signRouteMapper.selectSignPatientManageRouteList(signPatientManageRoute);
|
||||
if (CollectionUtils.isNotEmpty(signRouteList)) {
|
||||
SignPatientManageRoute signRoute = signRouteList.get(0);
|
||||
SignPatientManageRouteNodeDto nodeQuery = new SignPatientManageRouteNodeDto();
|
||||
nodeQuery.setManageRouteId(signRoute.getId());
|
||||
List<SignPatientManageRouteNode> signNodeList = signPatientManageRouteNodeMapper.selectSignPatientManageRouteNodeList(nodeQuery);
|
||||
for (SignPatientManageRouteNode node : signNodeList) {
|
||||
LocalDateTime executeTime = null;
|
||||
switch(node.getRouteNodeName()) {
|
||||
case RouteNodeNameConstants.AFTER_DISCHARGE: // 出院后
|
||||
executeTime = LocalDateTime.of(patientVisitRecord.getDischargeTime().minusDays(node.getRouteNodeDay()).toLocalDate(), node.getExecuteTime());
|
||||
break;
|
||||
case RouteNodeNameConstants.AFTER_ADMISSION: // 入院后
|
||||
executeTime = LocalDateTime.of(patientVisitRecord.getAdmissionTime().minusDays(node.getRouteNodeDay()).toLocalDate(), node.getExecuteTime());
|
||||
break;
|
||||
case RouteNodeNameConstants.AFTER_CONSULTATION: // 就诊后
|
||||
executeTime = LocalDateTime.of(patientVisitRecord.getVisitDate().minusDays(node.getRouteNodeDay()).toLocalDate(), node.getExecuteTime());
|
||||
break;
|
||||
case RouteNodeNameConstants.AFTER_VISIT_DISCHARGE: // 就诊/出院后
|
||||
// 判断是门诊/住院
|
||||
if (StringUtils.equals(VisitMethodConstants.BE_IN_HOSPITAL, patientVisitRecord.getVisitMethod())) {
|
||||
executeTime = LocalDateTime.of(patientVisitRecord.getDischargeTime().minusDays(node.getRouteNodeDay()).toLocalDate(), node.getExecuteTime());
|
||||
} else {
|
||||
executeTime = LocalDateTime.of(patientVisitRecord.getVisitDate().minusDays(node.getRouteNodeDay()).toLocalDate(), node.getExecuteTime());
|
||||
}
|
||||
break;
|
||||
default:
|
||||
executeTime = LocalDateTime.of(patientVisitRecord.getVisitDate().minusDays(node.getRouteNodeDay()).toLocalDate(), node.getExecuteTime());
|
||||
break;
|
||||
}
|
||||
retList.add(MobileRouteNodeListVo.builder()
|
||||
.id(node.getId())
|
||||
.hospitalAgencyName(patientVisitRecord.getHospitalAgencyName())
|
||||
.manageRouteId(node.getManageRouteId())
|
||||
.manageRouteName(node.getManageRouteName())
|
||||
.routeNodeName(node.getRouteNodeName())
|
||||
.routeNodeDay(node.getRouteNodeDay())
|
||||
.taskType(node.getTaskType())
|
||||
.executeTime(executeTime)
|
||||
.build());
|
||||
}
|
||||
}
|
||||
}
|
||||
// 按照时间顺序排序
|
||||
if (CollectionUtils.isNotEmpty(retList)) {
|
||||
retList = retList.stream().sorted(Comparator.comparing(MobileRouteNodeListVo::getExecuteTime)).collect(Collectors.toList());
|
||||
}
|
||||
return retList;
|
||||
}
|
||||
}
|
||||
|
||||
@ -181,6 +181,7 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService {
|
||||
// 保存管理节点
|
||||
SpecialDiseaseNode specialDiseaseNode = new SpecialDiseaseNode();
|
||||
specialDiseaseNode.setRouteId(signPatientManageRoute.getRouteId());
|
||||
specialDiseaseNode.setRouteCheckStatus(RouteCheckStatusEnum.AGREE.getInfo());
|
||||
List<SpecialDiseaseNode> nodeList = specialDiseaseNodeMapper.selectSpecialDiseaseNodeList(specialDiseaseNode);
|
||||
if (CollectionUtils.isEmpty(nodeList)) {
|
||||
throw new ServiceException("该管理任务没有任务节点");
|
||||
@ -191,10 +192,10 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService {
|
||||
manageRouteNode.setManageRouteId(signPatientManageRoute.getId());
|
||||
manageRouteNode.setManageRouteName(signPatientManageRoute.getRouteName());
|
||||
manageRouteNode.setId(null);
|
||||
manageRouteNode.setRouteCheckStatus(RouteCheckStatusEnum.AGREE.name());
|
||||
manageRouteNode.setRouteCheckStatus(RouteCheckStatusEnum.AGREE.getInfo());
|
||||
manageRouteNode.setRouteCheckDate(LocalDateTime.now());
|
||||
manageRouteNode.setRouteCheckRemark("签约自动审核通过");
|
||||
manageRouteNode.setNodeExecuteStatus(NodeExecuteStatusEnum.UNEXECUTED.name());
|
||||
manageRouteNode.setNodeExecuteStatus(NodeExecuteStatusEnum.UNEXECUTED.getInfo());
|
||||
manageRouteNode.setCreateTime(LocalDateTime.now());
|
||||
manageRouteNode.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
|
||||
return manageRouteNode;
|
||||
|
||||
@ -0,0 +1,55 @@
|
||||
package com.xinelu.manage.vo.signpatientmanageroutenode;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @description: 小程序--患者管理路径节点查询返回视图类
|
||||
* @author: haown
|
||||
* @create: 2024-04-17 11:04
|
||||
**/
|
||||
@ApiModel("小程序--患者管理路径节点查询返回视图类")
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class MobileRouteNodeListVo {
|
||||
|
||||
/** 主键id */
|
||||
private Long id;
|
||||
|
||||
/** 所属医院名称 */
|
||||
@ApiModelProperty(value = "所属医院名称")
|
||||
private String hospitalAgencyName;
|
||||
|
||||
/** 签约患者管理任务表id */
|
||||
@ApiModelProperty(value = "签约患者管理任务表id")
|
||||
private Long manageRouteId;
|
||||
|
||||
/** 路径名称(任务名称) */
|
||||
@ApiModelProperty(value = "路径名称")
|
||||
private String manageRouteName;
|
||||
|
||||
/** 管理路径节点名称 */
|
||||
@ApiModelProperty(value = "管理路径节点名称")
|
||||
private String routeNodeName;
|
||||
|
||||
/** 管理路径节点时间,时间单位为:天 */
|
||||
@ApiModelProperty(value = "管理路径节点时间,时间单位为:天")
|
||||
private Integer routeNodeDay;
|
||||
|
||||
/** 任务类型,电话外呼:PHONE_OUTBOUND,问卷量表:QUESTIONNAIRE_SCALE,宣教文章:PROPAGANDA_ARTICLE,文字提醒:TEXT_REMIND,人工随访:ARTIFICIAL_FOLLOW_UP */
|
||||
@ApiModelProperty(value = "任务类型,电话外呼:PHONE_OUTBOUND,问卷量表:QUESTIONNAIRE_SCALE,宣教文章:PROPAGANDA_ARTICLE,文字提醒:TEXT_REMIND,人工随访:ARTIFICIAL_FOLLOW_UP")
|
||||
private String taskType;
|
||||
|
||||
/**
|
||||
* 执行时间
|
||||
*/
|
||||
@ApiModelProperty(value = "执行时间")
|
||||
private LocalDateTime executeTime;
|
||||
}
|
||||
@ -20,4 +20,6 @@ public class SpecialDiseaseNodeVO extends SpecialDiseaseNode {
|
||||
private String taskTypeName;
|
||||
|
||||
private String taskSubdivisionName;
|
||||
|
||||
private String taskStatusName;
|
||||
}
|
||||
|
||||
@ -78,6 +78,9 @@
|
||||
<include refid="selectPatientInfoVo"/>
|
||||
<where>
|
||||
del_flag = 0
|
||||
<if test="residentId != null">
|
||||
and resident_id = #{residentId}
|
||||
</if>
|
||||
<if test="patientName != null and patientName != ''">
|
||||
and patient_name = #{patientName}
|
||||
</if>
|
||||
|
||||
@ -62,6 +62,7 @@
|
||||
<result property="routeHandlePerson" column="route_handle_person"/>
|
||||
<result property="routeLink" column="route_link"/>
|
||||
<result property="textRemindContent" column="text_remind_content"/>
|
||||
<result property="nodeContent" column="node_content"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
@ -69,10 +70,10 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSignPatientManageRouteNodeVo">
|
||||
select id, manage_route_id, manage_route_name, route_node_name, route_node_day, task_type, task_status, task_subdivision, second_classify_describe, execute_time, phone_push_sign, phone_id, phone_template_id, phone_template_name, phone_node_content, phone_redial_times, phone_time_interval, phone_message_remind, phone_message_template_id, phone_message_template_name, question_info_id, questionnaire_name, questionnaire_content, question_expiration_date, propaganda_info_id, propaganda_title, propaganda_content, message_push_sign, message_template_id, message_template_name, message_preview, message_node_content, official_push_sign, official_template_id, official_template_name, official_remind_content, official_node_content, applet_push_sign, applet_template_id, applet_template_name, applet_remind_content, applet_prompt_description, applet_node_content, follow_template_id, follow_template_name, follow_content, route_check_status, route_check_person, route_check_date, route_check_remark, route_node_remark, node_execute_status, route_handle_remark, route_handle_id, route_handle_person, route_link,text_remind_content, create_by, create_time, update_by, update_time from sign_patient_manage_route_node
|
||||
select id, manage_route_id, manage_route_name, route_node_name, route_node_day, task_type, task_status, task_subdivision, second_classify_describe, execute_time, phone_push_sign, phone_id, phone_template_id, phone_template_name, phone_node_content, phone_redial_times, phone_time_interval, phone_message_remind, phone_message_template_id, phone_message_template_name, question_info_id, questionnaire_name, questionnaire_content, question_expiration_date, propaganda_info_id, propaganda_title, propaganda_content, message_push_sign, message_template_id, message_template_name, message_preview, message_node_content, official_push_sign, official_template_id, official_template_name, official_remind_content, official_node_content, applet_push_sign, applet_template_id, applet_template_name, applet_remind_content, applet_prompt_description, applet_node_content, follow_template_id, follow_template_name, follow_content, route_check_status, route_check_person, route_check_date, route_check_remark, route_node_remark, node_execute_status, route_handle_remark, route_handle_id, route_handle_person, route_link,text_remind_content, node_content, create_by, create_time, update_by, update_time from sign_patient_manage_route_node
|
||||
</sql>
|
||||
|
||||
<select id="selectSignPatientManageRouteNodeList" parameterType="SignPatientManageRouteNode" resultMap="SignPatientManageRouteNodeResult">
|
||||
<select id="selectSignPatientManageRouteNodeList" parameterType="com.xinelu.manage.dto.signpatientmanageroutenode.SignPatientManageRouteNodeDto" resultMap="SignPatientManageRouteNodeResult">
|
||||
<include refid="selectSignPatientManageRouteNodeVo"/>
|
||||
<where>
|
||||
<if test="manageRouteId != null ">
|
||||
@ -93,6 +94,12 @@
|
||||
<if test="taskStatus != null and taskStatus != ''">
|
||||
and task_status = #{taskStatus}
|
||||
</if>
|
||||
<if test="taskTypeList != null and taskTypeList.size > 0">
|
||||
and
|
||||
<foreach collection="taskTypeList" item="item" index="index" open="(" close=")" separator="or">
|
||||
task_type = {item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@ -114,7 +121,7 @@
|
||||
node.applet_push_sign, node.applet_template_id, node.applet_template_name, node.applet_remind_content, node.applet_prompt_description, node.applet_node_content,
|
||||
node.follow_template_id, node.follow_template_name, node.follow_content,
|
||||
node.route_check_status, node.route_check_person, node.route_check_date, node.route_check_remark, node.route_node_remark,
|
||||
node.node_execute_status, node.route_handle_remark, node.route_handle_id, node.route_handle_person, node.route_link,node.text_remind_content
|
||||
node.node_execute_status, node.route_handle_remark, node.route_handle_id, node.route_handle_person, node.route_link,node.text_remind_content,node.node_content
|
||||
from sign_patient_manage_route_node node
|
||||
left join sign_patient_manage_route route on node.manage_route_id = route.id
|
||||
<where>
|
||||
@ -260,6 +267,8 @@
|
||||
</if>
|
||||
<if test="textRemindContent != null">text_remind_content,
|
||||
</if>
|
||||
<if test="nodeContent != null">node_content,
|
||||
</if>
|
||||
<if test="createBy != null">create_by,
|
||||
</if>
|
||||
<if test="createTime != null">create_time,
|
||||
@ -382,6 +391,8 @@
|
||||
</if>
|
||||
<if test="textRemindContent != null">#{textRemindContent},
|
||||
</if>
|
||||
<if test="nodeContent != null">#{nodeContent},
|
||||
</if>
|
||||
<if test="createBy != null">#{createBy},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
@ -399,7 +410,7 @@
|
||||
message_template_id, message_template_name, message_preview, message_node_content, official_push_sign, official_template_id, official_template_name, official_remind_content,
|
||||
official_node_content, applet_push_sign, applet_template_id, applet_template_name, applet_remind_content, applet_prompt_description, applet_node_content, follow_template_id,
|
||||
follow_template_name, follow_content, route_check_status, route_check_person, route_check_date, route_check_remark, route_node_remark, node_execute_status, route_handle_remark,
|
||||
route_handle_id, route_handle_person, route_link, text_remind_content,create_by, create_time, update_by, update_time)
|
||||
route_handle_id, route_handle_person, route_link, text_remind_content,node_content, create_by, create_time, update_by, update_time)
|
||||
values
|
||||
<foreach collection="nodeList" item="item" separator=",">
|
||||
(#{item.manageRouteId},#{item.manageRouteName},#{item.routeNodeName},#{item.routeNodeDay},#{item.taskType},#{item.taskStatus},#{item.taskSubdivision},#{item.secondClassifyDescribe},
|
||||
@ -408,7 +419,7 @@
|
||||
#{item.messageTemplateName},#{item.messagePreview},#{item.messageNodeContent},#{item.officialPushSign},#{item.officialTemplateId},#{item.officialTemplateName},#{item.officialRemindContent},#{item.officialNodeContent},
|
||||
#{item.appletPushSign},#{item.appletTemplateId},#{item.appletTemplateName},#{item.appletRemindContent},#{item.appletPromptDescription},#{item.appletNodeContent},#{item.followTemplateId},
|
||||
#{item.followTemplateName},#{item.followContent},#{item.routeCheckStatus},#{item.routeCheckPerson},#{item.routeCheckDate},#{item.routeCheckRemark},#{item.routeNodeRemark},#{item.nodeExecuteStatus},#{item.routeHandleRemark},
|
||||
#{item.routeHandleId},#{item.routeHandlePerson},#{item.routeLink},#{item.textRemindContent},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime})
|
||||
#{item.routeHandleId},#{item.routeHandlePerson},#{item.routeLink},#{item.textRemindContent},#{item.nodeContent},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
<update id="updateSignPatientManageRouteNode" parameterType="SignPatientManageRouteNode">
|
||||
@ -582,6 +593,10 @@
|
||||
<if test="textRemindContent != null">text_remind_content =
|
||||
#{textRemindContent},
|
||||
</if>
|
||||
<if test="nodeContent != null">node_content =
|
||||
#{nodeContent},
|
||||
</if>
|
||||
|
||||
<if test="createBy != null">create_by =
|
||||
#{createBy},
|
||||
</if>
|
||||
|
||||
@ -81,8 +81,6 @@
|
||||
<result property="routeNodeDay" column="route_node_day"/>
|
||||
<result property="taskType" column="task_type"/>
|
||||
<result property="taskSubdivision" column="task_subdivision"/>
|
||||
<result property="taskType" column="taskSubdivisionName"/>
|
||||
<result property="taskSubdivision" column="taskSubdivisionName"/>
|
||||
<result property="taskStatus" column="task_status"/>
|
||||
<result property="secondClassifyDescribe" column="second_classify_describe"/>
|
||||
<result property="executionTime" column="execution_time"/>
|
||||
@ -117,6 +115,9 @@
|
||||
<result property="routeCheckPerson" column="route_check_person"/>
|
||||
<result property="routeCheckDate" column="route_check_date"/>
|
||||
<result property="routeCheckRemark" column="route_check_remark"/>
|
||||
<result property="taskTypeName" column="taskTypeName"/>
|
||||
<result property="taskSubdivisionName" column="taskSubdivisionName"/>
|
||||
<result property="taskStatusName" column="taskStatusName"/>
|
||||
<result property="nodeContent" column="node_content"/>
|
||||
</resultMap>
|
||||
|
||||
@ -753,7 +754,7 @@
|
||||
<select id="selectSpecialDiseaseByRouteId"
|
||||
resultType="com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteVO"
|
||||
resultMap="SpecialDiseaseRouteResult">
|
||||
select sdr.id specialDiseaseRouteId,
|
||||
select sdr.id specialDiseaseRouteId,
|
||||
sdr.department_id,
|
||||
sdr.department_name,
|
||||
sdr.disease_type_id,
|
||||
@ -764,15 +765,15 @@
|
||||
sdr.route_classify,
|
||||
sdr.release_status,
|
||||
sdr.suit_range,
|
||||
sdn.id as specialDiseaseNodeId,
|
||||
sdn.id as specialDiseaseNodeId,
|
||||
sdn.route_id,
|
||||
sdn.route_name,
|
||||
sdn.route_node_name,
|
||||
sdn.route_node_day,
|
||||
sdn.task_type,
|
||||
sdn.task_subdivision,
|
||||
sdn.task_type taskTypeName,
|
||||
sdn.task_subdivision taskSubdivisionName,
|
||||
sdn.task_type,
|
||||
sdn.task_subdivision,
|
||||
sdn.task_status,
|
||||
sdn.second_classify_describe,
|
||||
sdn.execution_time,
|
||||
@ -814,9 +815,15 @@
|
||||
(select COUNT(1)
|
||||
from special_disease_node
|
||||
where route_id = specialDiseaseRouteId
|
||||
and route_check_status = 'AGREE') agreeNumber
|
||||
and route_check_status = 'AGREE') agreeNumber,
|
||||
ttd.task_type_name taskTypeName,
|
||||
tpd.task_partition_name taskSubdivisionName,
|
||||
tsd.task_status_name taskStatusName
|
||||
from special_disease_route sdr
|
||||
left join special_disease_node sdn ON sdn.route_id = sdr.id
|
||||
left join task_type_dict ttd ON ttd.task_type_code = sdn.task_type
|
||||
LEFT JOIN task_status_dict tsd on tsd.task_status_code = sdn.task_status
|
||||
left join task_partition_dict tpd on tpd.task_partition_code = sdn.task_subdivision
|
||||
where sdr.id = #{specialDiseaseRouteId}
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,47 @@
|
||||
package com.xinelu.mobile.controller.appletsignpatienttask;
|
||||
|
||||
import com.xinelu.common.core.domain.R;
|
||||
import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode;
|
||||
import com.xinelu.manage.dto.signpatientmanageroutenode.MobilePatientTaskDto;
|
||||
import com.xinelu.manage.service.signpatientmanageroutenode.ISignPatientManageRouteNodeService;
|
||||
import com.xinelu.manage.vo.signpatientmanageroutenode.MobileRouteNodeListVo;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @description: 小程序-患者任务控制器
|
||||
* @author: haown
|
||||
* @create: 2024-04-17 09:47
|
||||
**/
|
||||
@RestController
|
||||
@RequestMapping("/postDischarge/signnode")
|
||||
public class AppletSignPatientTaskController {
|
||||
@Resource
|
||||
private ISignPatientManageRouteNodeService signNodeService;
|
||||
|
||||
/**
|
||||
* 任务列表
|
||||
*/
|
||||
@ApiOperation("任务列表列表")
|
||||
@GetMapping("/getTaskList")
|
||||
public R<List<MobileRouteNodeListVo>> getMobileTaskList(MobilePatientTaskDto mobilePatientTaskDto) {
|
||||
List<MobileRouteNodeListVo> list = signNodeService.getMobileTaskList(mobilePatientTaskDto);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务详情
|
||||
*/
|
||||
@ApiOperation("任务详情")
|
||||
@GetMapping("/getNodeDetail/{id}")
|
||||
public R<SignPatientManageRouteNode> getNodeDetail(@PathVariable("id") Long id) {
|
||||
return R.ok(signNodeService.selectSignPatientManageRouteNodeById(id));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
package com.xinelu.mobile.vo.signpatientmanageroutenode;
|
||||
|
||||
import com.xinelu.common.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @description: 患者管理路径节点查询返回视图类
|
||||
* @author: haown
|
||||
* @create: 2024-04-17 11:04
|
||||
**/
|
||||
@ApiModel("患者管理路径节点查询返回视图类")
|
||||
@Data
|
||||
public class MobileRouteNodeListVo {
|
||||
|
||||
/** 主键id */
|
||||
private Long id;
|
||||
|
||||
/** 签约患者管理任务表id */
|
||||
@ApiModelProperty(value = "签约患者管理任务表id")
|
||||
@Excel(name = "签约患者管理任务表id")
|
||||
private Long manageRouteId;
|
||||
|
||||
/** 路径名称(任务名称) */
|
||||
@ApiModelProperty(value = "路径名称")
|
||||
@Excel(name = "路径名称", readConverterExp = "任=务名称")
|
||||
private String manageRouteName;
|
||||
|
||||
/** 管理路径节点名称 */
|
||||
@ApiModelProperty(value = "管理路径节点名称")
|
||||
@Excel(name = "管理路径节点名称")
|
||||
private String routeNodeName;
|
||||
|
||||
/** 管理路径节点时间,时间单位为:天 */
|
||||
@ApiModelProperty(value = "管理路径节点时间,时间单位为:天")
|
||||
@Excel(name = "管理路径节点时间,时间单位为:天")
|
||||
private Integer routeNodeDay;
|
||||
|
||||
/** 任务类型,电话外呼:PHONE_OUTBOUND,问卷量表:QUESTIONNAIRE_SCALE,宣教文章:PROPAGANDA_ARTICLE,文字提醒:TEXT_REMIND,人工随访:ARTIFICIAL_FOLLOW_UP */
|
||||
@ApiModelProperty(value = "任务类型,电话外呼:PHONE_OUTBOUND,问卷量表:QUESTIONNAIRE_SCALE,宣教文章:PROPAGANDA_ARTICLE,文字提醒:TEXT_REMIND,人工随访:ARTIFICIAL_FOLLOW_UP")
|
||||
@Excel(name = "任务类型,电话外呼:PHONE_OUTBOUND,问卷量表:QUESTIONNAIRE_SCALE,宣教文章:PROPAGANDA_ARTICLE,文字提醒:TEXT_REMIND,人工随访:ARTIFICIAL_FOLLOW_UP")
|
||||
private String taskType;
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user