Whether枚举修改

This commit is contained in:
anxin
2025-03-18 09:33:00 +08:00
parent ff1d93a7dd
commit ba747fc22b
2 changed files with 10 additions and 45 deletions

View File

@@ -1,43 +1,29 @@
/*
* 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-05
* 是否
*/
@Getter
@AllArgsConstructor
public enum Whether {
public enum Whether implements HisEnumInterface {
/**
* 否
*/
NO(0, ""),
NO(0, "no", ""),
/**
* 是
*/
YES(1, "");
YES(1, "yes", "");
private Integer value;
private String info;
public static Whether getByValue(Integer value) {
if (value == null) {
return null;
}
for (Whether val : values()) {
if (val.getValue().equals(value)) {
return val;
}
}
return null;
}
@EnumValue
private final Integer value;
private final String code;
private final String info;
}

View File

@@ -1,21 +0,0 @@
package com.openhis.common.enums;
import com.baomidou.mybatisplus.annotation.EnumValue;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 是否
*/
@Getter
@AllArgsConstructor
public enum WhetherContainUnknown implements HisEnumInterface {
NO(0, "no", ""),
YES(1, "yes", ""),
UNKNOWN(2, "unknown", "未知");
@EnumValue
private final Integer value;
private final String code;
private final String info;
}