枚举修改
This commit is contained in:
@@ -1,54 +0,0 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.common.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 项目类型
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-03-10
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ItemCategory implements HisEnumInterface {
|
||||
|
||||
/**
|
||||
* 中药
|
||||
*/
|
||||
CHINESE_MEDICINE(1, "1","中药"),
|
||||
|
||||
/**
|
||||
* 西药
|
||||
*/
|
||||
WESTERN_MEDICINE(2, "2","西药"),
|
||||
|
||||
/**
|
||||
* 中成药
|
||||
*/
|
||||
CHINESE_PATENT_MEDICINE(3, "3","中成药"),
|
||||
|
||||
/**
|
||||
* 医疗耗材
|
||||
*/
|
||||
MEDICAL_CONSUMABLES(4, "4","医疗耗材");
|
||||
|
||||
private Integer value;
|
||||
private String code;
|
||||
private String info;
|
||||
|
||||
public static ItemCategory getByValue(Integer value) {
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
for (ItemCategory val : values()) {
|
||||
if (val.getValue().equals(value)) {
|
||||
return val;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* 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;
|
||||
|
||||
/**
|
||||
* 项目类型
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-03-10
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ItemType implements HisEnumInterface {
|
||||
|
||||
/**
|
||||
* 中药
|
||||
*/
|
||||
MEDICINE(1, "1", "中药"),
|
||||
|
||||
/**
|
||||
* 西药
|
||||
*/
|
||||
DEVICE(2, "2", "西药"),
|
||||
|
||||
/**
|
||||
* 医疗活动
|
||||
*/
|
||||
ACTIVITY(3, "3", "医疗活动");
|
||||
|
||||
@EnumValue
|
||||
private Integer value;
|
||||
private String code;
|
||||
private String info;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user