From e34168bb7c294dd9c67c969ed80338d93fea7d00 Mon Sep 17 00:00:00 2001 From: zhangheng <3226558941@qq.com> Date: Tue, 17 Dec 2024 11:36:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=96=E5=91=BC=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../questioninfo/QuestionInfoController.java | 8 ++++ .../SignPatientManageRouteNodeController.java | 5 +++ .../UploadRobotPublishRecordDto.java | 40 +++++++++++++----- ...SignPatientManageRouteNodeServiceImpl.java | 6 +-- .../UploadRobotPublishRecordVo.java | 25 +++++++++++ .../SignPatientManageRouteNodeMapper.xml | 42 ++++++++++++++++--- 6 files changed, 106 insertions(+), 20 deletions(-) diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/questioninfo/QuestionInfoController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/questioninfo/QuestionInfoController.java index cac0a928..45bb16a2 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/questioninfo/QuestionInfoController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/questioninfo/QuestionInfoController.java @@ -121,4 +121,12 @@ public class QuestionInfoController extends BaseController { public AjaxResult departmentQuestionCount(DepartmentCount departmentCount) { return AjaxResult.success(questionInfoService.departmentQuestionCount(departmentCount)); } + + /** + * 查询问卷基本信息列表不分页 + */ + @GetMapping("/selectQuestionInfoList") + public List selectQuestionInfoList(QuestionInfoDto questionInfo) { + return questionInfoService.selectQuestionInfoList(questionInfo); + } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientmanageroutenode/SignPatientManageRouteNodeController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientmanageroutenode/SignPatientManageRouteNodeController.java index 720d3ade..e7f1223e 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientmanageroutenode/SignPatientManageRouteNodeController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientmanageroutenode/SignPatientManageRouteNodeController.java @@ -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 list = signNodeService.uploadRobotPublishRecord(uploadRobotPublishRecordDto); + if (CollectionUtils.isNotEmpty(list)){ + list = list.stream().distinct().collect(Collectors.toList()); + } ExcelUtil util = new ExcelUtil(UploadRobotPublishRecordVo.class); util.exportExcel(response, list, "外呼记录"); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/signpatientmanageroutenode/UploadRobotPublishRecordDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/signpatientmanageroutenode/UploadRobotPublishRecordDto.java index 698d1213..bb9afff2 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/signpatientmanageroutenode/UploadRobotPublishRecordDto.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/signpatientmanageroutenode/UploadRobotPublishRecordDto.java @@ -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; } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroutenode/impl/SignPatientManageRouteNodeServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroutenode/impl/SignPatientManageRouteNodeServiceImpl.java index 4068d12d..271e7048 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroutenode/impl/SignPatientManageRouteNodeServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroutenode/impl/SignPatientManageRouteNodeServiceImpl.java @@ -1410,11 +1410,7 @@ public class SignPatientManageRouteNodeServiceImpl implements ISignPatientManage */ @Override public List uploadRobotPublishRecord(UploadRobotPublishRecordDto uploadRobotPublishRecordDto) { - List uploadRobotPublishRecordVos = signPatientManageRouteNodeMapper.selectTaskContented(uploadRobotPublishRecordDto); - if (CollectionUtils.isNotEmpty(uploadRobotPublishRecordVos)){ - uploadRobotPublishRecordVos = uploadRobotPublishRecordVos.stream().distinct().collect(Collectors.toList()); - } - return uploadRobotPublishRecordVos; + return signPatientManageRouteNodeMapper.selectTaskContented(uploadRobotPublishRecordDto); } /** diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientmanageroutenode/UploadRobotPublishRecordVo.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientmanageroutenode/UploadRobotPublishRecordVo.java index be6a610f..e5d9e706 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientmanageroutenode/UploadRobotPublishRecordVo.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientmanageroutenode/UploadRobotPublishRecordVo.java @@ -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 */ diff --git a/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.xml index 723db228..cdfc354c 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.xml @@ -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} - - AND spmrn.questionnaire_name = #{questionnaireName} + WHERE + spmrn.del_flag = 0 + + and pi.department_id = #{departmentId} + + + and pi.hospital_agency_id = #{hospitalAgencyId} + + + and pi.id = #{patientId} + + + and pi.patient_name like concat('%', #{patientName}, '%') + + + and pi.patient_phone = #{patientPhone} + + + and spmrn.task_node_type = #{taskNodeType} + + + AND spmrn.question_info_id = #{questionInfoId} - AND spmrn.del_flag = 0 AND date_format(spmrn.node_plan_time,'%y%m%d') >= date_format(#{startTime},'%y%m%d') AND date_format(spmrn.node_plan_time,'%y%m%d') <= date_format(#{endTime},'%y%m%d') + ORDER BY spmrn.create_time DESC