任务记录
This commit is contained in:
parent
9661503b2b
commit
b66a7a8ad8
@ -1,22 +1,18 @@
|
|||||||
package com.xinelu.manage.service.patienttaskexecuterecord.impl;
|
package com.xinelu.manage.service.patienttaskexecuterecord.impl;
|
||||||
|
|
||||||
import com.xinelu.common.core.domain.AjaxResult;
|
import com.xinelu.common.core.domain.AjaxResult;
|
||||||
import com.xinelu.common.enums.TaskContentEnum;
|
|
||||||
import com.xinelu.common.utils.AgeUtil;
|
import com.xinelu.common.utils.AgeUtil;
|
||||||
import com.xinelu.manage.domain.patienttaskexecuterecord.PatientTaskExecuteRecord;
|
import com.xinelu.manage.domain.patienttaskexecuterecord.PatientTaskExecuteRecord;
|
||||||
import com.xinelu.manage.mapper.patientquestionsubmitresult.PatientQuestionSubmitResultMapper;
|
import com.xinelu.manage.mapper.patientquestionsubmitresult.PatientQuestionSubmitResultMapper;
|
||||||
import com.xinelu.manage.mapper.patienttaskexecuterecord.PatientTaskExecuteRecordMapper;
|
import com.xinelu.manage.mapper.patienttaskexecuterecord.PatientTaskExecuteRecordMapper;
|
||||||
import com.xinelu.manage.service.patienttaskexecuterecord.IPatientTaskExecuteRecordService;
|
import com.xinelu.manage.service.patienttaskexecuterecord.IPatientTaskExecuteRecordService;
|
||||||
import com.xinelu.manage.service.propagandainfo.IPropagandaInfoService;
|
import com.xinelu.manage.service.propagandainfo.IPropagandaInfoService;
|
||||||
import com.xinelu.manage.vo.patientquestionsubmitresult.PatientQuestionSubmitResultVO;
|
|
||||||
import com.xinelu.manage.vo.patienttaskexecuterecord.PatientTaskExecuteRecordVO;
|
import com.xinelu.manage.vo.patienttaskexecuterecord.PatientTaskExecuteRecordVO;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 患者管理任务执行记录Service业务层处理
|
* 患者管理任务执行记录Service业务层处理
|
||||||
@ -122,29 +118,6 @@ public class PatientTaskExecuteRecordServiceImpl implements IPatientTaskExecuteR
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult selectPatientQuestionSubmit(Long taskExecuteRecordId) {
|
public AjaxResult selectPatientQuestionSubmit(Long taskExecuteRecordId) {
|
||||||
//判断任务类型
|
return AjaxResult.success(submitResultMapper.selectResultByTaskExecuteRecordId(taskExecuteRecordId));
|
||||||
PatientTaskExecuteRecord patientTaskExecuteRecord = patientTaskExecuteRecordMapper.selectPatientTaskExecuteRecordById(taskExecuteRecordId);
|
|
||||||
if (Objects.isNull(patientTaskExecuteRecord) || StringUtils.isBlank(patientTaskExecuteRecord.getTaskContent())) {
|
|
||||||
return AjaxResult.success();
|
|
||||||
}
|
|
||||||
//如果是人工随访或问卷表
|
|
||||||
if (TaskContentEnum.ARTIFICIAL_FOLLOW_UP.getInfo().equals(patientTaskExecuteRecord.getTaskContent()) || TaskContentEnum.QUESTIONNAIRE_SCALE.getInfo().equals(patientTaskExecuteRecord.getTaskContent())) {
|
|
||||||
PatientQuestionSubmitResultVO patientQuestionSubmitResult = submitResultMapper.selectResultByTaskExecuteRecordId(taskExecuteRecordId);
|
|
||||||
patientQuestionSubmitResult.setTaskContent(patientTaskExecuteRecord.getTaskContent());
|
|
||||||
return AjaxResult.success(patientQuestionSubmitResult);
|
|
||||||
}
|
|
||||||
//如果是电话外呼
|
|
||||||
if (TaskContentEnum.PHONE_OUTBOUND.getInfo().equals(patientTaskExecuteRecord.getTaskContent())) {
|
|
||||||
return AjaxResult.success();
|
|
||||||
}
|
|
||||||
//如果是宣教文章
|
|
||||||
if (TaskContentEnum.PROPAGANDA_ARTICLE.getInfo().equals(patientTaskExecuteRecord.getTaskContent())) {
|
|
||||||
return AjaxResult.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (TaskContentEnum.TEXT_REMIND.getInfo().equals(patientTaskExecuteRecord.getTaskContent())) {
|
|
||||||
return AjaxResult.success();
|
|
||||||
}
|
|
||||||
return AjaxResult.success();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,7 +23,7 @@ public interface ISignPatientManageRouteService {
|
|||||||
* @param id 签约患者管理任务路径主键
|
* @param id 签约患者管理任务路径主键
|
||||||
* @return 签约患者管理任务路径
|
* @return 签约患者管理任务路径
|
||||||
*/
|
*/
|
||||||
SignPatientManageRoute selectSignPatientManageRouteById(Long id);
|
SignPatientManageRouteVO selectSignPatientManageRouteById(Long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询签约患者管理任务路径列表
|
* 查询签约患者管理任务路径列表
|
||||||
|
|||||||
@ -72,8 +72,8 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
|||||||
* @return 签约患者管理任务路径
|
* @return 签约患者管理任务路径
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public SignPatientManageRoute selectSignPatientManageRouteById(Long id) {
|
public SignPatientManageRouteVO selectSignPatientManageRouteById(Long id) {
|
||||||
return signPatientManageRouteMapper.selectSignPatientManageRouteById(id);
|
return signPatientManageRouteMapper.selectSignPatientManageRoute(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -101,12 +101,34 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
|||||||
if (insertRoute < 0) {
|
if (insertRoute < 0) {
|
||||||
return AjaxResult.error("新增签约患者管理任务路径失败!请联系管理员!");
|
return AjaxResult.error("新增签约患者管理任务路径失败!请联系管理员!");
|
||||||
}
|
}
|
||||||
for (SignPatientManageRouteNode signPatientManageRouteNode : signPatientManageRoute.getRouteNodeList()) {
|
List<SignPatientManageRouteNode> signPatientManageRouteNodes = new ArrayList<>();
|
||||||
|
SignPatientManageRouteNode signPatientManageRouteNode = new SignPatientManageRouteNode();
|
||||||
|
for (SignPatientManageRouteNode routeNode : signPatientManageRoute.getRouteNodeList()) {
|
||||||
|
if (Objects.nonNull(routeNode) && TaskContentEnum.PHONE_OUTBOUND.getInfo().equals(routeNode.getTaskType())) {
|
||||||
|
signPatientManageRouteNode.setPhonePushSign(routeNode.getPhonePushSign());
|
||||||
|
signPatientManageRouteNode.setPhoneId(routeNode.getPhoneId());
|
||||||
|
signPatientManageRouteNode.setPhoneTemplateId(routeNode.getPhoneTemplateId());
|
||||||
|
signPatientManageRouteNode.setPhoneTemplateName(routeNode.getPhoneTemplateName());
|
||||||
|
signPatientManageRouteNode.setPhoneNodeContent(routeNode.getPhoneNodeContent());
|
||||||
|
signPatientManageRouteNode.setPhoneRedialTimes(routeNode.getPhoneRedialTimes());
|
||||||
|
signPatientManageRouteNode.setPhoneTimeInterval(routeNode.getPhoneTimeInterval());
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(routeNode) && TaskContentEnum.QUESTIONNAIRE_SCALE.getInfo().equals(routeNode.getTaskType())) {
|
||||||
|
signPatientManageRouteNode.setQuestionInfoId(routeNode.getQuestionInfoId());
|
||||||
|
signPatientManageRouteNode.setQuestionnaireName(routeNode.getQuestionnaireName());
|
||||||
|
signPatientManageRouteNode.setQuestionnaireContent(routeNode.getQuestionnaireContent());
|
||||||
|
signPatientManageRouteNode.setQuestionExpirationDate(routeNode.getQuestionExpirationDate());
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(routeNode) && TaskContentEnum.PROPAGANDA_ARTICLE.getInfo().equals(routeNode.getTaskType())) {
|
||||||
|
|
||||||
|
}
|
||||||
signPatientManageRouteNode.setManageRouteId(signPatientManageRoute.getId());
|
signPatientManageRouteNode.setManageRouteId(signPatientManageRoute.getId());
|
||||||
|
signPatientManageRouteNode.setManageRouteName(signPatientManageRoute.getRouteName());
|
||||||
signPatientManageRouteNode.setCreateTime(LocalDateTime.now());
|
signPatientManageRouteNode.setCreateTime(LocalDateTime.now());
|
||||||
signPatientManageRouteNode.setCreateBy(SecurityUtils.getUsername());
|
signPatientManageRouteNode.setCreateBy(SecurityUtils.getUsername());
|
||||||
|
signPatientManageRouteNodes.add(signPatientManageRouteNode);
|
||||||
}
|
}
|
||||||
int insertBatchCount = signPatientManageRouteNodeMapper.insertBatch(signPatientManageRoute.getRouteNodeList());
|
int insertBatchCount = signPatientManageRouteNodeMapper.insertBatch(signPatientManageRouteNodes);
|
||||||
if (insertBatchCount < 0) {
|
if (insertBatchCount < 0) {
|
||||||
return AjaxResult.error("新增签约患者管理任务路径失败!请联系管理员!");
|
return AjaxResult.error("新增签约患者管理任务路径失败!请联系管理员!");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user