From f06a6db9f40d9370e6e05a5ec20b724437cc879c Mon Sep 17 00:00:00 2001 From: zhangheng <3226558941@qq.com> Date: Thu, 9 Jan 2025 15:18:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=97=E5=85=B8=E5=9B=9E=E6=98=BE=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/DepartmentServiceImpl.java | 22 +++++++++++++++--- .../impl/LabelFieldInfoServiceImpl.java | 14 ++++++++++- .../SignPatientManageRouteServiceImpl.java | 23 ++++++++++++++++--- .../impl/TaskPartitionDictServiceImpl.java | 16 ++++++++++++- .../vo/manualfollowup/ManualFollowUpVO.java | 4 ++++ 5 files changed, 71 insertions(+), 8 deletions(-) diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/department/impl/DepartmentServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/department/impl/DepartmentServiceImpl.java index 2576a6c1..5b6b1d7c 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/department/impl/DepartmentServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/department/impl/DepartmentServiceImpl.java @@ -2,12 +2,12 @@ package com.xinelu.manage.service.department.impl; import com.xinelu.common.annotation.DataScope; import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.core.domain.entity.SysDictData; import com.xinelu.common.core.domain.entity.SysUser; import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.SecurityUtils; import com.xinelu.common.utils.StringUtils; import com.xinelu.common.utils.bean.BeanUtils; -import com.xinelu.common.utils.codes.GenerateSystemCodeUtil; import com.xinelu.common.utils.regex.RegexUtil; import com.xinelu.manage.domain.agency.Agency; import com.xinelu.manage.domain.department.Department; @@ -18,6 +18,7 @@ import com.xinelu.manage.service.department.IDepartmentService; import com.xinelu.manage.vo.department.DepartmentBaseVo; import com.xinelu.manage.vo.department.DepartmentListVO; import com.xinelu.manage.vo.department.DepartmentVO; +import com.xinelu.system.mapper.SysDictDataMapper; import com.xinelu.system.mapper.SysUserMapper; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.BooleanUtils; @@ -50,7 +51,7 @@ public class DepartmentServiceImpl implements IDepartmentService { @Resource private AgencyMapper agencyMapper; @Resource - private GenerateSystemCodeUtil generateSystemCodeUtil; + private SysDictDataMapper sysDictDataMapper; /** * 查询科室信息 @@ -71,7 +72,22 @@ public class DepartmentServiceImpl implements IDepartmentService { */ @Override public List selectDepartmentList(Department department) { - return departmentMapper.selectDepartmentList(department); + List departmentList = departmentMapper.selectDepartmentList(department); + List strings = new ArrayList<>(); + strings.add("provide_service_category"); + strings.add("department_type"); + List sysDictDataList = sysDictDataMapper.selectDictDataByTypeList(strings); + for (Department dataDepartment : departmentList) { + SysDictData departmentType = sysDictDataList.stream().filter(Objects::nonNull).filter(item -> item.getDictValue().equals(dataDepartment.getDepartmentType())).findFirst().orElse(new SysDictData()); + if (org.apache.commons.lang3.StringUtils.isNotBlank(departmentType.getDictLabel())){ + dataDepartment.setDepartmentType(departmentType.getDictLabel()); + } + SysDictData provideServiceCategory = sysDictDataList.stream().filter(Objects::nonNull).filter(item -> item.getDictValue().equals(dataDepartment.getProvideServiceCategory())).findFirst().orElse(new SysDictData()); + if (org.apache.commons.lang3.StringUtils.isNotBlank(provideServiceCategory.getDictLabel())){ + dataDepartment.setProvideServiceCategory(provideServiceCategory.getDictLabel()); + } + } + return departmentList; } /** diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/labelfieldinfo/impl/LabelFieldInfoServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/labelfieldinfo/impl/LabelFieldInfoServiceImpl.java index 83718c42..7b1476f6 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/labelfieldinfo/impl/LabelFieldInfoServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/labelfieldinfo/impl/LabelFieldInfoServiceImpl.java @@ -1,6 +1,7 @@ package com.xinelu.manage.service.labelfieldinfo.impl; import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.core.domain.entity.SysDictData; import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.SecurityUtils; import com.xinelu.manage.domain.labelfieldinfo.LabelFieldInfo; @@ -13,6 +14,7 @@ import com.xinelu.manage.service.labelfieldinfo.ILabelFieldInfoService; import com.xinelu.manage.vo.labelfieldinfo.LabelFieldTreeVO; import com.xinelu.manage.vo.labelfieldinfo.LabelFieldVO; import com.xinelu.manage.vo.tasktypedict.TaskTypeDictVO; +import com.xinelu.system.mapper.SysDictDataMapper; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; @@ -40,6 +42,8 @@ public class LabelFieldInfoServiceImpl implements ILabelFieldInfoService { private TaskTypeDictMapper taskTypeDictMapper; @Resource private TaskPartitionDictMapper taskPartitionDictMapper; + @Resource + private SysDictDataMapper sysDictDataMapper; /** * 查询标签字段信息 @@ -60,7 +64,15 @@ public class LabelFieldInfoServiceImpl implements ILabelFieldInfoService { */ @Override public List selectLabelFieldInfoList(LabelFieldInfo labelFieldInfo) { - return labelFieldInfoMapper.selectLabelFieldInfoList(labelFieldInfo); + List labelFieldInfoList = labelFieldInfoMapper.selectLabelFieldInfoList(labelFieldInfo); + List sysDictDataList = sysDictDataMapper.selectDictDataByType("field_type"); + for (LabelFieldInfo fieldInfo : labelFieldInfoList) { + SysDictData sysDictData = sysDictDataList.stream().filter(Objects::nonNull).filter(item -> item.getDictValue().equals(fieldInfo.getFieldType())).findFirst().orElse(new SysDictData()); + if (StringUtils.isNotBlank(sysDictData.getDictLabel())) { + fieldInfo.setFieldType(sysDictData.getDictLabel()); + } + } + return labelFieldInfoList; } /** 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 bf1fdcba..37bad247 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 @@ -12,6 +12,7 @@ import com.xinelu.common.annotation.DataScope; import com.xinelu.common.config.AliYunSmsTwoConfig; import com.xinelu.common.constant.*; import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.core.domain.entity.SysDictData; import com.xinelu.common.enums.*; import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.AgeUtil; @@ -31,6 +32,7 @@ import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute; import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode; import com.xinelu.manage.domain.signpatientrecord.SignPatientRecord; import com.xinelu.manage.domain.signroutetriggercondition.SignRouteTriggerCondition; +import com.xinelu.manage.domain.taskpartitiondict.TaskPartitionDict; import com.xinelu.manage.dto.aiob.ActualTimeTaskDto; import com.xinelu.manage.dto.manualfollowup.ManualFollowUpDTO; import com.xinelu.manage.dto.patientinfo.PatientInfoDto; @@ -80,6 +82,7 @@ import com.xinelu.manage.vo.specialdiseasenode.RouteTaskAuditVo; import com.xinelu.manage.vo.specialdiseasenode.SpecialDiseaseNodeAuditVo; import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseChildRouteAuditVo; import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteAuditVo; +import com.xinelu.system.mapper.SysDictDataMapper; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.ObjectUtils; @@ -147,15 +150,14 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout private ShortMessageSendRecordMapper shortMessageSendRecordMapper; @Resource private IPatientTaskStatisticsService patientTaskStatisticsService; - @Resource private ILabelFieldContentService labelFieldContentService; - - @Resource private PatientInfoMapper patientInfoMapper; @Resource private IAIOBService aiobService; + @Resource + private SysDictDataMapper sysDictDataMapper; @Value("${aiob.callBackUrl}") private String callBackUrl; @@ -383,6 +385,21 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout } //1、查询 List manualFollowUpVOS = signPatientManageRouteMapper.selectManualFollowUpList(manualFollowUpDTO); + //字典名称匹配 + ArrayList strings = new ArrayList<>(); + strings.add("task_node_type"); + strings.add("route_name"); + List sysDictDataList = sysDictDataMapper.selectDictDataByTypeList(strings); + for (ManualFollowUpVO manualFollowUpVO : manualFollowUpVOS) { + SysDictData taskNodeType = sysDictDataList.stream().filter(Objects::nonNull).filter(item -> item.getDictValue().equals(manualFollowUpVO.getTaskNodeType())).findFirst().orElse(new SysDictData()); + if (StringUtils.isNotBlank(taskNodeType.getDictLabel())){ + manualFollowUpVO.setTaskNodeTypeName(taskNodeType.getDictLabel()); + } + SysDictData routeNodeName = sysDictDataList.stream().filter(Objects::nonNull).filter(item -> item.getDictValue().equals(manualFollowUpVO.getRouteNodeName())).findFirst().orElse(new SysDictData()); + if (StringUtils.isNotBlank(routeNodeName.getDictLabel())){ + manualFollowUpVO.setRouteNode(routeNodeName.getDictLabel()); + } + } //2、1如果是查询已执行的任务,直接返回查询结果 if (manualFollowUpDTO.getNodeExecuteStatus().equals(NodeExecuteStatusEnum.EXECUTED.getInfo())) { return manualFollowUpVOS; diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/taskpartitiondict/impl/TaskPartitionDictServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/taskpartitiondict/impl/TaskPartitionDictServiceImpl.java index eb9ec580..326b6950 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/taskpartitiondict/impl/TaskPartitionDictServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/taskpartitiondict/impl/TaskPartitionDictServiceImpl.java @@ -1,16 +1,20 @@ package com.xinelu.manage.service.taskpartitiondict.impl; import com.xinelu.common.constant.Constants; +import com.xinelu.common.core.domain.entity.SysDictData; import com.xinelu.common.utils.SecurityUtils; import com.xinelu.common.utils.codes.GenerateSystemCodeUtil; import com.xinelu.manage.domain.taskpartitiondict.TaskPartitionDict; import com.xinelu.manage.mapper.taskpartitiondict.TaskPartitionDictMapper; import com.xinelu.manage.service.taskpartitiondict.ITaskPartitionDictService; +import com.xinelu.system.mapper.SysDictDataMapper; +import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.time.LocalDateTime; import java.util.List; +import java.util.Objects; /** @@ -25,6 +29,8 @@ public class TaskPartitionDictServiceImpl implements ITaskPartitionDictService { private TaskPartitionDictMapper taskPartitionDictMapper; @Resource private GenerateSystemCodeUtil generateSystemCodeUtil; + @Resource + private SysDictDataMapper sysDictDataMapper; /** * 查询任务细分字典 @@ -45,7 +51,15 @@ public class TaskPartitionDictServiceImpl implements ITaskPartitionDictService { */ @Override public List selectTaskPartitionDictList(TaskPartitionDict taskPartitionDict) { - return taskPartitionDictMapper.selectTaskPartitionDictList(taskPartitionDict); + List taskPartitionDicts = taskPartitionDictMapper.selectTaskPartitionDictList(taskPartitionDict); + List sysDictDataList = sysDictDataMapper.selectDictDataByType("task_node_type"); + for (TaskPartitionDict partitionDict : taskPartitionDicts) { + SysDictData sysDictData = sysDictDataList.stream().filter(Objects::nonNull).filter(item -> item.getDictValue().equals(partitionDict.getTaskNodeType())).findFirst().orElse(new SysDictData()); + if (StringUtils.isNotBlank(sysDictData.getDictLabel())){ + partitionDict.setTaskNodeType(sysDictData.getDictLabel()); + } + } + return taskPartitionDicts; } /** 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 7dd71617..d7ea90f8 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 @@ -37,6 +37,8 @@ public class ManualFollowUpVO { @ApiModelProperty(value = "管理路径节点名称,出院后:AFTER_DISCHARGE,入院后:AFTER_ADMISSION,就诊后:AFTER_CONSULTATION,就诊/出院后:AFTER_VISIT_DISCHARGE,术前:PREOPERATIVE,术后:POSTOPERATIVE") private String routeNodeName; + private String routeNode; + @ApiModelProperty(value = "管理路径节点时间,时间单位为:天") private Integer routeNodeDay; @@ -146,6 +148,8 @@ public class ManualFollowUpVO { @ApiModelProperty(value = "任务节点类型,电话外呼:PHONE_OUTBOUND,问卷量表:QUESTIONNAIRE_SCALE,宣教文章:PROPAGANDA_ARTICLE,文字提醒:TEXT_REMIND") private String taskNodeType; + private String taskNodeTypeName; + /** * AI:自动 或 COMMON:手动 */