package com.zy.core.enums; import com.core.common.Cools; public enum CyclePlanLocStatus { PENDING(0, "待执行"), MOVING(1, "执行中"), DONE(2, "已完成"), SKIPPED(-1, "跳过"), ; CyclePlanLocStatus(int id, String desc) { this.id = id; this.desc = desc; } public int id; public String desc; public static CyclePlanLocStatus get(int id) { if (Cools.isEmpty(id)) { return null; } for (CyclePlanLocStatus value : CyclePlanLocStatus.values()) { if (value.id == id) { return value; } } return null; } }