外呼记录

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) { public AjaxResult departmentQuestionCount(DepartmentCount departmentCount) {
return AjaxResult.success(questionInfoService.departmentQuestionCount(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.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
@ -160,6 +162,9 @@ public class SignPatientManageRouteNodeController extends BaseController {
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, UploadRobotPublishRecordDto uploadRobotPublishRecordDto) { public void export(HttpServletResponse response, UploadRobotPublishRecordDto uploadRobotPublishRecordDto) {
List<UploadRobotPublishRecordVo> list = signNodeService.uploadRobotPublishRecord(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); ExcelUtil<UploadRobotPublishRecordVo> util = new ExcelUtil<UploadRobotPublishRecordVo>(UploadRobotPublishRecordVo.class);
util.exportExcel(response, list, "外呼记录"); util.exportExcel(response, list, "外呼记录");
} }

View File

@ -13,6 +13,36 @@ import java.time.LocalDate;
@Data @Data
public class UploadRobotPublishRecordDto { 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问卷量表 * 任务节点类型,PHONE_OUTBOUND电话外呼;QUESTIONNAIRE_SCALE问卷量表
*/ */
private String taskNodeType; private String taskNodeType;
/**
* 患者姓名
*/
private String patientName;
/**
* 医院信息
*/
private String hospitalAgencyId;
} }

View File

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

View File

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

View File

@ -1094,7 +1094,20 @@
spmrn.questionnaire_name, spmrn.questionnaire_name,
spmrn.node_execute_status, spmrn.node_execute_status,
spmrn.node_plan_time, 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, pqsr.remarkable_flag,
pi.patient_phone, pi.patient_phone,
pi.patient_name, pi.patient_name,
@ -1122,16 +1135,35 @@
LEFT JOIN patient_visit_record pvr ON pi.id = pvr.patient_id 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 question_info qi on spmrn.question_info_id = qi.id
LEFT JOIN script_info si on si.id = spmrn.script_info_id LEFT JOIN script_info si on si.id = spmrn.script_info_id
WHERE spmrn.task_node_type = #{taskNodeType} WHERE
<if test="questionnaireName != null and questionnaireName != ''"> spmrn.del_flag = 0
AND spmrn.questionnaire_name = #{questionnaireName} <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> </if>
AND spmrn.del_flag = 0
<if test="startTime != null"><!-- 开始时间检索 --> <if test="startTime != null"><!-- 开始时间检索 -->
AND date_format(spmrn.node_plan_time,'%y%m%d') &gt;= date_format(#{startTime},'%y%m%d') AND date_format(spmrn.node_plan_time,'%y%m%d') &gt;= date_format(#{startTime},'%y%m%d')
</if> </if>
<if test="endTime != null"><!-- 结束时间检索 --> <if test="endTime != null"><!-- 结束时间检索 -->
AND date_format(spmrn.node_plan_time,'%y%m%d') &lt;= date_format(#{endTime},'%y%m%d') AND date_format(spmrn.node_plan_time,'%y%m%d') &lt;= date_format(#{endTime},'%y%m%d')
</if> </if>
ORDER BY spmrn.create_time DESC
</select> </select>
</mapper> </mapper>