修改测试问题。
This commit is contained in:
parent
4d2ed89d41
commit
6bf7cd43b7
@ -0,0 +1,33 @@
|
||||
package com.xinelu.common.constant;
|
||||
|
||||
/**
|
||||
* @description: 模板类型
|
||||
* @author: haown
|
||||
* @create: 2024-05-30 13:55
|
||||
**/
|
||||
public class TemplateTypeConstants {
|
||||
/**
|
||||
* 话术
|
||||
*/
|
||||
public static final String SCRIPT = "SCRIPT";
|
||||
|
||||
/**
|
||||
* 微信
|
||||
*/
|
||||
public static final String WECHAT = "WECHAT";
|
||||
|
||||
/**
|
||||
* 短信
|
||||
*/
|
||||
public static final String TEXT_MESSAGE = "TEXT_MESSAGE";
|
||||
|
||||
/**
|
||||
* 问卷
|
||||
*/
|
||||
public static final String QUESTIONNAIRE = "QUESTIONNAIRE";
|
||||
|
||||
/**
|
||||
* 宣教
|
||||
*/
|
||||
public static final String PROPAGANDA = "PROPAGANDA";
|
||||
}
|
||||
@ -274,6 +274,8 @@ public class PatientVisitRecordServiceImpl implements IPatientVisitRecordService
|
||||
patientInfo.setVisitMethod(updDto.getVisitMethod());
|
||||
patientInfo.setDepartmentId(updDto.getDepartmentId());
|
||||
patientInfo.setDepartmentName(updDto.getDepartmentName());
|
||||
patientInfo.setAdmissionTime(updDto.getAdmissionTime());
|
||||
patientInfo.setDischargeTime(updDto.getDischargeTime());
|
||||
setPatientType(patientInfo, patientVisitRecord);
|
||||
patientInfoService.updatePatientInfo(patientInfo);
|
||||
}
|
||||
|
||||
@ -7,6 +7,7 @@ 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.AppletRouteNodeListVo;
|
||||
import com.xinelu.manage.vo.signpatientmanageroutenode.PatientManageNodeInfoVo;
|
||||
import com.xinelu.manage.vo.signpatientmanageroutenode.PatientManageNodeListVo;
|
||||
import com.xinelu.manage.vo.signpatientmanageroutenode.PatientTaskVo;
|
||||
import com.xinelu.manage.vo.signpatientmanageroutenode.SignPatientManageRouteNodeVo;
|
||||
@ -27,7 +28,7 @@ public interface ISignPatientManageRouteNodeService {
|
||||
* @param id 签约患者管理任务路径节点主键
|
||||
* @return 签约患者管理任务路径节点
|
||||
*/
|
||||
SignPatientManageRouteNode selectSignPatientManageRouteNodeById(Long id);
|
||||
PatientManageNodeInfoVo selectSignPatientManageRouteNodeById(Long id);
|
||||
|
||||
/**
|
||||
* 查询患者管理路径节点
|
||||
|
||||
@ -4,6 +4,7 @@ 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.TemplateTypeConstants;
|
||||
import com.xinelu.common.constant.VisitMethodConstants;
|
||||
import com.xinelu.common.enums.NodeExecuteStatusEnum;
|
||||
import com.xinelu.common.enums.RouteCheckStatusEnum;
|
||||
@ -38,6 +39,7 @@ 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.AppletRouteNodeListVo;
|
||||
import com.xinelu.manage.vo.signpatientmanageroutenode.PatientManageNodeInfoVo;
|
||||
import com.xinelu.manage.vo.signpatientmanageroutenode.PatientManageNodeListVo;
|
||||
import com.xinelu.manage.vo.signpatientmanageroutenode.PatientTaskVo;
|
||||
import com.xinelu.manage.vo.signpatientmanageroutenode.SignPatientManageRouteNodeInfoVo;
|
||||
@ -98,8 +100,30 @@ public class SignPatientManageRouteNodeServiceImpl implements ISignPatientManage
|
||||
* @return 签约患者管理任务路径节点
|
||||
*/
|
||||
@Override
|
||||
public SignPatientManageRouteNode selectSignPatientManageRouteNodeById(Long id) {
|
||||
return signPatientManageRouteNodeMapper.selectSignPatientManageRouteNodeById(id);
|
||||
public PatientManageNodeInfoVo selectSignPatientManageRouteNodeById(Long id) {
|
||||
PatientManageNodeInfoVo retVo = new PatientManageNodeInfoVo();
|
||||
SignPatientManageRouteNode node = signPatientManageRouteNodeMapper.selectSignPatientManageRouteNodeById(id);
|
||||
BeanUtils.copyBeanProp(retVo, node);
|
||||
// 判断节点是否选择模板,选择模板则返回模板内容
|
||||
JSONObject detailInfo = new JSONObject();
|
||||
if (node.getPropagandaInfoId() != null) {
|
||||
// 宣教
|
||||
PropagandaMaterialsVo propagandaMaterialsVo = propagandaInfoService.selectPropagandaInfoById(node.getPropagandaInfoId());
|
||||
detailInfo = JSONObject.parseObject(JSONObject.toJSONString(propagandaMaterialsVo));
|
||||
retVo.setTemplateType(TemplateTypeConstants.PROPAGANDA);
|
||||
} else if (StringUtils.isNotBlank(node.getPhoneTemplateId())) {
|
||||
// 话术
|
||||
ScriptInfo scriptInfo = scriptInfoMapper.selectScriptInfoById(node.getPhoneId());
|
||||
detailInfo = JSONObject.parseObject(JSONObject.toJSONString(scriptInfo));
|
||||
retVo.setTemplateType(TemplateTypeConstants.SCRIPT);
|
||||
} else if (node.getQuestionInfoId() != null) {
|
||||
// 问卷
|
||||
QuestionVO questionVO = questionInfoService.selectQuestionInfoById(node.getQuestionInfoId());
|
||||
detailInfo = JSONObject.parseObject(JSONObject.toJSONString(questionVO));
|
||||
retVo.setTemplateType(TemplateTypeConstants.QUESTIONNAIRE);
|
||||
}
|
||||
retVo.setDetailInfo(detailInfo);
|
||||
return retVo;
|
||||
}
|
||||
|
||||
@Override public List<SignPatientManageRouteNodeVo> getNodeList(PatientTaskDto patientTaskDto) {
|
||||
|
||||
@ -2,6 +2,7 @@ package com.xinelu.manage.service.signpatientrecord.impl;
|
||||
|
||||
import com.xinelu.common.constant.SignRecordServiceStatusConstants;
|
||||
import com.xinelu.common.constant.TaskCreateTypeConstant;
|
||||
import com.xinelu.common.constant.TemplateTypeConstants;
|
||||
import com.xinelu.common.enums.NodeExecuteStatusEnum;
|
||||
import com.xinelu.common.enums.RouteCheckStatusEnum;
|
||||
import com.xinelu.common.exception.ServiceException;
|
||||
@ -207,6 +208,23 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService {
|
||||
manageRouteNode.setNodeExecuteStatus(NodeExecuteStatusEnum.UNEXECUTED.getInfo());
|
||||
manageRouteNode.setRouteNodeId(node.getId());
|
||||
manageRouteNode.setExecuteTime(node.getExecutionTime());
|
||||
// 根据模板类型,存放模板字段
|
||||
switch(node.getTemplateType()) {
|
||||
// 宣教
|
||||
case TemplateTypeConstants.PROPAGANDA:
|
||||
manageRouteNode.setPropagandaInfoId(node.getTemplateId());
|
||||
manageRouteNode.setPropagandaTitle(node.getTemplateName());
|
||||
break;
|
||||
// 问卷
|
||||
case TemplateTypeConstants.QUESTIONNAIRE:
|
||||
manageRouteNode.setQuestionInfoId(node.getTemplateId());
|
||||
manageRouteNode.setQuestionnaireName(node.getTemplateName());
|
||||
break;
|
||||
// 话术
|
||||
case TemplateTypeConstants.SCRIPT:
|
||||
manageRouteNode.setPhoneId(node.getTemplateId());
|
||||
break;
|
||||
}
|
||||
manageRouteNode.setDelFlag(0);
|
||||
manageRouteNode.setCreateTime(LocalDateTime.now());
|
||||
manageRouteNode.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
|
||||
|
||||
@ -225,6 +225,7 @@ public class SpecialDiseaseRouteServiceImpl implements ISpecialDiseaseRouteServi
|
||||
return AjaxResult.error("请选择需要发布专病路径的信息!");
|
||||
}
|
||||
if (ReleaseStatusEnum.PUBLISHED.getInfo().equals(specialDiseaseRoute.getReleaseStatus())) {
|
||||
// 专病路径没有节点不能发布
|
||||
int count = specialDiseaseRouteMapper.selectRouteCheckStatus(specialDiseaseRoute.getId(), RouteCheckStatusEnum.AGREE.getInfo());
|
||||
if (count > 0) {
|
||||
return AjaxResult.error("该路径存在未审核的节点,请全部审核后发布!");
|
||||
|
||||
@ -0,0 +1,23 @@
|
||||
package com.xinelu.manage.vo.signpatientmanageroutenode;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @description: 专病节点详情返回视图类
|
||||
* @author: haown
|
||||
* @create: 2024-05-30 14:47
|
||||
**/
|
||||
@Data
|
||||
public class PatientManageNodeInfoVo extends SignPatientManageRouteNode {
|
||||
|
||||
/** 模板类型,话术:SCRIPT,微信:WECHAT,短信:TEXT_MESSAGE,问卷:QUESTIONNAIRE,宣教:PROPAGANDA */
|
||||
@ApiModelProperty(value = "模板类型,话术:SCRIPT,微信:WECHAT,短信:TEXT_MESSAGE,问卷:QUESTIONNAIRE,宣教:PROPAGANDA")
|
||||
private String templateType;
|
||||
|
||||
/** 详细信息 */
|
||||
@ApiModelProperty(value = "详细信息")
|
||||
private JSONObject detailInfo;
|
||||
}
|
||||
@ -161,7 +161,14 @@
|
||||
and route.patient_id = #{patientId}
|
||||
</if>
|
||||
<if test="taskType != null and taskType != ''">
|
||||
<choose>
|
||||
<when test="taskType == 'PROPAGANDA_ARTICLE'.toString()">
|
||||
and node.propaganda_info_id is not null
|
||||
</when>
|
||||
<otherwise>
|
||||
and node.task_type = #{taskType}
|
||||
</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
<if test="taskCreateType != null and taskCreateType != ''">
|
||||
and route.task_create_type = #{taskCreateType}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user