From 720b3a2f967a72a669491cb15d742dc0bdf76e7f Mon Sep 17 00:00:00 2001 From: zhangheng <3226558941@qq.com> Date: Wed, 7 Aug 2024 18:05:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E4=BB=A3=E5=8A=9E=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SignPatientManageRouteServiceImpl.java | 72 ++++++++++++------- .../vo/manualfollowup/ManualFollowUpVO.java | 7 +- .../vo/signpatientmanageroute/PhonePush.java | 15 ++++ 3 files changed, 67 insertions(+), 27 deletions(-) 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 1a20daac..a712a338 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 @@ -61,6 +61,7 @@ import com.xinelu.manage.vo.manualfollowup.ManualFollowPatientVO; import com.xinelu.manage.vo.manualfollowup.ManualFollowUpVO; import com.xinelu.manage.vo.propagandainfo.PropagandaMaterialsVo; import com.xinelu.manage.vo.questionInfo.QuestionVO; +import com.xinelu.manage.vo.signpatientmanageroute.PhonePush; import com.xinelu.manage.vo.signpatientmanageroute.SignPatientManageRouteVO; import com.xinelu.manage.vo.signpatientmanageroutenode.SignPatientManageNodeAuditVo; import com.xinelu.manage.vo.signpatientrecord.SignPatientRecordSelectVo; @@ -350,6 +351,7 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout if (before) { //转换成中文…… manualFollowUpVO.setRouteNodeName(RouteNodeNameEnum.getNameByInfo(manualFollowUpVO.getRouteNodeName()).getName()); + manualFollowUpVO.setPlanTime(localDate); manualFollowUps.add(manualFollowUpVO); } } @@ -527,7 +529,24 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout */ @Override public AjaxResult selectPhonePush(Long manageRouteNodeId) { - return AjaxResult.success(signPatientManageRouteMapper.selectSignPatientManageRouteNode(manageRouteNodeId)); + PhonePush phonePush = signPatientManageRouteMapper.selectSignPatientManageRouteNode(manageRouteNodeId); + PhoneDialRecord phoneDialRecord = new PhoneDialRecord(); + phoneDialRecord.setManageRouteNodeId(manageRouteNodeId); + List phoneDialRecords = phoneDialRecordMapper.selectPhoneDialRecordList(phoneDialRecord); + //时间排序、有拨打记录 + if (CollectionUtils.isNotEmpty(phoneDialRecords) && phoneDialRecords.size() > 0) { + phoneDialRecords.sort((t1, t2) -> t2.getDialTime().compareTo(t1.getDialTime())); + phonePush.setFirstTime(phoneDialRecords.get(0).getDialTime()); + //两条拨打记录 + if (phoneDialRecords.size() > 1) { + phonePush.setFirstTime(phoneDialRecords.get(1).getDialTime()); + } + //三条拨打记录 + if (phoneDialRecords.size() > 2) { + phonePush.setFirstTime(phoneDialRecords.get(2).getDialTime()); + } + } + return AjaxResult.success(phonePush); } /** @@ -818,31 +837,32 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout return manageNodeAuditList; } - /** - * @description 患者详情--康复计划及记录,右上角签约记录下拉框 - * @Param patientId 患者主键 - * @return 签约记录列表 - * @Author haown - * @Date 2024-08-01 14:48 - */ - @Override public List getRecordList(Long patientId) { - List retList = new ArrayList<>(); - // 查询签约记录 - List signRecordList = signPatientRecordMapper.getByPatient(patientId); - signRecordList.forEach(signRecord -> { - SignPatientManageRoute manageRouteQuery = new SignPatientManageRoute(); - manageRouteQuery.setSignPatientRecordId(signRecord.getId()); - manageRouteQuery.setTaskCreateType(TaskCreateTypeConstant.MANUAL_MATCHE); - List manageRouteList = signPatientManageRouteMapper.selectSignPatientManageRouteList(manageRouteQuery); - if (CollectionUtils.isNotEmpty(manageRouteList)) { - retList.add(SignPatientRecordSelectVo.builder() - .id(signRecord.getId()) - .signRouteName(signRecord.getSignTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + "|" + manageRouteList.get(0).getRouteName()) - .build()); - } - }); - return retList; - } + /** + * @return 签约记录列表 + * @description 患者详情--康复计划及记录,右上角签约记录下拉框 + * @Param patientId 患者主键 + * @Author haown + * @Date 2024-08-01 14:48 + */ + @Override + public List getRecordList(Long patientId) { + List retList = new ArrayList<>(); + // 查询签约记录 + List signRecordList = signPatientRecordMapper.getByPatient(patientId); + signRecordList.forEach(signRecord -> { + SignPatientManageRoute manageRouteQuery = new SignPatientManageRoute(); + manageRouteQuery.setSignPatientRecordId(signRecord.getId()); + manageRouteQuery.setTaskCreateType(TaskCreateTypeConstant.MANUAL_MATCHE); + List manageRouteList = signPatientManageRouteMapper.selectSignPatientManageRouteList(manageRouteQuery); + if (CollectionUtils.isNotEmpty(manageRouteList)) { + retList.add(SignPatientRecordSelectVo.builder() + .id(signRecord.getId()) + .signRouteName(signRecord.getSignTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + "|" + manageRouteList.get(0).getRouteName()) + .build()); + } + }); + return retList; + } /** * 新增患者管理任务执行记录 diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/manualfollowup/ManualFollowUpVO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/manualfollowup/ManualFollowUpVO.java index 3f016e22..b498608f 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/manualfollowup/ManualFollowUpVO.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/manualfollowup/ManualFollowUpVO.java @@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.time.LocalDate; import java.time.LocalDateTime; /** @@ -112,7 +113,7 @@ public class ManualFollowUpVO { private LocalDateTime dischargeTime; @JsonFormat(pattern = "yyyy-MM-dd") - @ApiModelProperty(value = "随访时间") + @ApiModelProperty(value = "执行时间") private LocalDateTime executeTime; @ApiModelProperty(value = "任务类型,电话外呼:PHONE_OUTBOUND,问卷量表:QUESTIONNAIRE_SCALE,宣教文章:PROPAGANDA_ARTICLE,文字提醒:TEXT_REMIND,人工随访:ARTIFICIAL_FOLLOW_UP") @@ -141,4 +142,8 @@ public class ManualFollowUpVO { @ApiModelProperty(value = "任务节点类型,电话外呼:PHONE_OUTBOUND,问卷量表:QUESTIONNAIRE_SCALE,宣教文章:PROPAGANDA_ARTICLE,文字提醒:TEXT_REMIND") private String taskNodeType; + + @JsonFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty(value = "计划时间") + private LocalDate planTime; } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientmanageroute/PhonePush.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientmanageroute/PhonePush.java index d246870d..a96eb985 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientmanageroute/PhonePush.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientmanageroute/PhonePush.java @@ -1,8 +1,11 @@ package com.xinelu.manage.vo.signpatientmanageroute; +import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.time.LocalDateTime; + /** * 话术类型代办处理详情返回VO * @@ -77,4 +80,16 @@ public class PhonePush { @ApiModelProperty(value = "电话短信发送情况") private String phoneMessageNodeExecuteResultStatus; + + @ApiModelProperty(value = "第一次拨打时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime firstTime; + + @ApiModelProperty(value = "第二次拨打时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime secondTime; + + @ApiModelProperty(value = "第三次拨打时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime thirdTime; }