From 2bbd91fd719232a5bba59ed3de097a3dc15396c0 Mon Sep 17 00:00:00 2001 From: zhangheng <3226558941@qq.com> Date: Thu, 20 Jun 2024 13:46:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=97=E6=AE=B5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../labelfieldcontent/LabelFieldContent.java | 67 +++++++---- .../domain/labelfieldinfo/LabelFieldInfo.java | 54 +++++++-- .../impl/LabelFieldContentServiceImpl.java | 4 +- .../LabelFieldContentMapper.xml | 110 +++++++++--------- .../labelfieldinfo/LabelFieldInfoMapper.xml | 73 ++++++++---- 5 files changed, 199 insertions(+), 109 deletions(-) diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/labelfieldcontent/LabelFieldContent.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/labelfieldcontent/LabelFieldContent.java index 68834ef9..2168c45b 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/labelfieldcontent/LabelFieldContent.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/labelfieldcontent/LabelFieldContent.java @@ -15,7 +15,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; * 标签字段内容信息对象 label_field_content * * @author xinelu - * @date 2024-03-11 + * @date 2024-06-20 */ @Data @AllArgsConstructor @@ -45,25 +45,39 @@ public class LabelFieldContent extends BaseEntity { private String fieldName; /** - * 内容名称 + * 字段编码,同param_key字段值 */ - @ApiModelProperty(value = "内容名称") - @Excel(name = "内容名称") - private String contentName; + @ApiModelProperty(value = "字段编码,同param_key字段值") + @Excel(name = "字段编码,同param_key字段值") + private String fieldCode; /** - * 内容编码 + * 字段值,同param_value */ - @ApiModelProperty(value = "内容编码") - @Excel(name = "内容编码") - private String contentCode; + @ApiModelProperty(value = "字段值,同param_value") + @Excel(name = "字段值,同param_value") + private String fieldValue; /** - * 结果预览 + * 画像流水号,用年月日时分秒毫秒数字转成的字符串 */ - @ApiModelProperty(value = "结果预览") - @Excel(name = "结果预览") - private String resultPreview; + @ApiModelProperty(value = "画像流水号,用年月日时分秒毫秒数字转成的字符串") + @Excel(name = "画像流水号,用年月日时分秒毫秒数字转成的字符串") + private String portraitSn; + + /** + * 患者ID + */ + @ApiModelProperty(value = "患者ID") + @Excel(name = "患者ID") + private Long patientId; + + /** + * 画像状态(FIELD:已归档,INUSE:在用) + */ + @ApiModelProperty(value = "画像状态") + @Excel(name = "画像状态", readConverterExp = "FIELD:已归档,INUSE:在用") + private String portraitStatus; /** * 内容排序 @@ -79,11 +93,24 @@ public class LabelFieldContent extends BaseEntity { @Excel(name = "内容备注信息") private String contentRemark; - /** - * 画像字段标识,存储方式例子:${content} - */ - @ApiModelProperty(value = "画像字段标识,存储方式例子:${content}") - @Excel(name = "画像字段标识,存储方式例子:${content}") - private String fieldMark; -} + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("fieldId", getFieldId()) + .append("fieldName", getFieldName()) + .append("fieldCode", getFieldCode()) + .append("fieldValue", getFieldValue()) + .append("portraitSn", getPortraitSn()) + .append("patientId", getPatientId()) + .append("portraitStatus", getPortraitStatus()) + .append("contentSort", getContentSort()) + .append("contentRemark", getContentRemark()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} \ No newline at end of file diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/labelfieldinfo/LabelFieldInfo.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/labelfieldinfo/LabelFieldInfo.java index f91434c3..e027b16d 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/labelfieldinfo/LabelFieldInfo.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/labelfieldinfo/LabelFieldInfo.java @@ -2,8 +2,6 @@ package com.xinelu.manage.domain.labelfieldinfo; import com.xinelu.common.annotation.Excel; import com.xinelu.common.core.domain.BaseEntity; -import com.xinelu.common.custominterface.Insert; -import com.xinelu.common.custominterface.Update; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; @@ -13,13 +11,11 @@ import lombok.NoArgsConstructor; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; -import javax.validation.constraints.NotBlank; - /** * 标签字段信息对象 label_field_info * * @author xinelu - * @date 2024-03-11 + * @date 2024-06-20 */ @Data @AllArgsConstructor @@ -39,7 +35,6 @@ public class LabelFieldInfo extends BaseEntity { */ @ApiModelProperty(value = "字段名称") @Excel(name = "字段名称") - @NotBlank(message = "字段名称不能为空", groups = {Insert.class, Update.class}) private String fieldName; /** @@ -54,7 +49,6 @@ public class LabelFieldInfo extends BaseEntity { */ @ApiModelProperty(value = "字段类型,画像标签字段:PORTRAIT_LABEL_FIELD,知识库字段:KNOWLEDGE_FIELD") @Excel(name = "字段类型,画像标签字段:PORTRAIT_LABEL_FIELD,知识库字段:KNOWLEDGE_FIELD") - @NotBlank(message = "字段类型不能为空", groups = {Insert.class, Update.class}) private String fieldType; /** @@ -70,4 +64,50 @@ public class LabelFieldInfo extends BaseEntity { @ApiModelProperty(value = "字段备注信息") @Excel(name = "字段备注信息") private String fieldRemark; + + /** + * 任务细分id,当做分组使用 + */ + @ApiModelProperty(value = "任务细分id,当做分组使用") + private Long taskPartitionDictId; + + /** + * 任务细分名称(冗余) + */ + @ApiModelProperty(value = "任务细分名称(冗余)") + @Excel(name = "任务细分名称") + private String taskPartitionDictName; + + /** + * 任务类型表id(冗余) + */ + @ApiModelProperty(value = "任务类型表id(冗余)") + private Long taskTypeId; + + /** + * 任务类型名称(冗余) + */ + @ApiModelProperty(value = "任务类型名称(冗余)") + private String taskTypeName; + + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("fieldName", getFieldName()) + .append("fieldCode", getFieldCode()) + .append("fieldType", getFieldType()) + .append("fieldSort", getFieldSort()) + .append("fieldRemark", getFieldRemark()) + .append("taskPartitionDictId", getTaskPartitionDictId()) + .append("taskPartitionDictName", getTaskPartitionDictName()) + .append("taskTypeId", getTaskTypeId()) + .append("taskTypeName", getTaskTypeName()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } } 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 92b30227..f5a6d89a 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 @@ -79,7 +79,7 @@ public class LabelFieldContentServiceImpl implements ILabelFieldContentService { throw new ServiceException("当前字段内容不存在,无法修改,请联系管理员"); } // 检查除去当前记录外有没有重复内容名称 - int existCount = labelFieldContentMapper.existCountByContentNameExcludingId(labelFieldContent.getId(), labelFieldContent.getFieldId(), labelFieldContent.getContentName()); + int existCount = labelFieldContentMapper.existCountByContentNameExcludingId(labelFieldContent.getId(), labelFieldContent.getFieldId(), null); if (existCount > 0) { throw new ServiceException("当前标签字段类型下字段内容名称已存在"); } @@ -131,7 +131,7 @@ 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.setContentCode(Constants.CONTENT_ENCODING + systemCodeUtil.generateDepartCode(Constants.CONTENT_ENCODING)); labelFieldContent.setCreateBy(SecurityUtils.getUsername()); labelFieldContent.setCreateTime(LocalDateTime.now()); if (labelFieldContentMapper.insertLabelFieldContent(labelFieldContent) <= 0) { 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 3409eadb..116fb1a0 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/labelfieldcontent/LabelFieldContentMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/labelfieldcontent/LabelFieldContentMapper.xml @@ -8,12 +8,13 @@ - - - + + + + + - @@ -24,12 +25,13 @@ select id, field_id, field_name, - content_name, - content_code, - result_preview, + field_code, + field_value, + portrait_sn, + patient_id, + portrait_status, content_sort, content_remark, - field_mark, create_by, create_time, update_by, @@ -41,40 +43,31 @@ - and field_id = - #{fieldId} + and field_id = #{fieldId} - and field_name like concat('%', - #{fieldName}, - '%' - ) + and field_name like concat('%', #{fieldName}, '%') - - and content_name like concat('%', - #{contentName}, - '%' - ) + + and field_code = #{fieldCode} - - and content_code = - #{contentCode} + + and field_value = #{fieldValue} - - and result_preview = - #{resultPreview} + + and portrait_sn = #{portraitSn} + + + and patient_id = #{patientId} + + + and portrait_status = #{portraitStatus} - and content_sort = - #{contentSort} + and content_sort = #{contentSort} - and content_remark = - #{contentRemark} - - - and field_mark = - #{fieldMark} + and content_remark = #{contentRemark} order by content_sort, create_time DESC @@ -109,18 +102,20 @@ field_name, - content_name, + field_code, - content_code, + field_value, - result_preview, + portrait_sn, + + patient_id, + + portrait_status, content_sort, content_remark, - field_mark, - create_by, create_time, @@ -135,18 +130,20 @@ #{fieldName}, - #{contentName}, + #{fieldCode}, - #{contentCode}, + #{fieldValue}, - #{resultPreview}, + #{portraitSn}, + + #{patientId}, + + #{portraitStatus}, #{contentSort}, #{contentRemark}, - #{fieldMark}, - #{createBy}, #{createTime}, @@ -167,14 +164,20 @@ field_name = #{fieldName}, - content_name = - #{contentName}, + field_code = + #{fieldCode}, - content_code = - #{contentCode}, + field_value = + #{fieldValue}, - result_preview = - #{resultPreview}, + portrait_sn = + #{portraitSn}, + + patient_id = + #{patientId}, + + portrait_status = + #{portraitStatus}, content_sort = #{contentSort}, @@ -182,9 +185,6 @@ content_remark = #{contentRemark}, - field_mark = - #{fieldMark}, - create_by = #{createBy}, @@ -219,12 +219,8 @@ select id LabelFieldContentId, field_id, field_name, - content_name, - content_code, - result_preview, content_sort, - content_remark, - field_mark + content_remark from label_field_content 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 9a32f21c..c4ac71d7 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/labelfieldinfo/LabelFieldInfoMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/labelfieldinfo/LabelFieldInfoMapper.xml @@ -11,6 +11,10 @@ + + + + @@ -18,43 +22,38 @@ - select id, - field_name, - field_code, - field_type, - field_sort, - field_remark, - create_by, - create_time, - update_by, - update_time - from label_field_info + select id, field_name, field_code, field_type, field_sort, field_remark, task_partition_dict_id, task_partition_dict_name, task_type_id, task_type_name, create_by, create_time, update_by, update_time from label_field_info