Merge branch '0418_小程序开发' of http://182.92.166.109:3000/zhuangyuanke/PostDischargePatientManage into 0418_小程序开发
This commit is contained in:
commit
8832ea2e87
@ -7,9 +7,10 @@ import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseChildRouteAuditVo;
|
||||
import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteAuditVo;
|
||||
import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteInfoVo;
|
||||
import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteVO;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 专病路径信息Mapper接口
|
||||
*
|
||||
@ -118,4 +119,13 @@ public interface SpecialDiseaseRouteMapper {
|
||||
* @return int
|
||||
*/
|
||||
List<String> selectRouteCheckStatus(Long routeId);
|
||||
|
||||
/**
|
||||
* 根据科室及路径名称查询信息
|
||||
*
|
||||
* @param departmentId
|
||||
* @param routeName
|
||||
* @return
|
||||
*/
|
||||
List<SpecialDiseaseRoute> selectCountByName(@Param("departmentId") Long departmentId, @Param("routeName") String routeName);
|
||||
}
|
||||
|
||||
@ -91,7 +91,6 @@ public class ScriptInfoServiceImpl implements IScriptInfoService {
|
||||
scriptInfo.setCreateBy(SecurityUtils.getUsername());
|
||||
scriptInfo.setCreateTime(LocalDateTime.now());
|
||||
scriptInfo.setScriptStatus(ScriptStatusEnum.OFF_SHELF.getInfo());
|
||||
scriptInfo.setScriptId(IdUtils.fastUUID());
|
||||
return scriptInfoMapper.insertScriptInfo(scriptInfo);
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增患者管理任务执行记录
|
||||
|
||||
@ -39,17 +39,19 @@ import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteAuditVo;
|
||||
import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteInfoVo;
|
||||
import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteVO;
|
||||
import com.xinelu.manage.vo.specialdiseaseroutepackage.SpecialDiseaseRoutePackageVO;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import javax.annotation.Resource;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 专病路径信息Service业务层处理
|
||||
*
|
||||
@ -116,6 +118,11 @@ public class SpecialDiseaseRouteServiceImpl implements ISpecialDiseaseRouteServi
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public AjaxResult insertSpecialDiseaseRoute(SpecialDiseaseRouteVO specialDiseaseRoute) {
|
||||
//判断名称重复
|
||||
List<SpecialDiseaseRoute> specialDiseaseRoutes = specialDiseaseRouteMapper.selectCountByName(specialDiseaseRoute.getDepartmentId(), specialDiseaseRoute.getRouteName());
|
||||
if (CollectionUtils.isNotEmpty(specialDiseaseRoutes)) {
|
||||
return AjaxResult.error("路径名称 '" + specialDiseaseRoute.getRouteName() + "' 重复!");
|
||||
}
|
||||
specialDiseaseRoute.setCreateTime(LocalDateTime.now());
|
||||
specialDiseaseRoute.setCreateBy(SecurityUtils.getUsername());
|
||||
specialDiseaseRoute.setRouteCode(Constants.ROUTE_CODE + generateSystemCodeUtil.generateSystemCode(Constants.ROUTE_CODE));
|
||||
@ -152,6 +159,14 @@ public class SpecialDiseaseRouteServiceImpl implements ISpecialDiseaseRouteServi
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public AjaxResult updateSpecialDiseaseRoute(SpecialDiseaseRouteVO specialDiseaseRoute) {
|
||||
//判断名称重复
|
||||
List<SpecialDiseaseRoute> specialDiseaseRoutes = specialDiseaseRouteMapper.selectCountByName(specialDiseaseRoute.getDepartmentId(), specialDiseaseRoute.getRouteName());
|
||||
if (CollectionUtils.isNotEmpty(specialDiseaseRoutes)){
|
||||
List<SpecialDiseaseRoute> collect = specialDiseaseRoutes.stream().filter(Objects::nonNull).filter(item -> Objects.nonNull(item.getId()) && !specialDiseaseRoute.getId().equals(item.getId())).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(collect)){
|
||||
return AjaxResult.error("路径名称 '" + specialDiseaseRoute.getRouteName() + "' 重复!");
|
||||
}
|
||||
}
|
||||
int deleteRoutePackageCount = specialDiseaseRoutePackageMapper.deleteSpecialDiseaseRoutePackageByRouteId(specialDiseaseRoute.getId());
|
||||
if (deleteRoutePackageCount < 0) {
|
||||
return AjaxResult.error("修改专病路径信息失败,请联系管理员!");
|
||||
|
||||
@ -82,7 +82,6 @@ public class WechatTemplateServiceImpl implements IWechatTemplateService {
|
||||
// 将wechatTemplateTaskDTO对象的属性复制到wechatTemplate对象
|
||||
WechatTemplate wechatTemplate = new WechatTemplate();
|
||||
BeanUtils.copyProperties(wechatTemplateTaskDTO, wechatTemplate);
|
||||
wechatTemplate.setTemplateId(IdUtils.fastUUID());
|
||||
// 插入wechatTemplate记录并检查结果
|
||||
if (wechatTemplateMapper.insertWechatTemplate(wechatTemplate) <= 0) {
|
||||
throw new ServiceException("新增微信模板失败");
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -596,4 +596,12 @@
|
||||
from special_disease_node
|
||||
where route_id = #{routeId}
|
||||
</select>
|
||||
|
||||
<select id="selectCountByName"
|
||||
resultType="com.xinelu.manage.domain.specialdiseaseroute.SpecialDiseaseRoute">
|
||||
<include refid="selectSpecialDiseaseRouteVo"/>
|
||||
where
|
||||
department_id =#{departmentId}
|
||||
and route_name =#{routeName}
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue
Block a user