枚举调整
This commit is contained in:
@@ -63,6 +63,18 @@ public class DictAspect {
|
||||
if (dto == null) {
|
||||
return;
|
||||
}
|
||||
// 检查对象是否是 DTO 类(即是否有 @Dict 注解的字段)
|
||||
boolean isDto = false;
|
||||
for (Field field : dto.getClass().getDeclaredFields()) {
|
||||
if (field.isAnnotationPresent(Dict.class)) {
|
||||
isDto = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// 如果不是 DTO 类,直接返回
|
||||
if (!isDto) {
|
||||
return;
|
||||
}
|
||||
// 获取 DTO 类的所有字段
|
||||
for (Field field : dto.getClass().getDeclaredFields()) {
|
||||
field.setAccessible(true); // 设置字段可访问
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.openhis.common.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 活动类型
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ActivityType implements HisEnumInterface {
|
||||
|
||||
PROOF(1, "PROOF", "检验"),
|
||||
|
||||
TEST(2, "TEST", "检查"),
|
||||
|
||||
CARE(3, "CARE", "护理"),
|
||||
|
||||
OPERATION(4, "OPERATION", "手术"),
|
||||
|
||||
OTHER(5, "OTHER", "其他");
|
||||
|
||||
@EnumValue
|
||||
private final Integer value;
|
||||
private final String code;
|
||||
private final String info;
|
||||
|
||||
}
|
||||
@@ -20,7 +20,9 @@ public enum EncounterClass implements HisEnumInterface {
|
||||
|
||||
VR(5, "VR", "线上"),
|
||||
|
||||
HH(6, "HH", "家庭");
|
||||
HH(6, "HH", "家庭"),
|
||||
|
||||
OTHER(7, "OTHER", "家庭");
|
||||
|
||||
@EnumValue
|
||||
private final Integer value;
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.common.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 请求状态
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum RequestStatus implements HisEnumInterface {
|
||||
|
||||
/**
|
||||
* 待发送
|
||||
*/
|
||||
DRAFT(1, "draft", "待发送"),
|
||||
|
||||
/**
|
||||
* 已发送
|
||||
*/
|
||||
COMPLETED(2, "completed", "已发送"),
|
||||
|
||||
/**
|
||||
* 暂停
|
||||
*/
|
||||
ON_HOLD(3, "on_hold", "暂停"),
|
||||
|
||||
/**
|
||||
* 撤回
|
||||
*/
|
||||
CANCELLED(4, "cancelled", "撤回"),
|
||||
|
||||
/**
|
||||
* 停止
|
||||
*/
|
||||
STOPPED(5, "stopped", "停止"),
|
||||
|
||||
/**
|
||||
* 不可用
|
||||
*/
|
||||
ENDED(6, "ended", "不可用"),
|
||||
|
||||
/**
|
||||
* 未知
|
||||
*/
|
||||
UNKNOWN(7, "unknown", "未知"),
|
||||
|
||||
/**
|
||||
* 已汇总
|
||||
*/
|
||||
SUMMARIZED(8, "summarized", "已汇总");
|
||||
|
||||
@EnumValue
|
||||
private final Integer value;
|
||||
private final String code;
|
||||
private final String info;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.openhis.common.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 治疗时长类型
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum TherapyTimeType implements HisEnumInterface {
|
||||
|
||||
LONG_TERM(1, "LT", "长期"),
|
||||
|
||||
TEMPORARY(2, "TEMP", "临时"),
|
||||
|
||||
SEASONAL(3, "SS", "季节性");
|
||||
|
||||
@EnumValue
|
||||
private final Integer value;
|
||||
private final String code;
|
||||
private final String info;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user