package jnpf.limsEntity; /** * LIMS 业务状态枚举 */ public enum BizStatus { CREATED("created", "已创建"), CONFIRMED("confirmed", "已提交"), PENDING_FETCH("pending_fetch", "待取样"), DELETED("deleted", "已废弃"), CANCELLED("cancelled", "已撤回"), FETCHED("fetched", "已取样"), PENDING_RECEIVE("pending_receive", "待接样"), RECEIVED("received", "已接样"), REJECTED("rejected", "已退回"); private final String code; private final String label; BizStatus(String code, String label) { this.code = code; this.label = label; } public String getCode() { return code; } public String getLabel() { return label; } public static BizStatus fromCode(String code) { for (BizStatus status : values()) { if (status.code.equals(code)) { return status; } } throw new IllegalArgumentException("未知状态: " + code); } }