修改测试问题。
This commit is contained in:
parent
26b455d0b5
commit
a697410e52
@ -5,11 +5,11 @@ import com.xinelu.common.core.domain.R;
|
|||||||
import com.xinelu.common.core.page.TableDataInfo;
|
import com.xinelu.common.core.page.TableDataInfo;
|
||||||
import com.xinelu.common.exception.ServiceException;
|
import com.xinelu.common.exception.ServiceException;
|
||||||
import com.xinelu.common.utils.StringUtils;
|
import com.xinelu.common.utils.StringUtils;
|
||||||
import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode;
|
|
||||||
import com.xinelu.manage.dto.signpatientmanageroutenode.PatientTaskDto;
|
import com.xinelu.manage.dto.signpatientmanageroutenode.PatientTaskDto;
|
||||||
import com.xinelu.manage.dto.signpatientmanageroutenode.RouteNodeCheckDto;
|
import com.xinelu.manage.dto.signpatientmanageroutenode.RouteNodeCheckDto;
|
||||||
import com.xinelu.manage.dto.signpatientmanageroutenode.SignPatientManageRouteNodeDto;
|
import com.xinelu.manage.dto.signpatientmanageroutenode.SignPatientManageRouteNodeDto;
|
||||||
import com.xinelu.manage.service.signpatientmanageroutenode.ISignPatientManageRouteNodeService;
|
import com.xinelu.manage.service.signpatientmanageroutenode.ISignPatientManageRouteNodeService;
|
||||||
|
import com.xinelu.manage.vo.signpatientmanageroutenode.PatientManageNodeInfoVo;
|
||||||
import com.xinelu.manage.vo.signpatientmanageroutenode.PatientManageNodeListVo;
|
import com.xinelu.manage.vo.signpatientmanageroutenode.PatientManageNodeListVo;
|
||||||
import com.xinelu.manage.vo.signpatientmanageroutenode.PatientTaskVo;
|
import com.xinelu.manage.vo.signpatientmanageroutenode.PatientTaskVo;
|
||||||
import com.xinelu.manage.vo.signpatientmanageroutenode.SignPatientManageRouteNodeVo;
|
import com.xinelu.manage.vo.signpatientmanageroutenode.SignPatientManageRouteNodeVo;
|
||||||
@ -55,8 +55,7 @@ public class SignPatientManageRouteNodeController extends BaseController {
|
|||||||
@ApiOperation("患者任务列表查询")
|
@ApiOperation("患者任务列表查询")
|
||||||
@GetMapping("/getList")
|
@GetMapping("/getList")
|
||||||
public R<List<PatientManageNodeListVo>> getList(SignPatientManageRouteNodeDto signPatientManageRouteNodeDto) {
|
public R<List<PatientManageNodeListVo>> getList(SignPatientManageRouteNodeDto signPatientManageRouteNodeDto) {
|
||||||
List<PatientManageNodeListVo> list = signNodeService.selectPatientManageNodeList(signPatientManageRouteNodeDto);
|
return R.ok(signNodeService.selectPatientManageNodeList(signPatientManageRouteNodeDto));
|
||||||
return R.ok(list);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -64,19 +63,27 @@ public class SignPatientManageRouteNodeController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation("查询节点详情")
|
@ApiOperation("查询节点详情")
|
||||||
@GetMapping("/getById/{id}")
|
@GetMapping("/getById/{id}")
|
||||||
public R<SignPatientManageRouteNode> getById(@PathVariable("id") Long id) {
|
public R<PatientManageNodeInfoVo> getById(@PathVariable("id") Long id) {
|
||||||
return R.ok(signNodeService.selectSignPatientManageRouteNodeById(id));
|
return R.ok(signNodeService.selectSignPatientManageRouteNodeById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据节点类型查询节点列表详情
|
||||||
|
*/
|
||||||
|
@ApiOperation("根据节点类型查询节点列表详情")
|
||||||
|
@GetMapping("/getNodeListByPatient")
|
||||||
|
public R<List<PatientManageNodeInfoVo>> getNodeListByPatient(PatientTaskDto patientTaskDto) {
|
||||||
|
return R.ok(signNodeService.getNodeListByPatient(patientTaskDto));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 患者详情--查询患者手动创建的任务节点列表
|
* 患者详情--查询患者任务路径及节点列表
|
||||||
*/
|
*/
|
||||||
@ApiOperation("患者详情--查询患者手动创建的任务节点列表")
|
@ApiOperation("患者详情--查询患者任务路径及节点列表")
|
||||||
@GetMapping("/getNodeList")
|
@GetMapping("/getNodeList")
|
||||||
public R<List<SignPatientManageRouteNodeVo>> getNodeList(PatientTaskDto patientTaskDto) {
|
public R<List<SignPatientManageRouteNodeVo>> getNodeList(PatientTaskDto patientTaskDto) {
|
||||||
List<SignPatientManageRouteNodeVo> list = signNodeService.getNodeList(patientTaskDto);
|
return R.ok(signNodeService.getNodeList(patientTaskDto));
|
||||||
return R.ok(list);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -94,8 +101,7 @@ public class SignPatientManageRouteNodeController extends BaseController {
|
|||||||
if (StringUtils.isBlank(patientTaskDto.getTaskCreateType())) {
|
if (StringUtils.isBlank(patientTaskDto.getTaskCreateType())) {
|
||||||
throw new ServiceException("请选择任务创建类型!");
|
throw new ServiceException("请选择任务创建类型!");
|
||||||
}
|
}
|
||||||
List<SignPatientManageRouteNodeVo> list = signNodeService.getRouteNodeList(patientTaskDto);
|
return R.ok(signNodeService.getRouteNodeList(patientTaskDto));
|
||||||
return R.ok(list);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -21,7 +21,7 @@ public interface SignPatientManageRouteNodeMapper {
|
|||||||
* @param id 签约患者管理任务路径节点主键
|
* @param id 签约患者管理任务路径节点主键
|
||||||
* @return 签约患者管理任务路径节点
|
* @return 签约患者管理任务路径节点
|
||||||
*/
|
*/
|
||||||
public SignPatientManageRouteNode selectSignPatientManageRouteNodeById(Long id);
|
SignPatientManageRouteNode selectSignPatientManageRouteNodeById(Long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询患者管理路径节点
|
* 查询患者管理路径节点
|
||||||
|
|||||||
@ -149,7 +149,7 @@ public class PatientNodeParamsCurrentServiceImpl implements IPatientNodeParamsCu
|
|||||||
}
|
}
|
||||||
// 删除参数
|
// 删除参数
|
||||||
if (CollectionUtils.isNotEmpty(deleteIds)) {
|
if (CollectionUtils.isNotEmpty(deleteIds)) {
|
||||||
patientNodeParamsCurrentMapper.deletePatientNodeParamsCurrentByIds(deleteIds.stream().toArray(Long[]::new));
|
patientNodeParamsCurrentMapper.deletePatientNodeParamsCurrentByIds(deleteIds.toArray(new Long[0]));
|
||||||
}
|
}
|
||||||
// 新增的参数保存
|
// 新增的参数保存
|
||||||
if (CollectionUtils.isNotEmpty(saveList)) {
|
if (CollectionUtils.isNotEmpty(saveList)) {
|
||||||
@ -166,8 +166,6 @@ public class PatientNodeParamsCurrentServiceImpl implements IPatientNodeParamsCu
|
|||||||
paramsLogList.add(paramsLog);
|
paramsLogList.add(paramsLog);
|
||||||
});
|
});
|
||||||
patientNodeParamsLogMapper.insertList(paramsLogList);
|
patientNodeParamsLogMapper.insertList(paramsLogList);
|
||||||
|
|
||||||
|
|
||||||
// 生成任务
|
// 生成任务
|
||||||
manageRouteNodeService.updateTask(paramsList);
|
manageRouteNodeService.updateTask(paramsList);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,6 +37,13 @@ public interface ISignPatientManageRouteNodeService {
|
|||||||
*/
|
*/
|
||||||
List<SignPatientManageRouteNodeVo> getNodeList(PatientTaskDto patientTaskDto);
|
List<SignPatientManageRouteNodeVo> getNodeList(PatientTaskDto patientTaskDto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据节点类型查询节点列表详情
|
||||||
|
* @param patientTaskDto 任务查询传输对象
|
||||||
|
* @return 患者管理任务路径节点
|
||||||
|
*/
|
||||||
|
List<PatientManageNodeInfoVo> getNodeListByPatient(PatientTaskDto patientTaskDto);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询患者管理路径节点
|
* 查询患者管理路径节点
|
||||||
*
|
*
|
||||||
|
|||||||
@ -138,6 +138,43 @@ public class SignPatientManageRouteNodeServiceImpl implements ISignPatientManage
|
|||||||
return getRouteNodeList(patientTaskDto);
|
return getRouteNodeList(patientTaskDto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override public List<PatientManageNodeInfoVo> getNodeListByPatient(PatientTaskDto patientTaskDto) {
|
||||||
|
List<PatientManageNodeInfoVo> retList = new ArrayList<>();
|
||||||
|
if (patientTaskDto.getPatientId() == null) {
|
||||||
|
throw new ServiceException("患者信息有误");
|
||||||
|
}
|
||||||
|
PatientInfo patientInfo = patientInfoMapper.selectPatientInfoById(patientTaskDto.getPatientId());
|
||||||
|
if (ObjectUtils.isEmpty(patientInfo)) {
|
||||||
|
throw new ServiceException("患者信息有误!");
|
||||||
|
}
|
||||||
|
patientTaskDto.setSignPatientRecordId(patientInfo.getSignPatientRecordId());
|
||||||
|
// 根据任务类型、审核状态查询节点列表
|
||||||
|
List<SignPatientManageRouteNode> nodeList = signPatientManageRouteNodeMapper.getNodeList(patientTaskDto);
|
||||||
|
nodeList.forEach(node -> {
|
||||||
|
PatientManageNodeInfoVo retVo = new PatientManageNodeInfoVo();
|
||||||
|
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);
|
||||||
|
retList.add(retVo);
|
||||||
|
});
|
||||||
|
return retList;
|
||||||
|
}
|
||||||
|
|
||||||
@Override public List<SignPatientManageRouteNodeVo> getRouteNodeList(PatientTaskDto patientTaskDto) {
|
@Override public List<SignPatientManageRouteNodeVo> getRouteNodeList(PatientTaskDto patientTaskDto) {
|
||||||
List<SignPatientManageRouteNodeVo> retList = new ArrayList<>();
|
List<SignPatientManageRouteNodeVo> retList = new ArrayList<>();
|
||||||
PatientInfo patientInfo = patientInfoMapper.selectPatientInfoById(patientTaskDto.getPatientId());
|
PatientInfo patientInfo = patientInfoMapper.selectPatientInfoById(patientTaskDto.getPatientId());
|
||||||
|
|||||||
@ -249,21 +249,7 @@ public class SpecialDiseaseNodeServiceImpl implements ISpecialDiseaseNodeService
|
|||||||
Map<String, List<PatientNodeParamsCurrent>> groupBySn = nodeParams.stream().collect(Collectors.groupingBy(PatientNodeParamsCurrent::getSn));
|
Map<String, List<PatientNodeParamsCurrent>> groupBySn = nodeParams.stream().collect(Collectors.groupingBy(PatientNodeParamsCurrent::getSn));
|
||||||
for (String sn : groupBySn.keySet()) {
|
for (String sn : groupBySn.keySet()) {
|
||||||
List<PatientNodeParamsCurrent> oldParams = groupBySn.get(sn);
|
List<PatientNodeParamsCurrent> oldParams = groupBySn.get(sn);
|
||||||
//List<String> paramKeys = oldParams.stream().map(PatientNodeParamsCurrent::getParamKey).collect(Collectors.toList());
|
|
||||||
//List<String> newKeys = diseaseNodeParams.stream().map(PatientNodeParamsCurrent::getParamKey).collect(Collectors.toList());
|
|
||||||
//if (ListUtils.isEqualList(paramKeys, newKeys)) {
|
|
||||||
// retList.add(oldParams);
|
|
||||||
//} else {
|
|
||||||
// for(PatientNodeParamsCurrent nodeParam : diseaseNodeParams) {
|
|
||||||
// if (!paramKeys.contains(nodeParam.getParamKey())) {
|
|
||||||
// oldParams.add(nodeParam);
|
|
||||||
// }
|
|
||||||
// if (!newKeys.contains(nodeParam.getParamKey())) {
|
|
||||||
// oldParams.remove(nodeParam);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
retList.add(oldParams);
|
retList.add(oldParams);
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return retList;
|
return retList;
|
||||||
@ -281,18 +267,17 @@ public class SpecialDiseaseNodeServiceImpl implements ISpecialDiseaseNodeService
|
|||||||
PatientInfo patientInfo = patientInfoMapper.selectPatientInfoById(patientId);
|
PatientInfo patientInfo = patientInfoMapper.selectPatientInfoById(patientId);
|
||||||
switch (taskSubdivision) {
|
switch (taskSubdivision) {
|
||||||
// 健康档案
|
// 健康档案
|
||||||
case "HEALTH_ARCHIVE":
|
case "HEALTH_ARCHIVE":
|
||||||
retObj = JSONObject.parseObject(JSONObject.toJSONString(patientInfo));
|
retObj = JSONObject.parseObject(JSONObject.toJSONString(patientInfo));
|
||||||
// 性别转换成中文、计算年龄
|
// 性别转换成中文、计算年龄
|
||||||
retObj.fluentPut("sex", PatientSexEnum.getInfoByCode(patientInfo.getSex()).getInfo())
|
retObj.fluentPut("sex", PatientSexEnum.getInfoByCode(patientInfo.getSex()).getInfo()).fluentPut("age", BaseUtil.getAge(patientInfo.getBirthDate()));
|
||||||
.fluentPut("age", BaseUtil.getAge(patientInfo.getBirthDate()));
|
break;
|
||||||
break;
|
default:
|
||||||
default:
|
DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||||
DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
retObj.fluentPut("patientName", patientInfo.getPatientName())
|
||||||
retObj.fluentPut("patientName", patientInfo.getPatientName())
|
.fluentPut("dischargeTime", patientInfo.getDischargeTime() == null ? "" : patientInfo.getDischargeTime().format(df))
|
||||||
.fluentPut("dischargeTime", patientInfo.getDischargeTime() == null ? "" : patientInfo.getDischargeTime().format(df))
|
.fluentPut("visitDate", patientInfo.getVisitDate().format(df));
|
||||||
.fluentPut("visitDate", patientInfo.getVisitDate().format(df));
|
break;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
return retObj;
|
return retObj;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -225,7 +225,6 @@ public class SpecialDiseaseRouteServiceImpl implements ISpecialDiseaseRouteServi
|
|||||||
return AjaxResult.error("请选择需要发布专病路径的信息!");
|
return AjaxResult.error("请选择需要发布专病路径的信息!");
|
||||||
}
|
}
|
||||||
if (ReleaseStatusEnum.PUBLISHED.getInfo().equals(specialDiseaseRoute.getReleaseStatus())) {
|
if (ReleaseStatusEnum.PUBLISHED.getInfo().equals(specialDiseaseRoute.getReleaseStatus())) {
|
||||||
// 专病路径没有节点不能发布
|
|
||||||
int count = specialDiseaseRouteMapper.selectRouteCheckStatus(specialDiseaseRoute.getId(), RouteCheckStatusEnum.AGREE.getInfo());
|
int count = specialDiseaseRouteMapper.selectRouteCheckStatus(specialDiseaseRoute.getId(), RouteCheckStatusEnum.AGREE.getInfo());
|
||||||
if (count >= 0) {
|
if (count >= 0) {
|
||||||
return AjaxResult.error("该路径无节点或存在未审核的节点,请全部审核后发布!");
|
return AjaxResult.error("该路径无节点或存在未审核的节点,请全部审核后发布!");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user