From 551e59590978d188f2e142a0ef53015a7dad554e Mon Sep 17 00:00:00 2001 From: zhangheng <3226558941@qq.com> Date: Tue, 25 Jun 2024 10:31:02 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=A0=87=E7=AD=BE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/enums/PortraitStatusEnum.java | 29 +++++ .../LabelFieldContentController.java | 20 +++- .../LabelFieldContentMapper.java | 11 ++ .../labelfieldinfo/LabelFieldInfoMapper.java | 2 +- .../SignPatientManageRouteNodeMapper.java | 45 +++++--- .../TaskPartitionDictMapper.java | 9 +- .../ILabelFieldContentService.java | 15 ++- .../impl/LabelFieldContentServiceImpl.java | 109 ++++++++++++++---- .../vo/labelfieldcontent/GroupingValue.java | 81 +++++++++++++ .../vo/labelfieldcontent/LabelField.java | 11 ++ .../LabelFieldContentMapper.xml | 38 ++++++ .../labelfieldinfo/LabelFieldInfoMapper.xml | 7 +- .../SignPatientManageRouteNodeMapper.xml | 66 +++++++++++ .../SpecialDiseaseNodeMapper.xml | 42 +++---- .../TaskPartitionDictMapper.xml | 6 + 15 files changed, 424 insertions(+), 67 deletions(-) create mode 100644 postdischarge-common/src/main/java/com/xinelu/common/enums/PortraitStatusEnum.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/vo/labelfieldcontent/GroupingValue.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/vo/labelfieldcontent/LabelField.java diff --git a/postdischarge-common/src/main/java/com/xinelu/common/enums/PortraitStatusEnum.java b/postdischarge-common/src/main/java/com/xinelu/common/enums/PortraitStatusEnum.java new file mode 100644 index 00000000..5072f3b1 --- /dev/null +++ b/postdischarge-common/src/main/java/com/xinelu/common/enums/PortraitStatusEnum.java @@ -0,0 +1,29 @@ +package com.xinelu.common.enums; + +import lombok.Getter; + +/** + * @Description 画像状态 + * @Author zh + * @Date 2024-06-24 + */ +@Getter +public enum PortraitStatusEnum { + + /** + * 已归档 + */ + FIELD("FIELD"), + + /** + * 在用 + */ + INUSE("INUSE"), + ; + + final private String info; + + PortraitStatusEnum(String info) { + this.info = info; + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/labelfieldcontent/LabelFieldContentController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/labelfieldcontent/LabelFieldContentController.java index e1395f73..f8abf7a0 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/labelfieldcontent/LabelFieldContentController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/labelfieldcontent/LabelFieldContentController.java @@ -9,6 +9,8 @@ import com.xinelu.common.utils.poi.ExcelUtil; import com.xinelu.manage.domain.labelfieldcontent.LabelFieldContent; import com.xinelu.manage.dto.labelfieldcontent.LabelFieldContentAddDTO; import com.xinelu.manage.service.labelfieldcontent.ILabelFieldContentService; +import com.xinelu.manage.vo.labelfieldcontent.GroupingValue; +import com.xinelu.manage.vo.labelfieldcontent.LabelField; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; @@ -94,7 +96,21 @@ public class LabelFieldContentController extends BaseController { * 分组信息 */ @GetMapping("/groupingContent") - public AjaxResult groupingContent(String taskPartitionDictName) { - return labelFieldContentService.groupingContent(taskPartitionDictName); + public AjaxResult groupingContent(Long patientId) { + return labelFieldContentService.groupingContent(patientId); } + + /** + * 画像查询 + */ + @GetMapping("/groupingValue") + public List groupingValue(Long taskPartitionDictId, Long patientId, Long signPatientManageRouteNodeId) { + return labelFieldContentService.groupingValue(taskPartitionDictId, patientId, signPatientManageRouteNodeId); + } + +// @PostMapping("/insertLabelField") +// public AjaxResult insertLabelField(@RequestBody LabelField labelField) { +// return labelFieldContentService.insertLabelField(labelField); +// +// } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/labelfieldcontent/LabelFieldContentMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/labelfieldcontent/LabelFieldContentMapper.java index 1024a50a..acd70a3f 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/labelfieldcontent/LabelFieldContentMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/labelfieldcontent/LabelFieldContentMapper.java @@ -1,6 +1,7 @@ package com.xinelu.manage.mapper.labelfieldcontent; import com.xinelu.manage.domain.labelfieldcontent.LabelFieldContent; +import com.xinelu.manage.vo.labelfieldcontent.GroupingValue; import com.xinelu.manage.vo.labelfieldcontent.LabelFieldContentVO; import org.apache.ibatis.annotations.Param; @@ -78,4 +79,14 @@ public interface LabelFieldContentMapper { * @return LabelFieldContentVO */ List selectLabelFieldContent(@Param("labelFieldIds") List labelFieldIds); + + /** + * 画像查询 + * + * @param taskPartitionDictId 细分id + * @param patientId 患者id + * @param portraitStatus 状态 + * @return GroupingValue + */ + List groupingValue(@Param("taskPartitionDictId") Long taskPartitionDictId, @Param("patientId") Long patientId, @Param("portraitStatus") String portraitStatus); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/labelfieldinfo/LabelFieldInfoMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/labelfieldinfo/LabelFieldInfoMapper.java index 697df589..666d2be9 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/labelfieldinfo/LabelFieldInfoMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/labelfieldinfo/LabelFieldInfoMapper.java @@ -80,7 +80,7 @@ public interface LabelFieldInfoMapper { int countByFieldNameExcludingId(@Param("id") Long id, @Param("fieldType") String fieldType, @Param("fieldName") String fieldName); /** - * 分组信息 + * 分组信息 (暂不使用) * * @param taskPartitionDictName 分组名 * @return LabelFieldInfo diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.java index 2fdd41f7..9fa6504b 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.java @@ -5,9 +5,10 @@ import com.xinelu.manage.dto.signpatientmanageroutenode.PatientTaskDto; import com.xinelu.manage.dto.signpatientmanageroutenode.SignPatientManageRouteNodeDto; import com.xinelu.manage.vo.signpatientmanageroutenode.PatientManageNodeListVo; import com.xinelu.manage.vo.signpatientmanageroutenode.PatientTaskVo; -import java.util.List; import org.apache.ibatis.annotations.Param; +import java.util.List; + /** * 签约患者管理任务路径节点Mapper接口 * @@ -23,12 +24,13 @@ public interface SignPatientManageRouteNodeMapper { */ SignPatientManageRouteNode selectSignPatientManageRouteNodeById(Long id); - /** - * 查询患者管理路径节点 - * @param patientTaskDto 任务查询传输对象 - * @return 患者管理任务路径节点 - */ - List getNodeList(PatientTaskDto patientTaskDto); + /** + * 查询患者管理路径节点 + * + * @param patientTaskDto 任务查询传输对象 + * @return 患者管理任务路径节点 + */ + List getNodeList(PatientTaskDto patientTaskDto); /** * 查询签约患者管理任务路径节点列表 @@ -38,7 +40,8 @@ public interface SignPatientManageRouteNodeMapper { */ public List selectSignPatientManageRouteNodeList(SignPatientManageRouteNodeDto signPatientManageRouteNodeDto); - List selectPatientManageNodeList(SignPatientManageRouteNodeDto signPatientManageRouteNodeDto); + List selectPatientManageNodeList(SignPatientManageRouteNodeDto signPatientManageRouteNodeDto); + /** * 新增签约患者管理任务路径节点 * @@ -47,7 +50,7 @@ public interface SignPatientManageRouteNodeMapper { */ public int insertSignPatientManageRouteNode(SignPatientManageRouteNode signPatientManageRouteNode); - int insertBatch(@Param("nodeList") List nodeList); + int insertBatch(@Param("nodeList") List nodeList); /** * 修改签约患者管理任务路径节点 @@ -81,16 +84,26 @@ public interface SignPatientManageRouteNodeMapper { */ int deleteRouteNodeByManageRouteId(Long manageRouteId); - /** - * 查询患者任务列表 - * @param patientTaskDto 患者任务列表查询传输对象 - * @return 患者任务列表 - */ - List selectPatientTaskList(PatientTaskDto patientTaskDto); + /** + * 查询患者任务列表 + * + * @param patientTaskDto 患者任务列表查询传输对象 + * @return 患者任务列表 + */ + List selectPatientTaskList(PatientTaskDto patientTaskDto); - List selectManageRouteByResidentId(@Param("residentId") Long residentId,@Param("nodeExecuteStatus") String nodeExecuteStatus); + List selectManageRouteByResidentId(@Param("residentId") Long residentId, @Param("nodeExecuteStatus") String nodeExecuteStatus); String selectNodeContent(Long manageRouteNodeId); int updateMessageStatus(SignPatientManageRouteNode signPatientManageRouteNode); + + /** + * (暂不使用) + * + * @param patientId a + * @param taskPartitionDictId a + * @return SignPatientManageRouteNode + */ + SignPatientManageRouteNode selectNodeByPatientId(Long patientId, Long taskPartitionDictId); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/taskpartitiondict/TaskPartitionDictMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/taskpartitiondict/TaskPartitionDictMapper.java index 0d69a532..1936761b 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/taskpartitiondict/TaskPartitionDictMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/taskpartitiondict/TaskPartitionDictMapper.java @@ -1,6 +1,5 @@ package com.xinelu.manage.mapper.taskpartitiondict; -import com.xinelu.manage.domain.labelfieldinfo.LabelFieldInfo; import com.xinelu.manage.domain.taskpartitiondict.TaskPartitionDict; import java.util.List; @@ -60,4 +59,12 @@ public interface TaskPartitionDictMapper { * @return 结果 */ int deleteTaskPartitionDictByIds(Long[] ids); + + /** + * 查询任务细分字典 + * + * @param code 任务细分字典主键 + * @return 任务细分字典 + */ + TaskPartitionDict selectTaskPartitionDictByCode(String code); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/labelfieldcontent/ILabelFieldContentService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/labelfieldcontent/ILabelFieldContentService.java index 6d3cc33a..b1f74b15 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/labelfieldcontent/ILabelFieldContentService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/labelfieldcontent/ILabelFieldContentService.java @@ -3,6 +3,7 @@ package com.xinelu.manage.service.labelfieldcontent; import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.manage.domain.labelfieldcontent.LabelFieldContent; import com.xinelu.manage.dto.labelfieldcontent.LabelFieldContentAddDTO; +import com.xinelu.manage.vo.labelfieldcontent.GroupingValue; import java.util.List; @@ -69,8 +70,18 @@ public interface ILabelFieldContentService { /** * 分组信息 * - * @param taskPartitionDictName 分组名 + * @param patientId 患者信息 * @return LabelFieldInfo */ - AjaxResult groupingContent(String taskPartitionDictName); + AjaxResult groupingContent(Long patientId); + + /** + * 画像查询 + * + * @param taskPartitionDictId 细分id + * @param patientId 患者id + * @param signPatientManageRouteNodeId 节点id + * @return GroupingValue + */ + List groupingValue(Long taskPartitionDictId, Long patientId, Long signPatientManageRouteNodeId); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/labelfieldcontent/impl/LabelFieldContentServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/labelfieldcontent/impl/LabelFieldContentServiceImpl.java index 62503514..8d3af5b9 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/labelfieldcontent/impl/LabelFieldContentServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/labelfieldcontent/impl/LabelFieldContentServiceImpl.java @@ -1,19 +1,33 @@ package com.xinelu.manage.service.labelfieldcontent.impl; +import com.xinelu.common.constant.TaskCreateTypeConstant; import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.SecurityUtils; import com.xinelu.common.utils.bean.BeanUtils; import com.xinelu.manage.domain.labelfieldcontent.LabelFieldContent; -import com.xinelu.manage.domain.labelfieldinfo.LabelFieldInfo; +import com.xinelu.manage.domain.patientinfo.PatientInfo; +import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute; +import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode; +import com.xinelu.manage.domain.taskpartitiondict.TaskPartitionDict; import com.xinelu.manage.dto.labelfieldcontent.LabelFieldContentAddDTO; import com.xinelu.manage.dto.labelfieldcontent.LabelFieldContentDTO; import com.xinelu.manage.mapper.labelfieldcontent.LabelFieldContentMapper; -import com.xinelu.manage.mapper.labelfieldinfo.LabelFieldInfoMapper; +import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper; +import com.xinelu.manage.mapper.signpatientmanageroute.SignPatientManageRouteMapper; +import com.xinelu.manage.mapper.signpatientmanageroutenode.SignPatientManageRouteNodeMapper; +import com.xinelu.manage.mapper.specialdiseasenode.SpecialDiseaseNodeMapper; +import com.xinelu.manage.mapper.taskpartitiondict.TaskPartitionDictMapper; import com.xinelu.manage.service.labelfieldcontent.ILabelFieldContentService; +import com.xinelu.manage.vo.labelfieldcontent.GroupingValue; +import com.xinelu.manage.vo.specialdiseasenode.PatientSpecialDiseaseNodeVo; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; +import org.jsoup.Jsoup; +import org.jsoup.nodes.Document; +import org.jsoup.nodes.Element; +import org.jsoup.select.Elements; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -34,7 +48,15 @@ public class LabelFieldContentServiceImpl implements ILabelFieldContentService { @Resource private LabelFieldContentMapper labelFieldContentMapper; @Resource - private LabelFieldInfoMapper labelFieldInfoMapper; + private SignPatientManageRouteMapper signPatientManageRouteMapper; + @Resource + private SignPatientManageRouteNodeMapper signPatientManageRouteNodeMapper; + @Resource + private SpecialDiseaseNodeMapper specialDiseaseNodeMapper; + @Resource + private PatientInfoMapper patientInfoMapper; + @Resource + private TaskPartitionDictMapper taskPartitionDictMapper; /** * 查询标签字段内容信息 @@ -131,7 +153,6 @@ public class LabelFieldContentServiceImpl implements ILabelFieldContentService { BeanUtils.copyProperties(contentDTO, labelFieldContent); labelFieldContent.setFieldId(labelFieldContentAddDTO.getFieldId()); labelFieldContent.setFieldName(labelFieldContentAddDTO.getFieldName()); - //labelFieldContent.setContentCode(Constants.CONTENT_ENCODING + systemCodeUtil.generateDepartCode(Constants.CONTENT_ENCODING)); labelFieldContent.setCreateBy(SecurityUtils.getUsername()); labelFieldContent.setCreateTime(LocalDateTime.now()); if (labelFieldContentMapper.insertLabelFieldContent(labelFieldContent) <= 0) { @@ -144,27 +165,75 @@ public class LabelFieldContentServiceImpl implements ILabelFieldContentService { /** * 分组信息 * - * @param taskPartitionDictName 分组名 + * @param patientId 患者信息 * @return LabelFieldInfo */ @Override - public AjaxResult groupingContent(String taskPartitionDictName) { - ArrayList labelFieldInfos = new ArrayList<>(); - if (StringUtils.isBlank(taskPartitionDictName)) { - LabelFieldInfo labelFieldOne = new LabelFieldInfo(); - labelFieldOne.setTaskPartitionDictId(0L); - labelFieldOne.setTaskPartitionDictName("全部"); - labelFieldInfos.add(labelFieldOne); + public AjaxResult groupingContent(Long patientId) { + //创建全部选项 TaskPartitionDictId =0为全部 + List patientSpecialDiseaseNode = new ArrayList<>(); + PatientSpecialDiseaseNodeVo specialDiseaseNode = new PatientSpecialDiseaseNodeVo(); + specialDiseaseNode.setTaskPartitionDictId(0L); + specialDiseaseNode.setTaskPartitionDictName("全部"); + patientSpecialDiseaseNode.add(specialDiseaseNode); + // 查询最新一次签约记录 + PatientInfo patientInfo = patientInfoMapper.selectPatientInfoById(patientId); + if (ObjectUtils.isEmpty(patientInfo)) { + throw new ServiceException("请选择患者!"); } - List labelFieldInfoList = labelFieldInfoMapper.taskPartitionDictIdList(taskPartitionDictName); - if (CollectionUtils.isNotEmpty(labelFieldInfoList)) { - labelFieldInfos.addAll(labelFieldInfoList); + SignPatientManageRoute routeQuery = new SignPatientManageRoute(); + routeQuery.setSignPatientRecordId(patientInfo.getSignPatientRecordId()); + routeQuery.setTaskCreateType(TaskCreateTypeConstant.MANUAL_MATCHE); + List manageRouteList = signPatientManageRouteMapper.selectSignPatientManageRouteList(routeQuery); + if (CollectionUtils.isEmpty(manageRouteList)) { + throw new ServiceException("未找到签约管理路径"); } - if (StringUtils.isBlank(taskPartitionDictName)) { - LabelFieldInfo labelFieldInfo = new LabelFieldInfo(); - labelFieldInfo.setTaskPartitionDictName("未分组"); - labelFieldInfos.add(labelFieldInfo); + // 根据专病路径查询专病节点信息 + List patientSpecialDiseaseNodeVos = specialDiseaseNodeMapper.selectRouteNodeByRouteId(manageRouteList.get(0).getRouteId()); + if (CollectionUtils.isNotEmpty(patientSpecialDiseaseNodeVos)) { + patientSpecialDiseaseNode.addAll(patientSpecialDiseaseNodeVos); } - return AjaxResult.success(labelFieldInfos); + //未分组选项 TaskPartitionDictId =null 为未分组 + PatientSpecialDiseaseNodeVo patientSpecialDiseaseNodeVo = new PatientSpecialDiseaseNodeVo(); + patientSpecialDiseaseNodeVo.setTaskPartitionDictName("未分组"); + patientSpecialDiseaseNode.add(patientSpecialDiseaseNodeVo); + return AjaxResult.success(patientSpecialDiseaseNode); + } + + /** + * 画像查询 + * + * @param taskPartitionDictId 细分id + * @param patientId 患者id + * @param signPatientManageRouteNodeId 节点id + * @return GroupingValue + */ + @Override + public List groupingValue(Long taskPartitionDictId, Long patientId, Long signPatientManageRouteNodeId) { + if (ObjectUtils.isEmpty(patientId)) { + throw new ServiceException("请选择患者!"); + } + //根据patientId查询是否有已经维护的参数 + List labelFieldContents = labelFieldContentMapper.groupingValue(taskPartitionDictId, patientId, null); + if (CollectionUtils.isNotEmpty(labelFieldContents)) { + return labelFieldContents; + } + //未维护时提取 + SignPatientManageRouteNode specialDiseaseNode = signPatientManageRouteNodeMapper.selectSignPatientManageRouteNodeById(signPatientManageRouteNodeId); + TaskPartitionDict taskPartitionDict = taskPartitionDictMapper.selectTaskPartitionDictByCode(specialDiseaseNode.getTaskSubdivision()); + if (StringUtils.isNotBlank(specialDiseaseNode.getNodeContent()) && specialDiseaseNode.getNodeContent().contains("data-fieldMark")) { + Document document = Jsoup.parse(specialDiseaseNode.getNodeContent()); + // 需要提取的span + Elements spanList = document.select("span[data-w-e-type]"); + GroupingValue groupingValue = new GroupingValue(); + for (Element element : spanList) { + String filename = element.attr("data-filename"); + groupingValue.setFieldName(filename); + groupingValue.setTaskPartitionDictId(taskPartitionDict.getId()); + groupingValue.setTaskPartitionDictName(taskPartitionDict.getTaskPartitionName()); + labelFieldContents.add(groupingValue); + } + } + return labelFieldContents; } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/labelfieldcontent/GroupingValue.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/labelfieldcontent/GroupingValue.java new file mode 100644 index 00000000..e55b213c --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/labelfieldcontent/GroupingValue.java @@ -0,0 +1,81 @@ +package com.xinelu.manage.vo.labelfieldcontent; + +import com.xinelu.manage.domain.labelfieldinfo.LabelFieldInfo; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 标签字段内容信息对象 + * + * @author xinelu + * @date 2024-03-11 + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class GroupingValue extends LabelFieldInfo { + + /** + * LabelFieldInfoId + */ + private Long labelFieldInfoId; + + /** + * LabelFieldInfoId + */ + private Long labelFieldContentId; + + /** + * 画像标签和知识库字段表id + */ + @ApiModelProperty(value = "画像标签和知识库字段表id") + private Long fieldId; + + /** + * 字段名称 + */ + @ApiModelProperty(value = "字段名称") + private String fieldName; + + /** + * 字段编码,同param_key字段值 + */ + @ApiModelProperty(value = "字段编码,同param_key字段值") + private String fieldCode; + + /** + * 字段值,同param_value + */ + @ApiModelProperty(value = "字段值,同param_value") + private String fieldValue; + + /** + * 画像流水号,用年月日时分秒毫秒数字转成的字符串 + */ + @ApiModelProperty(value = "画像流水号,用年月日时分秒毫秒数字转成的字符串") + private String portraitSn; + + /** + * 患者ID + */ + @ApiModelProperty(value = "患者ID") + private Long patientId; + + /** + * 画像状态(FIELD:已归档,INUSE:在用) + */ + @ApiModelProperty(value = "画像状态") + private String portraitStatus; + + /** + * 内容排序 + */ + @ApiModelProperty(value = "内容排序") + private Integer contentSort; + + /** + * 内容备注信息 + */ + @ApiModelProperty(value = "内容备注信息") + private String contentRemark; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/labelfieldcontent/LabelField.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/labelfieldcontent/LabelField.java new file mode 100644 index 00000000..7b0dda15 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/labelfieldcontent/LabelField.java @@ -0,0 +1,11 @@ +package com.xinelu.manage.vo.labelfieldcontent; + +import lombok.Data; + +import java.util.List; + +@Data +public class LabelField { + + private List groupingValues; +} diff --git a/postdischarge-manage/src/main/resources/mapper/manage/labelfieldcontent/LabelFieldContentMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/labelfieldcontent/LabelFieldContentMapper.xml index 116fb1a0..1d20999b 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/labelfieldcontent/LabelFieldContentMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/labelfieldcontent/LabelFieldContentMapper.xml @@ -231,4 +231,42 @@ + + \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/labelfieldinfo/LabelFieldInfoMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/labelfieldinfo/LabelFieldInfoMapper.xml index 09340315..d21e337a 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/labelfieldinfo/LabelFieldInfoMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/labelfieldinfo/LabelFieldInfoMapper.xml @@ -216,10 +216,9 @@ + select id, + manage_route_id, + manage_route_name, + route_node_id, + route_node_name, + route_node_day, + task_type, + task_status, + task_subdivision, + second_classify_describe, + execute_time, + phone_push_sign, + phone_id, + phone_template_id, + phone_template_name, + phone_node_content, + phone_redial_times, + phone_time_interval, + phone_message_remind, + phone_message_template_id, + phone_message_template_name, + question_info_id, + questionnaire_name, + questionnaire_content, + question_expiration_date, + propaganda_info_id, + propaganda_title, + propaganda_content, + message_push_sign, + message_template_id, + message_template_name, + message_preview, + message_node_content, + official_push_sign, + official_template_id, + official_template_name, + official_remind_content, + official_node_content, + applet_push_sign, + applet_template_id, + applet_template_name, + applet_remind_content, + applet_prompt_description, + applet_node_content, + follow_template_id, + follow_template_name, + follow_content, + route_check_status, + route_check_person, + route_check_date, + route_check_remark, + route_node_remark, + node_execute_status, + route_handle_remark, + route_handle_id, + route_handle_person, + route_link, + text_remind_content, + node_content, + message_status, + del_flag + from sign_patient_manage_route_node + \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/specialdiseasenode/SpecialDiseaseNodeMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/specialdiseasenode/SpecialDiseaseNodeMapper.xml index d6b7ab81..d0c56cbe 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/specialdiseasenode/SpecialDiseaseNodeMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/specialdiseasenode/SpecialDiseaseNodeMapper.xml @@ -856,27 +856,27 @@ + select sdr.id routeId, + sdr.route_name routeName, + sdn.id as routeNodeId, + sdn.route_node_name routeNodeName, + sdn.route_node_day routeNodeDay, + sdn.task_type, + sdn.task_subdivision, + sdn.route_check_status routeCheckStatus, + ttd.id taskTypeId, + ttd.task_type_name taskTypeName, + ttd.task_type_code taskTypeCode, + tpd.id taskPartitionDictId, + tpd.task_partition_name taskPartitionDictName, + tpd.task_partition_code taskPartitionCode + from special_disease_route sdr + left join special_disease_node sdn ON sdn.route_id = sdr.id + left join task_type_dict ttd ON ttd.task_type_code = sdn.task_type + left join task_partition_dict tpd on tpd.task_partition_code = sdn.task_subdivision + where sdr.id = #{specialDiseaseRouteId} + and sdn.route_check_status = 'AGREE' + + + where task_partition_code = #{code} + \ No newline at end of file From 757088e4e15b891cf2db06eb45d74b7837de382d Mon Sep 17 00:00:00 2001 From: zhangheng <3226558941@qq.com> Date: Tue, 25 Jun 2024 17:26:53 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=A0=87=E7=AD=BE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LabelFieldContentController.java | 17 +- .../labelfieldinfo/LabelFieldInfoMapper.java | 2 +- .../patientinfo/PatientAllInfoViewMapper.java | 7 + .../SignPatientManageRouteNodeMapper.java | 9 -- .../SpecialDiseaseNodeMapper.java | 6 + .../TaskPartitionDictMapper.java | 8 - .../ILabelFieldContentService.java | 13 +- .../impl/LabelFieldContentServiceImpl.java | 149 ++++++++++-------- .../patientinfo/PatientAllInfoViewMapper.xml | 49 ++++++ .../SignPatientManageRouteNodeMapper.xml | 66 -------- .../TaskPartitionDictMapper.xml | 6 - 11 files changed, 161 insertions(+), 171 deletions(-) diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/labelfieldcontent/LabelFieldContentController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/labelfieldcontent/LabelFieldContentController.java index f8abf7a0..8cc66db2 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/labelfieldcontent/LabelFieldContentController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/labelfieldcontent/LabelFieldContentController.java @@ -96,21 +96,20 @@ public class LabelFieldContentController extends BaseController { * 分组信息 */ @GetMapping("/groupingContent") - public AjaxResult groupingContent(Long patientId) { - return labelFieldContentService.groupingContent(patientId); + public AjaxResult groupingContent() { + return labelFieldContentService.groupingContent(); } /** * 画像查询 */ @GetMapping("/groupingValue") - public List groupingValue(Long taskPartitionDictId, Long patientId, Long signPatientManageRouteNodeId) { - return labelFieldContentService.groupingValue(taskPartitionDictId, patientId, signPatientManageRouteNodeId); + public List> groupingValue(Long taskPartitionDictId, Long patientId) { + return labelFieldContentService.groupingValue(taskPartitionDictId, patientId); } -// @PostMapping("/insertLabelField") -// public AjaxResult insertLabelField(@RequestBody LabelField labelField) { -// return labelFieldContentService.insertLabelField(labelField); -// -// } + @PostMapping("/insertLabelField") + public AjaxResult insertLabelField(@RequestBody LabelField labelField) { + return labelFieldContentService.insertLabelField(labelField); + } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/labelfieldinfo/LabelFieldInfoMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/labelfieldinfo/LabelFieldInfoMapper.java index 666d2be9..697df589 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/labelfieldinfo/LabelFieldInfoMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/labelfieldinfo/LabelFieldInfoMapper.java @@ -80,7 +80,7 @@ public interface LabelFieldInfoMapper { int countByFieldNameExcludingId(@Param("id") Long id, @Param("fieldType") String fieldType, @Param("fieldName") String fieldName); /** - * 分组信息 (暂不使用) + * 分组信息 * * @param taskPartitionDictName 分组名 * @return LabelFieldInfo diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/patientinfo/PatientAllInfoViewMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/patientinfo/PatientAllInfoViewMapper.java index 937481de..77fb24bb 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/patientinfo/PatientAllInfoViewMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/patientinfo/PatientAllInfoViewMapper.java @@ -27,4 +27,11 @@ public interface PatientAllInfoViewMapper { */ List selectPatientAllInfoViewList(PatientAllInfoView patientAllInfoView); + /** + * 查询患者全部信息视图对象 + * + * @param patientId 患者主键 + * @return 患者全部信息视图对象 + */ + List selectPatientAllInfoListViewByPatientId(Long patientId); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.java index 9fa6504b..a4db231f 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.java @@ -97,13 +97,4 @@ public interface SignPatientManageRouteNodeMapper { String selectNodeContent(Long manageRouteNodeId); int updateMessageStatus(SignPatientManageRouteNode signPatientManageRouteNode); - - /** - * (暂不使用) - * - * @param patientId a - * @param taskPartitionDictId a - * @return SignPatientManageRouteNode - */ - SignPatientManageRouteNode selectNodeByPatientId(Long patientId, Long taskPartitionDictId); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/specialdiseasenode/SpecialDiseaseNodeMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/specialdiseasenode/SpecialDiseaseNodeMapper.java index 94d29487..fd32557d 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/specialdiseasenode/SpecialDiseaseNodeMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/specialdiseasenode/SpecialDiseaseNodeMapper.java @@ -97,5 +97,11 @@ public interface SpecialDiseaseNodeMapper { List selectRouteNodeByRouteId(Long specialDiseaseRouteId); + /** + * 根据患者路径查询患者节点表 + * + * @param specialDiseaseRouteId 患者路径 + * @return Long + */ List selectSpecialDiseaseRouteIds(Long specialDiseaseRouteId); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/taskpartitiondict/TaskPartitionDictMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/taskpartitiondict/TaskPartitionDictMapper.java index 1936761b..413096b9 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/taskpartitiondict/TaskPartitionDictMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/taskpartitiondict/TaskPartitionDictMapper.java @@ -59,12 +59,4 @@ public interface TaskPartitionDictMapper { * @return 结果 */ int deleteTaskPartitionDictByIds(Long[] ids); - - /** - * 查询任务细分字典 - * - * @param code 任务细分字典主键 - * @return 任务细分字典 - */ - TaskPartitionDict selectTaskPartitionDictByCode(String code); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/labelfieldcontent/ILabelFieldContentService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/labelfieldcontent/ILabelFieldContentService.java index b1f74b15..ee5962e7 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/labelfieldcontent/ILabelFieldContentService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/labelfieldcontent/ILabelFieldContentService.java @@ -4,6 +4,7 @@ import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.manage.domain.labelfieldcontent.LabelFieldContent; import com.xinelu.manage.dto.labelfieldcontent.LabelFieldContentAddDTO; import com.xinelu.manage.vo.labelfieldcontent.GroupingValue; +import com.xinelu.manage.vo.labelfieldcontent.LabelField; import java.util.List; @@ -70,18 +71,18 @@ public interface ILabelFieldContentService { /** * 分组信息 * - * @param patientId 患者信息 * @return LabelFieldInfo */ - AjaxResult groupingContent(Long patientId); + AjaxResult groupingContent(); /** * 画像查询 * - * @param taskPartitionDictId 细分id - * @param patientId 患者id - * @param signPatientManageRouteNodeId 节点id + * @param taskPartitionDictId 细分id + * @param patientId 患者id * @return GroupingValue */ - List groupingValue(Long taskPartitionDictId, Long patientId, Long signPatientManageRouteNodeId); + List> groupingValue(Long taskPartitionDictId, Long patientId); + + AjaxResult insertLabelField(LabelField labelField); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/labelfieldcontent/impl/LabelFieldContentServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/labelfieldcontent/impl/LabelFieldContentServiceImpl.java index 8d3af5b9..b0d83c4c 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/labelfieldcontent/impl/LabelFieldContentServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/labelfieldcontent/impl/LabelFieldContentServiceImpl.java @@ -1,18 +1,20 @@ package com.xinelu.manage.service.labelfieldcontent.impl; -import com.xinelu.common.constant.TaskCreateTypeConstant; +import com.alibaba.fastjson2.JSONObject; import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.enums.PatientSexEnum; import com.xinelu.common.exception.ServiceException; +import com.xinelu.common.utils.BaseUtil; import com.xinelu.common.utils.SecurityUtils; import com.xinelu.common.utils.bean.BeanUtils; import com.xinelu.manage.domain.labelfieldcontent.LabelFieldContent; -import com.xinelu.manage.domain.patientinfo.PatientInfo; -import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute; -import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode; -import com.xinelu.manage.domain.taskpartitiondict.TaskPartitionDict; +import com.xinelu.manage.domain.labelfieldinfo.LabelFieldInfo; +import com.xinelu.manage.domain.patientinfo.PatientAllInfoView; import com.xinelu.manage.dto.labelfieldcontent.LabelFieldContentAddDTO; import com.xinelu.manage.dto.labelfieldcontent.LabelFieldContentDTO; import com.xinelu.manage.mapper.labelfieldcontent.LabelFieldContentMapper; +import com.xinelu.manage.mapper.labelfieldinfo.LabelFieldInfoMapper; +import com.xinelu.manage.mapper.patientinfo.PatientAllInfoViewMapper; import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper; import com.xinelu.manage.mapper.signpatientmanageroute.SignPatientManageRouteMapper; import com.xinelu.manage.mapper.signpatientmanageroutenode.SignPatientManageRouteNodeMapper; @@ -20,14 +22,9 @@ import com.xinelu.manage.mapper.specialdiseasenode.SpecialDiseaseNodeMapper; import com.xinelu.manage.mapper.taskpartitiondict.TaskPartitionDictMapper; import com.xinelu.manage.service.labelfieldcontent.ILabelFieldContentService; import com.xinelu.manage.vo.labelfieldcontent.GroupingValue; -import com.xinelu.manage.vo.specialdiseasenode.PatientSpecialDiseaseNodeVo; +import com.xinelu.manage.vo.labelfieldcontent.LabelField; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.ObjectUtils; -import org.apache.commons.lang3.StringUtils; -import org.jsoup.Jsoup; -import org.jsoup.nodes.Document; -import org.jsoup.nodes.Element; -import org.jsoup.select.Elements; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -36,6 +33,8 @@ import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.ArrayList; import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; /** * 标签字段内容信息Service业务层处理 @@ -48,15 +47,9 @@ public class LabelFieldContentServiceImpl implements ILabelFieldContentService { @Resource private LabelFieldContentMapper labelFieldContentMapper; @Resource - private SignPatientManageRouteMapper signPatientManageRouteMapper; + private LabelFieldInfoMapper labelFieldInfoMapper; @Resource - private SignPatientManageRouteNodeMapper signPatientManageRouteNodeMapper; - @Resource - private SpecialDiseaseNodeMapper specialDiseaseNodeMapper; - @Resource - private PatientInfoMapper patientInfoMapper; - @Resource - private TaskPartitionDictMapper taskPartitionDictMapper; + private PatientAllInfoViewMapper patientAllInfoViewMapper; /** * 查询标签字段内容信息 @@ -165,75 +158,99 @@ public class LabelFieldContentServiceImpl implements ILabelFieldContentService { /** * 分组信息 * - * @param patientId 患者信息 * @return LabelFieldInfo */ @Override - public AjaxResult groupingContent(Long patientId) { + public AjaxResult groupingContent() { //创建全部选项 TaskPartitionDictId =0为全部 - List patientSpecialDiseaseNode = new ArrayList<>(); - PatientSpecialDiseaseNodeVo specialDiseaseNode = new PatientSpecialDiseaseNodeVo(); - specialDiseaseNode.setTaskPartitionDictId(0L); - specialDiseaseNode.setTaskPartitionDictName("全部"); - patientSpecialDiseaseNode.add(specialDiseaseNode); - // 查询最新一次签约记录 - PatientInfo patientInfo = patientInfoMapper.selectPatientInfoById(patientId); - if (ObjectUtils.isEmpty(patientInfo)) { - throw new ServiceException("请选择患者!"); - } - SignPatientManageRoute routeQuery = new SignPatientManageRoute(); - routeQuery.setSignPatientRecordId(patientInfo.getSignPatientRecordId()); - routeQuery.setTaskCreateType(TaskCreateTypeConstant.MANUAL_MATCHE); - List manageRouteList = signPatientManageRouteMapper.selectSignPatientManageRouteList(routeQuery); - if (CollectionUtils.isEmpty(manageRouteList)) { - throw new ServiceException("未找到签约管理路径"); - } - // 根据专病路径查询专病节点信息 - List patientSpecialDiseaseNodeVos = specialDiseaseNodeMapper.selectRouteNodeByRouteId(manageRouteList.get(0).getRouteId()); - if (CollectionUtils.isNotEmpty(patientSpecialDiseaseNodeVos)) { - patientSpecialDiseaseNode.addAll(patientSpecialDiseaseNodeVos); + List labelFieldInfoList = new ArrayList<>(); + LabelFieldInfo labelFieldInfo = new LabelFieldInfo(); + labelFieldInfo.setTaskPartitionDictId(0L); + labelFieldInfo.setTaskPartitionDictName("全部"); + labelFieldInfoList.add(labelFieldInfo); + //任务细分表数据 + List labelFieldInfos = labelFieldInfoMapper.taskPartitionDictIdList(null); + if (CollectionUtils.isNotEmpty(labelFieldInfos)) { + labelFieldInfoList.addAll(labelFieldInfos); } //未分组选项 TaskPartitionDictId =null 为未分组 - PatientSpecialDiseaseNodeVo patientSpecialDiseaseNodeVo = new PatientSpecialDiseaseNodeVo(); - patientSpecialDiseaseNodeVo.setTaskPartitionDictName("未分组"); - patientSpecialDiseaseNode.add(patientSpecialDiseaseNodeVo); - return AjaxResult.success(patientSpecialDiseaseNode); + LabelFieldInfo labelFieldInfoTow = new LabelFieldInfo(); + labelFieldInfoTow.setTaskPartitionDictName("未分组"); + labelFieldInfoList.add(labelFieldInfoTow); + return AjaxResult.success(labelFieldInfoList); } /** * 画像查询 * - * @param taskPartitionDictId 细分id - * @param patientId 患者id - * @param signPatientManageRouteNodeId 节点id + * @param taskPartitionDictId 细分id + * @param patientId 患者id * @return GroupingValue */ @Override - public List groupingValue(Long taskPartitionDictId, Long patientId, Long signPatientManageRouteNodeId) { + public List> groupingValue(Long taskPartitionDictId, Long patientId) { if (ObjectUtils.isEmpty(patientId)) { throw new ServiceException("请选择患者!"); } //根据patientId查询是否有已经维护的参数 List labelFieldContents = labelFieldContentMapper.groupingValue(taskPartitionDictId, patientId, null); if (CollectionUtils.isNotEmpty(labelFieldContents)) { - return labelFieldContents; + Map> collect = labelFieldContents.stream().collect(Collectors.groupingBy(GroupingValue::getPortraitSn)); + return new ArrayList<>(collect.values()); } - //未维护时提取 - SignPatientManageRouteNode specialDiseaseNode = signPatientManageRouteNodeMapper.selectSignPatientManageRouteNodeById(signPatientManageRouteNodeId); - TaskPartitionDict taskPartitionDict = taskPartitionDictMapper.selectTaskPartitionDictByCode(specialDiseaseNode.getTaskSubdivision()); - if (StringUtils.isNotBlank(specialDiseaseNode.getNodeContent()) && specialDiseaseNode.getNodeContent().contains("data-fieldMark")) { - Document document = Jsoup.parse(specialDiseaseNode.getNodeContent()); - // 需要提取的span - Elements spanList = document.select("span[data-w-e-type]"); - GroupingValue groupingValue = new GroupingValue(); - for (Element element : spanList) { - String filename = element.attr("data-filename"); - groupingValue.setFieldName(filename); - groupingValue.setTaskPartitionDictId(taskPartitionDict.getId()); - groupingValue.setTaskPartitionDictName(taskPartitionDict.getTaskPartitionName()); - labelFieldContents.add(groupingValue); + //查询未维护标签及从患者表取值 + List labelFieldContentList = labelFieldContentMapper.groupingValue(taskPartitionDictId, null, null); + JSONObject paramsValue = getParamsValue(patientId); + if (CollectionUtils.isEmpty(labelFieldContentList)) { + return new ArrayList<>(); + } + for (GroupingValue groupingValue : labelFieldContentList) { + //获取不同的文件路径 + switch (groupingValue.getFieldName()) { + case "姓名": + String s = paramsValue.getOrDefault("patientName", "").toString(); + groupingValue.setFieldValue(paramsValue.getOrDefault("patientName", "").toString()); + break; + case "患者电话": + groupingValue.setFieldValue(paramsValue.getOrDefault("patientPhone", "").toString()); + break; + case "性别": + groupingValue.setFieldValue(paramsValue.getOrDefault("sex", "").toString()); + break; + case "医院": + groupingValue.setFieldValue(paramsValue.getOrDefault("hospitalAgencyName", "").toString()); + break; + default: + break; } } - return labelFieldContents; + List> lists = new ArrayList<>(); + lists.add(labelFieldContentList); + return lists; + + } + + /** + * 根据任务细分类型获取患者的真实信息 + * + * @param patientId 患者主键 + * @return 实际信息 + */ + private JSONObject getParamsValue(Long patientId) { + JSONObject retObj; + List patientAllInfoViews = patientAllInfoViewMapper.selectPatientAllInfoListViewByPatientId(patientId); + if (CollectionUtils.isEmpty(patientAllInfoViews) || ObjectUtils.isEmpty(patientAllInfoViews.get(0))) { + throw new ServiceException("患者信息获取错误,请联系管理员!"); + } + PatientAllInfoView patientAllInfoView = patientAllInfoViews.get(0); + retObj = JSONObject.parseObject(JSONObject.toJSONString(patientAllInfoView)); + // 性别转换成中文、计算年龄 + retObj.fluentPut("sex", PatientSexEnum.getInfoByCode(patientAllInfoView.getSex()).getInfo()).fluentPut("age", BaseUtil.getAge(patientAllInfoView.getBirthDate())); + return retObj; + } + + @Override + public AjaxResult insertLabelField(LabelField labelField) { + return null; } } diff --git a/postdischarge-manage/src/main/resources/mapper/manage/patientinfo/PatientAllInfoViewMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/patientinfo/PatientAllInfoViewMapper.xml index 7f52c97e..dc9fee36 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/patientinfo/PatientAllInfoViewMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/patientinfo/PatientAllInfoViewMapper.xml @@ -73,4 +73,53 @@ where patient_id = #{patientId} + \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.xml index f5e5fdbe..efd712e5 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.xml @@ -782,70 +782,4 @@ set message_status = #{messageStatus} where id = #{id} - - \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/taskpartitiondict/TaskPartitionDictMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/taskpartitiondict/TaskPartitionDictMapper.xml index 0b6d2957..3b2c76a9 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/taskpartitiondict/TaskPartitionDictMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/taskpartitiondict/TaskPartitionDictMapper.xml @@ -206,10 +206,4 @@ #{id} - - \ No newline at end of file