任务代办修改

This commit is contained in:
zhangheng 2024-08-07 18:05:52 +08:00
parent 3a13af1495
commit 720b3a2f96
3 changed files with 67 additions and 27 deletions

View File

@ -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<PhoneDialRecord> 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<SignPatientRecordSelectVo> getRecordList(Long patientId) {
List<SignPatientRecordSelectVo> retList = new ArrayList<>();
// 查询签约记录
List<SignPatientRecordVo> signRecordList = signPatientRecordMapper.getByPatient(patientId);
signRecordList.forEach(signRecord -> {
SignPatientManageRoute manageRouteQuery = new SignPatientManageRoute();
manageRouteQuery.setSignPatientRecordId(signRecord.getId());
manageRouteQuery.setTaskCreateType(TaskCreateTypeConstant.MANUAL_MATCHE);
List<SignPatientManageRoute> 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<SignPatientRecordSelectVo> getRecordList(Long patientId) {
List<SignPatientRecordSelectVo> retList = new ArrayList<>();
// 查询签约记录
List<SignPatientRecordVo> signRecordList = signPatientRecordMapper.getByPatient(patientId);
signRecordList.forEach(signRecord -> {
SignPatientManageRoute manageRouteQuery = new SignPatientManageRoute();
manageRouteQuery.setSignPatientRecordId(signRecord.getId());
manageRouteQuery.setTaskCreateType(TaskCreateTypeConstant.MANUAL_MATCHE);
List<SignPatientManageRoute> 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;
}
/**
* 新增患者管理任务执行记录

View File

@ -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;
}

View File

@ -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;
}