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 02185b2f..720d3ade 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 @@ -5,21 +5,20 @@ import com.xinelu.common.core.domain.R; import com.xinelu.common.core.page.TableDataInfo; import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.StringUtils; +import com.xinelu.common.utils.poi.ExcelUtil; import com.xinelu.manage.dto.signpatientmanageroutenode.PatientTaskDto; import com.xinelu.manage.dto.signpatientmanageroutenode.RouteNodeCheckDto; import com.xinelu.manage.dto.signpatientmanageroutenode.SignPatientManageRouteNodeDto; +import com.xinelu.manage.dto.signpatientmanageroutenode.UploadRobotPublishRecordDto; import com.xinelu.manage.service.signpatientmanageroutenode.ISignPatientManageRouteNodeService; -import com.xinelu.manage.vo.signpatientmanageroutenode.AIDialRecordVo; -import com.xinelu.manage.vo.signpatientmanageroutenode.PatientManageNodeInfoVo; -import com.xinelu.manage.vo.signpatientmanageroutenode.PatientManageNodeListVo; -import com.xinelu.manage.vo.signpatientmanageroutenode.PatientTaskVo; -import com.xinelu.manage.vo.signpatientmanageroutenode.SignPatientManageRouteNodeVo; -import com.xinelu.manage.vo.signpatientmanageroutenode.SignPatientTaskVo; +import com.xinelu.manage.vo.signpatientmanageroutenode.*; import com.xinelu.manage.vo.specialdiseasenode.PatientSpecialDiseaseNodeVo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import java.util.List; import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; + import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; @@ -148,4 +147,20 @@ public class SignPatientManageRouteNodeController extends BaseController { signNodeService.generateStatistic(); return R.ok(); } + + @ApiOperation("外呼记录") + @GetMapping("/uploadRobotPublishRecord") + public TableDataInfo uploadRobotPublishRecord(UploadRobotPublishRecordDto uploadRobotPublishRecordDto) { + startPage(); + List list = signNodeService.uploadRobotPublishRecord(uploadRobotPublishRecordDto); + return getDataTable(list); + } + + @ApiOperation("外呼记录导出") + @PostMapping("/export") + public void export(HttpServletResponse response, UploadRobotPublishRecordDto uploadRobotPublishRecordDto) { + List list = signNodeService.uploadRobotPublishRecord(uploadRobotPublishRecordDto); + 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 new file mode 100644 index 00000000..698d1213 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/signpatientmanageroutenode/UploadRobotPublishRecordDto.java @@ -0,0 +1,47 @@ +package com.xinelu.manage.dto.signpatientmanageroutenode; + +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDate; + +/** + * @Description 外呼记录传参实体类 + * @Author zh + * @Date 2024-12-13 + */ +@Data +public class UploadRobotPublishRecordDto { + + /** + * 时间区间,开始 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd") + private LocalDate startTime; + + /** + * 时间区间,结束 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd") + private LocalDate endTime; + + /** + * 问卷名称 + */ + private String questionnaireName; + + /** + * 任务节点类型,PHONE_OUTBOUND:电话外呼;QUESTIONNAIRE_SCALE:问卷量表 + */ + private String taskNodeType; + + /** + * 患者姓名 + */ + private String patientName; + + /** + * 医院信息 + */ + private String hospitalAgencyId; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.java index 37c08060..8aadc98e 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.java @@ -3,6 +3,7 @@ package com.xinelu.manage.mapper.signpatientmanageroutenode; import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode; import com.xinelu.manage.dto.signpatientmanageroutenode.PatientTaskDto; import com.xinelu.manage.dto.signpatientmanageroutenode.SignPatientManageRouteNodeDto; +import com.xinelu.manage.dto.signpatientmanageroutenode.UploadRobotPublishRecordDto; import com.xinelu.manage.dto.statistics.FollowUpRateDto; import com.xinelu.manage.vo.homepage.PatientAndNode; import com.xinelu.manage.vo.signpatientmanageroutenode.*; @@ -195,4 +196,12 @@ public interface SignPatientManageRouteNodeMapper { List selectNodeExecuteStatus(); List getFollowUpPlan(FollowUpRateDto queryDto); + + /** + * 外呼记录查询 + * + * @param uploadRobotPublishRecordDto 时间信息 + * @return UploadRobotPublishRecordVo + */ + List selectTaskContented(UploadRobotPublishRecordDto uploadRobotPublishRecordDto); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/impl/SignPatientManageRouteServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/impl/SignPatientManageRouteServiceImpl.java index 1c845870..c6962e2e 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/impl/SignPatientManageRouteServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/impl/SignPatientManageRouteServiceImpl.java @@ -478,10 +478,12 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout public AjaxResult selectFollowPatientInfo(Long id) { ManualFollowPatientVO patientVO = signPatientManageRouteMapper.selectFollowPatientInfo(id); // 设置年龄 - patientVO.setAge(AgeUtil.getAgeMonth(patientVO.getBirthDate().toString())); if (ObjectUtils.isEmpty(patientVO)) { return AjaxResult.error("患者信息不存在!"); } + if (Objects.nonNull(patientVO.getBirthDate())) { + patientVO.setAge(AgeUtil.getAgeMonth(patientVO.getBirthDate().toString())); + } return AjaxResult.success(patientVO); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroutenode/ISignPatientManageRouteNodeService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroutenode/ISignPatientManageRouteNodeService.java index 1ee59ae8..ba72886b 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroutenode/ISignPatientManageRouteNodeService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroutenode/ISignPatientManageRouteNodeService.java @@ -3,19 +3,9 @@ package com.xinelu.manage.service.signpatientmanageroutenode; import com.xinelu.manage.domain.patientnodeparamscurrent.PatientNodeParamsCurrent; import com.xinelu.manage.domain.patientvisitrecord.PatientVisitRecord; import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode; -import com.xinelu.manage.dto.signpatientmanageroutenode.AppletPatientTaskDto; -import com.xinelu.manage.dto.signpatientmanageroutenode.PatientTaskDto; -import com.xinelu.manage.dto.signpatientmanageroutenode.RouteNodeCheckDto; -import com.xinelu.manage.dto.signpatientmanageroutenode.SignPatientManageRouteNodeDto; +import com.xinelu.manage.dto.signpatientmanageroutenode.*; import com.xinelu.manage.vo.labelfieldcontent.LabelFieldInfoContentVo; -import com.xinelu.manage.vo.signpatientmanageroutenode.AppletRouteNodeListVo; -import com.xinelu.manage.vo.signpatientmanageroutenode.PatientManageNodeInfoVo; -import com.xinelu.manage.vo.signpatientmanageroutenode.PatientManageNodeListVo; -import com.xinelu.manage.vo.signpatientmanageroutenode.PatientTaskVo; -import com.xinelu.manage.vo.signpatientmanageroutenode.AIDialRecordVo; -import com.xinelu.manage.vo.signpatientmanageroutenode.SignPatientManageNodeAuditVo; -import com.xinelu.manage.vo.signpatientmanageroutenode.SignPatientManageRouteNodeVo; -import com.xinelu.manage.vo.signpatientmanageroutenode.SignPatientTaskVo; +import com.xinelu.manage.vo.signpatientmanageroutenode.*; import com.xinelu.manage.vo.specialdiseasenode.PatientSpecialDiseaseNodeVo; import com.xinelu.manage.vo.specialdiseasenode.SpecialDiseaseNodeVO; import java.time.LocalDateTime; @@ -235,4 +225,12 @@ public interface ISignPatientManageRouteNodeService { * @Date 2024-11-15 10:52 */ void updateBySpecialDiseaseRoute(List delDiseaseNodeIds, List updateList, List addDiseaseNodeList); + + /** + * 外呼记录 + * + * @param uploadRobotPublishRecordDto 时间信息 + * @return UploadRobotPublishRecordVo + */ + List uploadRobotPublishRecord(UploadRobotPublishRecordDto uploadRobotPublishRecordDto); } 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 e820cdb0..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 @@ -43,10 +43,7 @@ import com.xinelu.manage.domain.specialdiseasetriggercondition.SpecialDiseaseTri import com.xinelu.manage.domain.textmessage.TextMessage; import com.xinelu.manage.domain.wechattemplate.WechatTemplate; import com.xinelu.manage.dto.patientinfo.PatientInfoDto; -import com.xinelu.manage.dto.signpatientmanageroutenode.AppletPatientTaskDto; -import com.xinelu.manage.dto.signpatientmanageroutenode.PatientTaskDto; -import com.xinelu.manage.dto.signpatientmanageroutenode.RouteNodeCheckDto; -import com.xinelu.manage.dto.signpatientmanageroutenode.SignPatientManageRouteNodeDto; +import com.xinelu.manage.dto.signpatientmanageroutenode.*; import com.xinelu.manage.mapper.labelfieldcontent.LabelFieldContentMapper; import com.xinelu.manage.mapper.patientinfo.PatientAllInfoViewMapper; import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper; @@ -76,15 +73,7 @@ import com.xinelu.manage.vo.patientinfo.PatientNextTaskVo; import com.xinelu.manage.vo.patientquestionsubmitresult.PatientQuestionSubmitResultVO; import com.xinelu.manage.vo.propagandainfo.PropagandaMaterialsVo; import com.xinelu.manage.vo.questionInfo.QuestionVO; -import com.xinelu.manage.vo.signpatientmanageroutenode.AIDialRecordVo; -import com.xinelu.manage.vo.signpatientmanageroutenode.AppletRouteNodeListVo; -import com.xinelu.manage.vo.signpatientmanageroutenode.PatientManageNodeInfoVo; -import com.xinelu.manage.vo.signpatientmanageroutenode.PatientManageNodeListVo; -import com.xinelu.manage.vo.signpatientmanageroutenode.PatientTaskVo; -import com.xinelu.manage.vo.signpatientmanageroutenode.SignPatientManageNodeAuditVo; -import com.xinelu.manage.vo.signpatientmanageroutenode.SignPatientManageRouteNodeInfoVo; -import com.xinelu.manage.vo.signpatientmanageroutenode.SignPatientManageRouteNodeVo; -import com.xinelu.manage.vo.signpatientmanageroutenode.SignPatientTaskVo; +import com.xinelu.manage.vo.signpatientmanageroutenode.*; import com.xinelu.manage.vo.specialdiseasenode.PatientSpecialDiseaseNodeVo; import com.xinelu.manage.vo.specialdiseasenode.SpecialDiseaseNodeVO; import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteVO; @@ -1413,6 +1402,17 @@ public class SignPatientManageRouteNodeServiceImpl implements ISignPatientManage } } + /** + * 外呼记录 + * + * @param uploadRobotPublishRecordDto 时间信息 + * @return UploadRobotPublishRecordVo + */ + @Override + public List uploadRobotPublishRecord(UploadRobotPublishRecordDto uploadRobotPublishRecordDto) { + return signPatientManageRouteNodeMapper.selectTaskContented(uploadRobotPublishRecordDto); + } + /** * 根据管理路径生成任务 * @param signPatientManageRoute 签约管理路径 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 new file mode 100644 index 00000000..be6a610f --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientmanageroutenode/UploadRobotPublishRecordVo.java @@ -0,0 +1,162 @@ +package com.xinelu.manage.vo.signpatientmanageroutenode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.xinelu.common.annotation.Excel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.time.LocalDateTime; + +/** + * @Description 外呼记录返回实体类 + * @Author zh + * @Date 2024-12-13 + */ +@Data +public class UploadRobotPublishRecordVo { + + /** + * 所属机构id + */ + @ApiModelProperty(value = "所属机构id") + private Long hospitalAgencyId; + + /** + * 所属机构名称 + */ + @ApiModelProperty(value = "所属机构名称") + @Excel(name = "医院") + private String hospitalAgencyName; + + /** + * 所属科室id + */ + @ApiModelProperty(value = "所属科室id") + private Long departmentId; + + /** + * 所属科室名称 + */ + @ApiModelProperty(value = "所属科室名称") + @Excel(name = "科室名称") + private String departmentName; + + /** + * 就诊时间,格式:yyyy-MM-dd HH:mm:ss + */ + @ApiModelProperty(value = "就诊时间,格式:yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "就诊时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime visitDate; + + /** + * 路径名称(任务名称) + */ + @ApiModelProperty(value = "路径名称") + private String manageRouteName; + + /** + * 患者表id + */ + @ApiModelProperty(value = "患者表id") + private Long patientId; + + /** + * 患者姓名 + */ + @ApiModelProperty(value = "患者姓名") + @Excel(name = "姓名") + private String patientName; + + /** + * 患者电话 + */ + @ApiModelProperty(value = "患者电话") + @Excel(name = "联系电话") + private String patientPhone; + + @ApiModelProperty(value = "年龄") + @Excel(name = "年龄") + private Integer age; + + /** + * 主要诊断 + */ + @ApiModelProperty(value = "主要诊断") + @Excel(name = "诊断") + private String mainDiagnosis; + + /** + * 冗余:整个问卷中是否包含不满意项;DISCONTENTED:不满意;CONTENTED:满意;默认CONTENTED; + * 2024/12/2 + */ + @Excel(name = "调查结果") + private String contentedFlag; + + /** + * 冗余:整个问卷中是否包含异常项;REMARKABLE:异常的;ROUTINE:正常的;默认ROUTINE + * 2024/12/2 + */ + @ApiModelProperty(name = "异常项") + private String remarkableFlag; + + /** + * 执行时间,格式:HH:mm + */ + @ApiModelProperty(value = "执行时间,格式:HH:mm") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "随访时间", width = 30, dateFormat = "yyyy-MM-dd") + private LocalDateTime nodePlanTime; + + /** + * 话术表 ID + */ + @ApiModelProperty(value = "话术表 ID") + private Long scriptInfoId; + + /** + * 问卷表id + */ + @ApiModelProperty(value = "问卷表id") + private Long questionInfoId; + + /** + * 问卷模板名称 + */ + @ApiModelProperty(value = "问卷模板名称") + private String questionnaireName; + + /** + * 节点任务执行状态,已执行:EXECUTED,未执行:UNEXECUTED + */ + @ApiModelProperty(value = "节点任务执行状态,已执行:EXECUTED,未执行:UNEXECUTED") + private String nodeExecuteStatus; + + @ApiModelProperty(value = "默认已接通:CONNECTED;未接通:NOTCONNECTED") + private String phoneConnectStatus; + + /** + * 任务节点类型:PHONE_OUTBOUND:电话外呼(默认自动。人工或自动);QUESTIONNAIRE_SCALE:问卷量表(消息推送或人工随访);PROPAGANDA_ARTICLE:宣教文章;TEXT_REMIND:文字提醒(微信、短信、公众号) + */ + @ApiModelProperty(value = "任务节点类型") + private String taskNodeType; + + /** + * 电话拨通情况;SUCCESS:成功;FAILURE:失败;EXPIRED:超期自动作废(如超期一周);NULL或空字符串:缺省值,表示未执行; + */ + @ApiModelProperty(value = "电话拨通情况") + private String phoneNodeExecuteResultStatus; + + @ApiModelProperty(value = "拨打状态:DIALED,已拨打:NODIALED:未拨打;默认NULL表示未拨打") + private String dialStatus; + + /** + * 问卷关联话术id + */ + private Long scriptTemplateId; + + /** + * 问卷关联话术名称 (展示 : 话术名称) + */ + private String scriptTemplateName; +} \ No newline at end of file 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 b9cc1976..723db228 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.xml @@ -1083,4 +1083,55 @@ + +