修改患者档案列表。
This commit is contained in:
parent
07878f4bac
commit
a791cdad9e
@ -5,7 +5,7 @@ package com.xinelu.common.constant;
|
||||
* @author: haown
|
||||
* @create: 2024-09-24 14:38
|
||||
**/
|
||||
public class AiboTaskTypeContant {
|
||||
public class AiobTaskTypeContant {
|
||||
|
||||
/**
|
||||
* 批量任务
|
||||
@ -1,13 +1,13 @@
|
||||
package com.xinelu.manage.controller.aibo;
|
||||
package com.xinelu.manage.controller.aiob;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.aliyuncs.exceptions.ClientException;
|
||||
import com.xinelu.common.core.controller.BaseController;
|
||||
import com.xinelu.common.core.domain.R;
|
||||
import com.xinelu.manage.dto.aibo.ActualTimeTaskDto;
|
||||
import com.xinelu.manage.dto.aibo.CreateTaskDto;
|
||||
import com.xinelu.manage.dto.aibo.TaskCallbackDto;
|
||||
import com.xinelu.manage.service.aibo.IAIOBService;
|
||||
import com.xinelu.manage.dto.aiob.ActualTimeTaskDto;
|
||||
import com.xinelu.manage.dto.aiob.CreateTaskDto;
|
||||
import com.xinelu.manage.dto.aiob.TaskCallbackDto;
|
||||
import com.xinelu.manage.service.aiob.IAIOBService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import javax.annotation.Resource;
|
||||
@ -27,7 +27,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RequestMapping("/api")
|
||||
public class AIOBController extends BaseController {
|
||||
@Resource
|
||||
public IAIOBService aiobService;
|
||||
private IAIOBService aiobService;
|
||||
|
||||
/**
|
||||
* @description 获取外呼平台accessToken
|
||||
@ -102,4 +102,5 @@ public class AIOBController extends BaseController {
|
||||
public String record() throws ClientException {
|
||||
return aiobService.record("1726726696448834_936326");
|
||||
}
|
||||
|
||||
}
|
||||
@ -12,7 +12,7 @@ import com.xinelu.common.utils.poi.ExcelUtil;
|
||||
import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute;
|
||||
import com.xinelu.manage.dto.manualfollowup.ManualFollowUpDTO;
|
||||
import com.xinelu.manage.dto.patientquestionsubmitresult.PatientQuestionSubmitResultDTO;
|
||||
import com.xinelu.manage.dto.signpatientmanageroutenode.CreateAiboActualTimeTaskDto;
|
||||
import com.xinelu.manage.dto.signpatientmanageroutenode.CreateAiobActualTimeTaskDto;
|
||||
import com.xinelu.manage.service.signpatientmanageroute.ISignPatientManageRouteService;
|
||||
import com.xinelu.manage.vo.manualfollowup.ManualFollowUpVO;
|
||||
import com.xinelu.manage.vo.signpatientmanageroute.SignPatientManageRouteVO;
|
||||
@ -117,15 +117,15 @@ public class SignPatientManageRouteController extends BaseController {
|
||||
|
||||
/**
|
||||
* @description 随访待办列表-创建实时呼叫任务
|
||||
* @Param createAiboActualTimeTaskDto 创建百度外呼实时任务传输对象
|
||||
* @Param createAiobActualTimeTaskDto 创建百度外呼实时任务传输对象
|
||||
* @return 结果
|
||||
* @Author haown
|
||||
* @Date 2024-11-4 16:06
|
||||
*/
|
||||
@ApiOperation("随访待办列表-创建实时呼叫任务")
|
||||
@PostMapping("/createActualTimeTask")
|
||||
public R<String> createActualTimeTask(@RequestBody CreateAiboActualTimeTaskDto createAiboActualTimeTaskDto) {
|
||||
Long memberId = signPatientManageRouteService.createActualTimeTask(createAiboActualTimeTaskDto);
|
||||
public R<String> createActualTimeTask(@RequestBody CreateAiobActualTimeTaskDto createAiobActualTimeTaskDto) {
|
||||
Long memberId = signPatientManageRouteService.createActualTimeTask(createAiobActualTimeTaskDto);
|
||||
return memberId != null && memberId > 0L ? R.ok() : R.fail();
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package com.xinelu.manage.dto.aibo;
|
||||
package com.xinelu.manage.dto.aiob;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import lombok.Data;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.xinelu.manage.dto.aibo;
|
||||
package com.xinelu.manage.dto.aiob;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@ -8,7 +8,7 @@ import lombok.Data;
|
||||
* @create: 2024-09-10 16:06
|
||||
**/
|
||||
@Data
|
||||
public class AiboRecord {
|
||||
public class AiobRecord {
|
||||
|
||||
/**
|
||||
* 会话角色,分为机器人侧(speech)和客户侧(voice)
|
||||
@ -1,4 +1,4 @@
|
||||
package com.xinelu.manage.dto.aibo;
|
||||
package com.xinelu.manage.dto.aiob;
|
||||
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.xinelu.manage.dto.aibo;
|
||||
package com.xinelu.manage.dto.aiob;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import lombok.Data;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.xinelu.manage.dto.aibo;
|
||||
package com.xinelu.manage.dto.aiob;
|
||||
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.xinelu.manage.dto.aibo;
|
||||
package com.xinelu.manage.dto.aiob;
|
||||
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.xinelu.manage.dto.aibo;
|
||||
package com.xinelu.manage.dto.aiob;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@ -11,7 +11,7 @@ import lombok.Data;
|
||||
**/
|
||||
@ApiModel("创建百度外呼实时任务传输对象")
|
||||
@Data
|
||||
public class CreateAiboActualTimeTaskDto {
|
||||
public class CreateAiobActualTimeTaskDto {
|
||||
|
||||
@ApiModelProperty("任务表ID")
|
||||
private Long signPatientManageRouteNodeId;
|
||||
@ -1,12 +1,12 @@
|
||||
package com.xinelu.manage.service.aibo;
|
||||
package com.xinelu.manage.service.aiob;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.aliyuncs.exceptions.ClientException;
|
||||
import com.xinelu.manage.dto.aibo.ActualTimeTaskDto;
|
||||
import com.xinelu.manage.dto.aibo.CreateTaskDto;
|
||||
import com.xinelu.manage.dto.aibo.ImportTaskDto;
|
||||
import com.xinelu.manage.dto.aibo.TaskCallbackDataDto;
|
||||
import com.xinelu.manage.vo.aibo.ImportTaskVo;
|
||||
import com.xinelu.manage.dto.aiob.ActualTimeTaskDto;
|
||||
import com.xinelu.manage.dto.aiob.CreateTaskDto;
|
||||
import com.xinelu.manage.dto.aiob.ImportTaskDto;
|
||||
import com.xinelu.manage.dto.aiob.TaskCallbackDataDto;
|
||||
import com.xinelu.manage.vo.aiob.ImportTaskVo;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -1,4 +1,4 @@
|
||||
package com.xinelu.manage.service.aibo.impl;
|
||||
package com.xinelu.manage.service.aiob.impl;
|
||||
|
||||
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
@ -7,7 +7,7 @@ import com.alibaba.fastjson2.JSONObject;
|
||||
import com.aliyuncs.exceptions.ClientException;
|
||||
import com.xinelu.common.config.AliYunSmsTwoConfig;
|
||||
import com.xinelu.common.config.SystemBusinessConfig;
|
||||
import com.xinelu.common.constant.AiboTaskTypeContant;
|
||||
import com.xinelu.common.constant.AiobTaskTypeContant;
|
||||
import com.xinelu.common.constant.Constants;
|
||||
import com.xinelu.common.constant.PhoneMessageRemindConstants;
|
||||
import com.xinelu.common.constant.TaskCreateTypeConstant;
|
||||
@ -36,12 +36,12 @@ 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.domain.textmessage.TextMessage;
|
||||
import com.xinelu.manage.dto.aibo.ActualTimeTaskDto;
|
||||
import com.xinelu.manage.dto.aibo.AiboRecord;
|
||||
import com.xinelu.manage.dto.aibo.CreateTaskDto;
|
||||
import com.xinelu.manage.dto.aibo.CustomerInfoDto;
|
||||
import com.xinelu.manage.dto.aibo.ImportTaskDto;
|
||||
import com.xinelu.manage.dto.aibo.TaskCallbackDataDto;
|
||||
import com.xinelu.manage.dto.aiob.ActualTimeTaskDto;
|
||||
import com.xinelu.manage.dto.aiob.AiobRecord;
|
||||
import com.xinelu.manage.dto.aiob.CreateTaskDto;
|
||||
import com.xinelu.manage.dto.aiob.CustomerInfoDto;
|
||||
import com.xinelu.manage.dto.aiob.ImportTaskDto;
|
||||
import com.xinelu.manage.dto.aiob.TaskCallbackDataDto;
|
||||
import com.xinelu.manage.dto.patientquestionsubmitresult.PatientQuestionSubmitResultDTO;
|
||||
import com.xinelu.manage.dto.smssend.SmsInfoDTO;
|
||||
import com.xinelu.manage.mapper.labelfieldcontent.LabelFieldContentMapper;
|
||||
@ -61,11 +61,11 @@ import com.xinelu.manage.mapper.signpatientmanageroute.SignPatientManageRouteMap
|
||||
import com.xinelu.manage.mapper.signpatientmanageroutenode.SignPatientManageRouteNodeMapper;
|
||||
import com.xinelu.manage.mapper.signpatientrecord.SignPatientRecordMapper;
|
||||
import com.xinelu.manage.mapper.textmessage.TextMessageMapper;
|
||||
import com.xinelu.manage.service.aibo.IAIOBService;
|
||||
import com.xinelu.manage.service.aiob.IAIOBService;
|
||||
import com.xinelu.manage.service.patienttaskstatistics.IPatientTaskStatisticsService;
|
||||
import com.xinelu.manage.service.signpatientmanageroute.ISignPatientManageRouteService;
|
||||
import com.xinelu.manage.service.signpatientmanageroutenode.ISignPatientManageRouteNodeService;
|
||||
import com.xinelu.manage.vo.aibo.ImportTaskVo;
|
||||
import com.xinelu.manage.vo.aiob.ImportTaskVo;
|
||||
import com.xinelu.manage.vo.labelfieldcontent.LabelFieldInfoContentVo;
|
||||
import com.xinelu.manage.vo.questionsubject.QuestionSubjectVO;
|
||||
import java.io.BufferedInputStream;
|
||||
@ -407,6 +407,7 @@ public class AIOBServiceImpl implements IAIOBService {
|
||||
}
|
||||
} else {
|
||||
signPatientManageRouteNode.setPhoneNodeExecuteResultStatus(NodeExecuteResultStatusEnum.SUCCESS.getInfo());
|
||||
|
||||
if (StringUtils.equals(PhoneMessageRemindConstants.CONNECTED_SEND_MESSAGE, signPatientManageRouteNode.getPhoneMessageRemind())) {
|
||||
// 发送短信
|
||||
needSendSms = true;
|
||||
@ -590,18 +591,18 @@ public class AIOBServiceImpl implements IAIOBService {
|
||||
* @Date 2024-9-6 14:30
|
||||
*/
|
||||
private void parseQuestionInfo(JSONArray records, SignPatientManageRouteNode node, Long patientInfoId, Long taskExecuteRecordId) {
|
||||
List<AiboRecord> aiboRecords = records.toList(AiboRecord.class);
|
||||
List<AiboRecord> speechList = aiboRecords.stream().filter(record -> StringUtils.equals("speech", record.getRole()) && !StringUtils.equals("抱歉,我不太理解您的意思", record.getContextText()))
|
||||
.collect(Collectors.toMap(AiboRecord::getContextText, p -> p, (p1, p2) -> p2))
|
||||
List<AiobRecord> aiobRecords = records.toList(AiobRecord.class);
|
||||
List<AiobRecord> speechList = aiobRecords.stream().filter(record -> StringUtils.equals("speech", record.getRole()) && !StringUtils.equals("抱歉,我不太理解您的意思", record.getContextText()))
|
||||
.collect(Collectors.toMap(AiobRecord::getContextText, p -> p, (p1, p2) -> p2))
|
||||
.values()
|
||||
.stream()
|
||||
.sorted(Comparator.comparing(AiboRecord::getTimestamp))
|
||||
.sorted(Comparator.comparing(AiobRecord::getTimestamp))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 查询患者画像信息
|
||||
List<LabelFieldInfoContentVo> labelFieldContentList = labelFieldContentMapper.selectByPatientId(patientInfoId);
|
||||
|
||||
Map<String, String> contextMap = speechList.stream().collect(Collectors.toMap(AiboRecord::getContextText, AiboRecord::getIntent));
|
||||
Map<String, String> contextMap = speechList.stream().collect(Collectors.toMap(AiobRecord::getContextText, AiobRecord::getIntent));
|
||||
|
||||
PatientInfo patientInfo = patientInfoMapper.selectPatientInfoById(patientInfoId);
|
||||
QuestionInfo questionInfo = questionInfoMapper.selectQuestionInfoById(node.getQuestionInfoId());
|
||||
@ -663,7 +664,7 @@ public class AIOBServiceImpl implements IAIOBService {
|
||||
BeanUtils.copyProperties(questionSubjectOption, patientQuestionOptionResult);
|
||||
// 设置是否选中, 通过通话记录中下一个问题的intent字段查询QuestionSubjectOption,
|
||||
List<String> intents = Arrays.asList(questionSubjectOption.getIntent().split("\\|"));
|
||||
AiboRecord nextRecord = getNextQuestion(speechList, finalAiobQuestionName);
|
||||
AiobRecord nextRecord = getNextQuestion(speechList, finalAiobQuestionName);
|
||||
if (ObjectUtils.isNotEmpty(nextRecord) && intents.contains(nextRecord.getIntent())) {
|
||||
patientQuestionOptionResult.setOptionChooseSign(0);
|
||||
} else {
|
||||
@ -710,7 +711,7 @@ public class AIOBServiceImpl implements IAIOBService {
|
||||
questionSubmitResultMapper.updatePatientQuestionSubmitResult(patientQuestionSubmitResult);
|
||||
}
|
||||
|
||||
private AiboRecord getNextQuestion(List<AiboRecord> speechList, String currentQuestion) {
|
||||
private AiobRecord getNextQuestion(List<AiobRecord> speechList, String currentQuestion) {
|
||||
if (StringUtils.isNotBlank(currentQuestion)) {
|
||||
for (int i = 0; i < speechList.size(); i++) {
|
||||
if (StringUtils.equals(speechList.get(i).getContextText(), currentQuestion)) {
|
||||
@ -746,7 +747,7 @@ public class AIOBServiceImpl implements IAIOBService {
|
||||
scriptInfoTaskInfo.setRobotId(signPatientManageRouteNode.getRobotPublishId());
|
||||
scriptInfoTaskInfo.setCreateTime(LocalDateTime.now());
|
||||
scriptInfoTaskInfo.setSignPatientManageRouteNodeId(signPatientManageRouteNode.getId());
|
||||
scriptInfoTaskInfo.setAiobTaskType(AiboTaskTypeContant.ACTUALTIMETASK);
|
||||
scriptInfoTaskInfo.setAiobTaskType(AiobTaskTypeContant.ACTUALTIMETASK);
|
||||
scriptInfoTaskInfo.setExecuteStatus(NodeExecuteStatusEnum.UNEXECUTED.getInfo());
|
||||
LocalDateTime executeTime = signPatientManageRouteNodeService.getExecuteTime(signPatientManageRouteNode.getExecuteTime(), signPatientManageRouteNode.getRouteNodeName(), signPatientManageRouteNode.getRouteNodeDay(), patientVisitRecord);
|
||||
scriptInfoTaskInfo.setExecuteTime(executeTime.plusMinutes(signPatientManageRouteNode.getPhoneTimeInterval()));
|
||||
@ -81,37 +81,6 @@ public class PatientInfoServiceImpl implements IPatientInfoService {
|
||||
@DataScope(agencyAlias = "p", userAlias = "p.attending_physician_id")
|
||||
@Override public List<PatientInfoVo> getPatientList(PatientInfoDto patientInfo) {
|
||||
List<PatientInfoVo> patientInfoVoList = patientInfoMapper.getPatientList(patientInfo);
|
||||
//patientInfoVoList.forEach(patientInfoVo -> {
|
||||
// // 下次任务
|
||||
// PatientNextTaskVo patientNextTask = patientInfoMapper.getPatientNextTask(patientInfoVo.getId());
|
||||
// if (ObjectUtils.isNotEmpty(patientNextTask)) {
|
||||
// patientInfoVo.setNextTaskName(patientNextTask.getTaskName());
|
||||
// patientInfoVo.setNextTaskTime(patientNextTask.getExecuteDateTime());
|
||||
// }
|
||||
//});
|
||||
|
||||
// 按照患者id分组
|
||||
//Map<Long, List<PatientInfoVo>> groupById = patientInfoVoList.stream().collect(Collectors.groupingBy(PatientInfoVo::getId));
|
||||
//// 计算患者任务总数、已执行任务数量、已完成任务数量
|
||||
//for (Long patientId : groupById.keySet()) {
|
||||
// PatientInfoVo patientInfoVo = groupById.get(patientId).get(0);
|
||||
// List<PatientInfoVo> perPatientList = groupById.get(patientId);
|
||||
// // 任务总数
|
||||
// patientInfoVo.setTaskNum(BigDecimal.valueOf(perPatientList.size()));
|
||||
// // 任务执行数量
|
||||
// Map<String, List<PatientInfoVo>> groupByExecute = patientInfoVoList.stream().collect(Collectors.groupingBy(PatientInfoVo::getNodeExecuteStatus));
|
||||
// BigDecimal taskExecuteNum = BigDecimal.valueOf(groupByExecute.get(groupByExecute.get(NodeExecuteStatusEnum.EXECUTED.getInfo())).size());
|
||||
// patientInfoVo.setTaskExecuteNum(taskExecuteNum);
|
||||
// // 任务执行率
|
||||
// patientInfoVo.setTaskExecuteRate(patientInfoVo.getTaskExecuteNum().divide(patientInfoVo.getTaskNum(), 2, RoundingMode.HALF_UP).multiply(new BigDecimal("100")));
|
||||
// // 任务完成数量
|
||||
// BigDecimal taskFinishNum = BigDecimal.valueOf(perPatientList.stream().filter(perPatient -> perPatient.getNodeFinishDate() != null).count());
|
||||
// patientInfoVo.setTaskFinishNum(taskFinishNum);
|
||||
// // 任务完成率
|
||||
// patientInfoVo.setTaskFinishRate(patientInfoVo.getTaskFinishNum().divide(patientInfoVo.getTaskNum(), 2, RoundingMode.HALF_UP).multiply(new BigDecimal("100")));
|
||||
// //
|
||||
//}
|
||||
|
||||
return patientInfoVoList;
|
||||
}
|
||||
|
||||
|
||||
@ -155,12 +155,18 @@ public class PatientTaskStatisticsServiceImpl implements IPatientTaskStatisticsS
|
||||
PatientTaskStatistics patientTaskStatistics = patientTaskStatisticsMapper.selectPatientTaskStatisticsByPatientId(patientId);
|
||||
PatientInfo patientInfo = patientInfoMapper.selectPatientInfoById(patientId);
|
||||
if (ObjectUtils.isNotEmpty(patientInfo) && StringUtils.equals(SignRecordServiceStatusConstants.SERVICE_CENTER, patientInfo.getServiceStatus())) {
|
||||
PatientTaskStatistics patientTaskStatisticsView = patientTaskStatisticsMapper.selectNum(patientId);
|
||||
switch (type) {
|
||||
case TaskStatisticsTypeConstants.TASK_NUM:
|
||||
patientTaskStatistics.setTaskNum(patientTaskStatistics.getTaskNum().add(BigDecimal.valueOf(count)));
|
||||
break;
|
||||
case TaskStatisticsTypeConstants.TASK_EXECUTE_NUM:
|
||||
patientTaskStatistics.setTaskExecuteNum(patientTaskStatistics.getTaskExecuteNum().add(BigDecimal.valueOf(count)));
|
||||
if (ObjectUtils.isEmpty(patientTaskStatisticsView)) {
|
||||
patientTaskStatistics.setTaskExecuteNum(patientTaskStatistics.getTaskExecuteNum().add(BigDecimal.valueOf(count)));
|
||||
} else {
|
||||
patientTaskStatistics.setTaskExecuteNum(patientTaskStatisticsView.getTaskExecuteNum());
|
||||
patientTaskStatistics.setTaskFinishNum(patientTaskStatisticsView.getTaskFinishNum());
|
||||
}
|
||||
// 下次任务
|
||||
PatientNextTaskVo patientNextTask = patientTaskStatisticsMapper.getPatientNextTask(patientId);
|
||||
if (ObjectUtils.isNotEmpty(patientNextTask)) {
|
||||
@ -170,7 +176,12 @@ public class PatientTaskStatisticsServiceImpl implements IPatientTaskStatisticsS
|
||||
}
|
||||
break;
|
||||
case TaskStatisticsTypeConstants.TASK_FINISH_NUM:
|
||||
patientTaskStatistics.setTaskFinishNum(patientTaskStatistics.getTaskFinishNum().add(BigDecimal.valueOf(count)));
|
||||
if (ObjectUtils.isEmpty(patientTaskStatisticsView)) {
|
||||
patientTaskStatistics.setTaskFinishNum(patientTaskStatistics.getTaskFinishNum().add(BigDecimal.valueOf(count)));
|
||||
} else {
|
||||
patientTaskStatistics.setTaskExecuteNum(patientTaskStatisticsView.getTaskExecuteNum());
|
||||
patientTaskStatistics.setTaskFinishNum(patientTaskStatisticsView.getTaskFinishNum());
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@ import com.xinelu.common.exception.ServiceException;
|
||||
import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute;
|
||||
import com.xinelu.manage.dto.manualfollowup.ManualFollowUpDTO;
|
||||
import com.xinelu.manage.dto.patientquestionsubmitresult.PatientQuestionSubmitResultDTO;
|
||||
import com.xinelu.manage.dto.signpatientmanageroutenode.CreateAiboActualTimeTaskDto;
|
||||
import com.xinelu.manage.dto.signpatientmanageroutenode.CreateAiobActualTimeTaskDto;
|
||||
import com.xinelu.manage.dto.smssend.SmsInfoDTO;
|
||||
import com.xinelu.manage.vo.manualfollowup.ManualFollowUpVO;
|
||||
import com.xinelu.manage.vo.signpatientmanageroute.SignPatientManageRouteVO;
|
||||
@ -86,7 +86,7 @@ public interface ISignPatientManageRouteService {
|
||||
* @Author haown
|
||||
* @Date 2024-11-4 16:06
|
||||
*/
|
||||
Long createActualTimeTask(@RequestBody CreateAiboActualTimeTaskDto createAiboActualTimeTaskDto);
|
||||
Long createActualTimeTask(@RequestBody CreateAiobActualTimeTaskDto createAiboActualTimeTaskDto);
|
||||
|
||||
/**
|
||||
* 查询人工随访患者基本信息
|
||||
|
||||
@ -46,12 +46,12 @@ 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.domain.signroutetriggercondition.SignRouteTriggerCondition;
|
||||
import com.xinelu.manage.dto.aibo.ActualTimeTaskDto;
|
||||
import com.xinelu.manage.dto.aiob.ActualTimeTaskDto;
|
||||
import com.xinelu.manage.dto.manualfollowup.ManualFollowUpDTO;
|
||||
import com.xinelu.manage.dto.patientquestionoptionresult.PatientQuestionOptionResultDTO;
|
||||
import com.xinelu.manage.dto.patientquestionsubjectresult.PatientQuestionSubjectResultDTO;
|
||||
import com.xinelu.manage.dto.patientquestionsubmitresult.PatientQuestionSubmitResultDTO;
|
||||
import com.xinelu.manage.dto.signpatientmanageroutenode.CreateAiboActualTimeTaskDto;
|
||||
import com.xinelu.manage.dto.signpatientmanageroutenode.CreateAiobActualTimeTaskDto;
|
||||
import com.xinelu.manage.dto.smssend.SmsInfoDTO;
|
||||
import com.xinelu.manage.mapper.labelfieldcontent.LabelFieldContentMapper;
|
||||
import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper;
|
||||
@ -67,7 +67,7 @@ import com.xinelu.manage.mapper.signpatientmanageroute.SignPatientManageRouteMap
|
||||
import com.xinelu.manage.mapper.signpatientmanageroutenode.SignPatientManageRouteNodeMapper;
|
||||
import com.xinelu.manage.mapper.signpatientrecord.SignPatientRecordMapper;
|
||||
import com.xinelu.manage.mapper.signroutetriggercondition.SignRouteTriggerConditionMapper;
|
||||
import com.xinelu.manage.service.aibo.IAIOBService;
|
||||
import com.xinelu.manage.service.aiob.IAIOBService;
|
||||
import com.xinelu.manage.service.patienttaskstatistics.IPatientTaskStatisticsService;
|
||||
import com.xinelu.manage.service.propagandainfo.IPropagandaInfoService;
|
||||
import com.xinelu.manage.service.questioninfo.IQuestionInfoService;
|
||||
@ -353,7 +353,7 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
||||
* @Author haown
|
||||
* @Date 2024-11-4 16:06
|
||||
*/
|
||||
@Override public Long createActualTimeTask(CreateAiboActualTimeTaskDto createAiboActualTimeTaskDto) {
|
||||
@Override public Long createActualTimeTask(CreateAiobActualTimeTaskDto createAiboActualTimeTaskDto) {
|
||||
ScriptInfo scriptInfo = scriptInfoMapper.selectScriptInfoById(createAiboActualTimeTaskDto.getScriptInfoId());
|
||||
SignPatientManageRoute signPatientManageRoute = signPatientManageRouteMapper.selectSignPatientManageRouteById(createAiboActualTimeTaskDto.getManageRouteId());
|
||||
PatientInfo patientInfo = patientInfoMapper.selectPatientInfoById(signPatientManageRoute.getPatientId());
|
||||
|
||||
@ -64,7 +64,7 @@ import com.xinelu.manage.mapper.specialdiseaseroute.SpecialDiseaseRouteMapper;
|
||||
import com.xinelu.manage.mapper.specialdiseasetriggercondition.SpecialDiseaseTriggerConditionMapper;
|
||||
import com.xinelu.manage.mapper.textmessage.TextMessageMapper;
|
||||
import com.xinelu.manage.mapper.wechattemplate.WechatTemplateMapper;
|
||||
import com.xinelu.manage.service.aibo.IAIOBService;
|
||||
import com.xinelu.manage.service.aiob.IAIOBService;
|
||||
import com.xinelu.manage.service.patienttaskstatistics.IPatientTaskStatisticsService;
|
||||
import com.xinelu.manage.service.propagandainfo.IPropagandaInfoService;
|
||||
import com.xinelu.manage.service.questioninfo.IQuestionInfoService;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package com.xinelu.manage.vo.aibo;
|
||||
package com.xinelu.manage.vo.aiob;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@ -128,7 +128,7 @@
|
||||
where patient_id = #{patientId}
|
||||
</update>
|
||||
|
||||
<select id="selectNum" parameterType="Long" resultMap="PatientTaskStatisticsResult">
|
||||
<select id="selectNum" parameterType="Long" resultType="com.xinelu.manage.domain.patienttaskstatistics.PatientTaskStatistics">
|
||||
select id as patientId, sign_patient_record_id as signPatientRecordId,
|
||||
sum(task_execute_status) as taskExecuteNum, sum(task_finish_status) as taskFinishNum
|
||||
from patient_task_statistics_view
|
||||
|
||||
@ -5,7 +5,7 @@ import com.xinelu.common.utils.StringUtils;
|
||||
import com.xinelu.manage.domain.phonedialrecord.PhoneDialRecord;
|
||||
import com.xinelu.manage.dto.phonedialrecord.PhoneDialRecordDto;
|
||||
import com.xinelu.manage.mapper.phonedialrecord.PhoneDialRecordMapper;
|
||||
import com.xinelu.manage.service.aibo.IAIOBService;
|
||||
import com.xinelu.manage.service.aiob.IAIOBService;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
@ -19,7 +19,7 @@ import org.springframework.stereotype.Component;
|
||||
**/
|
||||
@Slf4j
|
||||
@Component("GetAiboRecordVideoTask")
|
||||
public class GetAiboRecordVideoTask {
|
||||
public class GetAiobRecordVideoTask {
|
||||
|
||||
@Resource
|
||||
private PhoneDialRecordMapper phoneDialRecordMapper;
|
||||
@ -1,7 +1,7 @@
|
||||
package com.xinelu.quartz.task;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.xinelu.common.constant.AiboTaskTypeContant;
|
||||
import com.xinelu.common.constant.AiobTaskTypeContant;
|
||||
import com.xinelu.common.enums.NodeExecuteStatusEnum;
|
||||
import com.xinelu.common.enums.PhoneDialMethodEnum;
|
||||
import com.xinelu.common.enums.PhoneRedialTimesEnum;
|
||||
@ -13,10 +13,10 @@ import com.xinelu.manage.domain.scriptinfotaskinfo.ScriptInfoTaskInfo;
|
||||
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.aibo.ActualTimeTaskDto;
|
||||
import com.xinelu.manage.dto.aibo.CreateTaskDto;
|
||||
import com.xinelu.manage.dto.aibo.CustomerInfoDto;
|
||||
import com.xinelu.manage.dto.aibo.ImportTaskDto;
|
||||
import com.xinelu.manage.dto.aiob.ActualTimeTaskDto;
|
||||
import com.xinelu.manage.dto.aiob.CreateTaskDto;
|
||||
import com.xinelu.manage.dto.aiob.CustomerInfoDto;
|
||||
import com.xinelu.manage.dto.aiob.ImportTaskDto;
|
||||
import com.xinelu.manage.dto.signpatientmanageroutenode.SignPatientManageRouteNodeDto;
|
||||
import com.xinelu.manage.mapper.labelfieldcontent.LabelFieldContentMapper;
|
||||
import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper;
|
||||
@ -26,9 +26,9 @@ import com.xinelu.manage.mapper.scriptinfotaskinfo.ScriptInfoTaskInfoMapper;
|
||||
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.aibo.IAIOBService;
|
||||
import com.xinelu.manage.service.aiob.IAIOBService;
|
||||
import com.xinelu.manage.service.signpatientmanageroutenode.ISignPatientManageRouteNodeService;
|
||||
import com.xinelu.manage.vo.aibo.ImportTaskVo;
|
||||
import com.xinelu.manage.vo.aiob.ImportTaskVo;
|
||||
import com.xinelu.manage.vo.labelfieldcontent.LabelFieldInfoContentVo;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
@ -105,7 +105,7 @@ public class UploadRobotPublishTask {
|
||||
// 根据机器人id查询智能外呼系统的任务id
|
||||
executeNodeList.forEach(node -> {
|
||||
ScriptInfo scriptInfo = scriptInfoMapper.selectScriptInfoById(node.getScriptInfoId());
|
||||
String taskId = scriptInfoTaskInfoMapper.getByNodeId(node.getId(), AiboTaskTypeContant.BATCHTASK);
|
||||
String taskId = scriptInfoTaskInfoMapper.getByNodeId(node.getId(), AiobTaskTypeContant.BATCHTASK);
|
||||
if (StringUtils.isBlank(taskId)) {
|
||||
// 没有任务则创建任务
|
||||
if (ObjectUtils.isNotEmpty(scriptInfo)) {
|
||||
@ -132,7 +132,7 @@ public class UploadRobotPublishTask {
|
||||
scriptInfoTaskInfo.setRobotId(scriptInfo.getRobotPublishId());
|
||||
scriptInfoTaskInfo.setCreateTime(LocalDateTime.now());
|
||||
scriptInfoTaskInfo.setSignPatientManageRouteNodeId(node.getId());
|
||||
scriptInfoTaskInfo.setAiobTaskType(AiboTaskTypeContant.BATCHTASK);
|
||||
scriptInfoTaskInfo.setAiobTaskType(AiobTaskTypeContant.BATCHTASK);
|
||||
scriptInfoTaskInfoMapper.insertScriptInfoTaskInfo(scriptInfoTaskInfo);
|
||||
}
|
||||
}
|
||||
@ -207,7 +207,7 @@ public class UploadRobotPublishTask {
|
||||
// 查询需要重拨的任务
|
||||
ScriptInfoTaskInfo scriptInfoTaskInfo = new ScriptInfoTaskInfo();
|
||||
scriptInfoTaskInfo.setExecuteStatus(NodeExecuteStatusEnum.UNEXECUTED.getInfo());
|
||||
scriptInfoTaskInfo.setAiobTaskType(AiboTaskTypeContant.ACTUALTIMETASK);
|
||||
scriptInfoTaskInfo.setAiobTaskType(AiobTaskTypeContant.ACTUALTIMETASK);
|
||||
List<ScriptInfoTaskInfo> scriptInfoTaskInfoList = scriptInfoTaskInfoMapper.selectList(scriptInfoTaskInfo);
|
||||
scriptInfoTaskInfoList.forEach(taskInfo -> {
|
||||
SignPatientManageRouteNode node = signPatientManageRouteNodeMapper.selectSignPatientManageRouteNodeById(taskInfo.getSignPatientManageRouteNodeId());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user