外呼记录

This commit is contained in:
zhangheng 2024-12-17 11:36:32 +08:00
parent 701b80306f
commit e34168bb7c
6 changed files with 106 additions and 20 deletions

View File

@ -121,4 +121,12 @@ public class QuestionInfoController extends BaseController {
public AjaxResult departmentQuestionCount(DepartmentCount departmentCount) {
return AjaxResult.success(questionInfoService.departmentQuestionCount(departmentCount));
}
/**
* 查询问卷基本信息列表不分页
*/
@GetMapping("/selectQuestionInfoList")
public List<QuestionInfo> selectQuestionInfoList(QuestionInfoDto questionInfo) {
return questionInfoService.selectQuestionInfoList(questionInfo);
}
}

View File

@ -16,9 +16,11 @@ import com.xinelu.manage.vo.specialdiseasenode.PatientSpecialDiseaseNodeVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.util.List;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
@ -160,6 +162,9 @@ public class SignPatientManageRouteNodeController extends BaseController {
@PostMapping("/export")
public void export(HttpServletResponse response, UploadRobotPublishRecordDto uploadRobotPublishRecordDto) {
List<UploadRobotPublishRecordVo> list = signNodeService.uploadRobotPublishRecord(uploadRobotPublishRecordDto);
if (CollectionUtils.isNotEmpty(list)){
list = list.stream().distinct().collect(Collectors.toList());
}
ExcelUtil<UploadRobotPublishRecordVo> util = new ExcelUtil<UploadRobotPublishRecordVo>(UploadRobotPublishRecordVo.class);
util.exportExcel(response, list, "外呼记录");
}

View File

@ -13,6 +13,36 @@ import java.time.LocalDate;
@Data
public class UploadRobotPublishRecordDto {
/**
* 科室信息
*/
private Long departmentId;
/**
* 医院信息
*/
private Long hospitalAgencyId;
/**
* 患者id
*/
private Long patientId;
/**
* 患者姓名
*/
private String patientName;
/**
* 患者电话
*/
private String patientPhone;
/**
* 问卷id
*/
private Long questionInfoId;
/**
* 时间区间开始
*/
@ -34,14 +64,4 @@ public class UploadRobotPublishRecordDto {
* 任务节点类型,PHONE_OUTBOUND电话外呼;QUESTIONNAIRE_SCALE问卷量表
*/
private String taskNodeType;
/**
* 患者姓名
*/
private String patientName;
/**
* 医院信息
*/
private String hospitalAgencyId;
}

View File

@ -1410,11 +1410,7 @@ public class SignPatientManageRouteNodeServiceImpl implements ISignPatientManage
*/
@Override
public List<UploadRobotPublishRecordVo> uploadRobotPublishRecord(UploadRobotPublishRecordDto uploadRobotPublishRecordDto) {
List<UploadRobotPublishRecordVo> uploadRobotPublishRecordVos = signPatientManageRouteNodeMapper.selectTaskContented(uploadRobotPublishRecordDto);
if (CollectionUtils.isNotEmpty(uploadRobotPublishRecordVos)){
uploadRobotPublishRecordVos = uploadRobotPublishRecordVos.stream().distinct().collect(Collectors.toList());
}
return uploadRobotPublishRecordVos;
return signPatientManageRouteNodeMapper.selectTaskContented(uploadRobotPublishRecordDto);
}
/**

View File

@ -5,6 +5,7 @@ import com.xinelu.common.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
@ -93,6 +94,22 @@ public class UploadRobotPublishRecordVo {
@Excel(name = "调查结果")
private String contentedFlag;
@ApiModelProperty(value = "调查分数")
@Excel(name = "调查分数")
private BigDecimal SurveyScore;
@ApiModelProperty(value = "反馈意见")
@Excel(name = "反馈意见")
private String feedbackMessage;
@ApiModelProperty(value = "随访状态")
@Excel(name = "随访状态")
private String followUpStatus;
@ApiModelProperty(value = "随访人")
@Excel(name = "随访人")
private String followUpPerson;
/**
* 冗余:整个问卷中是否包含异常项;REMARKABLE:异常的;ROUTINE:正常的;默认ROUTINE
* 2024/12/2
@ -108,6 +125,14 @@ public class UploadRobotPublishRecordVo {
@Excel(name = "随访时间", width = 30, dateFormat = "yyyy-MM-dd")
private LocalDateTime nodePlanTime;
@ApiModelProperty(value = "抽样人")
@Excel(name = "抽样人")
private String samplingPersonnel;
@ApiModelProperty(value = "抽样时间")
@Excel(name = "抽样时间")
private String SampleTime;
/**
* 话术表 ID
*/

View File

@ -1094,7 +1094,20 @@
spmrn.questionnaire_name,
spmrn.node_execute_status,
spmrn.node_plan_time,
pqsr.contented_flag,
CASE
WHEN spmrn.node_execute_status = 'EXECUTED' THEN '已随访'
WHEN spmrn.node_execute_status = 'UNEXECUTED' THEN '未随访'
END AS followUpStatus,
CASE
WHEN spmrn.phone_dial_method = 'AI' THEN 'AI'
WHEN spmrn.phone_dial_method = 'COMMON' THEN spmrn.route_handle_person
END AS followUpPerson,
spmrn.create_by AS samplingPersonnel,
spmrn.create_time AS SampleTime,
CASE
WHEN pqsr.contented_flag = 'DISCONTENTED' THEN '不满意'
WHEN pqsr.contented_flag = 'CONTENTED' THEN '满意'
END AS contentedFlag,
pqsr.remarkable_flag,
pi.patient_phone,
pi.patient_name,
@ -1122,16 +1135,35 @@
LEFT JOIN patient_visit_record pvr ON pi.id = pvr.patient_id
LEFT JOIN question_info qi on spmrn.question_info_id = qi.id
LEFT JOIN script_info si on si.id = spmrn.script_info_id
WHERE spmrn.task_node_type = #{taskNodeType}
<if test="questionnaireName != null and questionnaireName != ''">
AND spmrn.questionnaire_name = #{questionnaireName}
WHERE
spmrn.del_flag = 0
<if test="departmentId != null">
and pi.department_id = #{departmentId}
</if>
<if test="hospitalAgencyId != null">
and pi.hospital_agency_id = #{hospitalAgencyId}
</if>
<if test="patientId != null">
and pi.id = #{patientId}
</if>
<if test="patientName != null and patientName != ''">
and pi.patient_name like concat('%', #{patientName}, '%')
</if>
<if test="patientPhone != null">
and pi.patient_phone = #{patientPhone}
</if>
<if test="taskNodeType != null and taskNodeType != ''">
and spmrn.task_node_type = #{taskNodeType}
</if>
<if test="questionInfoId != null">
AND spmrn.question_info_id = #{questionInfoId}
</if>
AND spmrn.del_flag = 0
<if test="startTime != null"><!-- 开始时间检索 -->
AND date_format(spmrn.node_plan_time,'%y%m%d') &gt;= date_format(#{startTime},'%y%m%d')
</if>
<if test="endTime != null"><!-- 结束时间检索 -->
AND date_format(spmrn.node_plan_time,'%y%m%d') &lt;= date_format(#{endTime},'%y%m%d')
</if>
ORDER BY spmrn.create_time DESC
</select>
</mapper>