From 3a13af1495cedb302968913e549be6008153544a Mon Sep 17 00:00:00 2001 From: zhangheng <3226558941@qq.com> Date: Wed, 7 Aug 2024 09:14:47 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E7=9F=A5=E8=AF=86=E5=BA=93=E8=AF=9D?= =?UTF-8?q?=E6=9C=AF=E5=BE=AE=E4=BF=A1=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manage/service/scriptInfo/impl/ScriptInfoServiceImpl.java | 1 - .../service/wechattemplate/impl/WechatTemplateServiceImpl.java | 1 - 2 files changed, 2 deletions(-) diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/scriptInfo/impl/ScriptInfoServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/scriptInfo/impl/ScriptInfoServiceImpl.java index a8a1f0a0..8b9d18ee 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/scriptInfo/impl/ScriptInfoServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/scriptInfo/impl/ScriptInfoServiceImpl.java @@ -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); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/wechattemplate/impl/WechatTemplateServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/wechattemplate/impl/WechatTemplateServiceImpl.java index 4c4f6888..e946abd6 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/wechattemplate/impl/WechatTemplateServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/wechattemplate/impl/WechatTemplateServiceImpl.java @@ -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("新增微信模板失败"); 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 2/3] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E4=BB=A3=E5=8A=9E?= =?UTF-8?q?=E4=BF=AE=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; } From 30eaf85fd740956029f39923d838962d5a61dc9c Mon Sep 17 00:00:00 2001 From: zhangheng <3226558941@qq.com> Date: Thu, 8 Aug 2024 17:21:47 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=B8=93=E7=97=85=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SpecialDiseaseRouteMapper.java | 12 ++++++++- .../impl/SpecialDiseaseRouteServiceImpl.java | 25 +++++++++++++++---- .../SpecialDiseaseRouteMapper.xml | 8 ++++++ 3 files changed, 39 insertions(+), 6 deletions(-) diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/specialdiseaseroute/SpecialDiseaseRouteMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/specialdiseaseroute/SpecialDiseaseRouteMapper.java index 78fa8089..18c22500 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/specialdiseaseroute/SpecialDiseaseRouteMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/specialdiseaseroute/SpecialDiseaseRouteMapper.java @@ -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 selectRouteCheckStatus(Long routeId); + + /** + * 根据科室及路径名称查询信息 + * + * @param departmentId + * @param routeName + * @return + */ + List selectCountByName(@Param("departmentId") Long departmentId, @Param("routeName") String routeName); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseaseroute/impl/SpecialDiseaseRouteServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseaseroute/impl/SpecialDiseaseRouteServiceImpl.java index ba525eb4..f14a70c6 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseaseroute/impl/SpecialDiseaseRouteServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseaseroute/impl/SpecialDiseaseRouteServiceImpl.java @@ -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 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 specialDiseaseRoutes = specialDiseaseRouteMapper.selectCountByName(specialDiseaseRoute.getDepartmentId(), specialDiseaseRoute.getRouteName()); + if (CollectionUtils.isNotEmpty(specialDiseaseRoutes)){ + List 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("修改专病路径信息失败,请联系管理员!"); diff --git a/postdischarge-manage/src/main/resources/mapper/manage/specialdiseaseroute/SpecialDiseaseRouteMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/specialdiseaseroute/SpecialDiseaseRouteMapper.xml index 83f6c7fc..0f0ffa07 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/specialdiseaseroute/SpecialDiseaseRouteMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/specialdiseaseroute/SpecialDiseaseRouteMapper.xml @@ -596,4 +596,12 @@ from special_disease_node where route_id = #{routeId} + + \ No newline at end of file