1 /** 2 * PM6 UTS新接口的枚举工具类 4 */ 5 public class UTSWorkOrderEnumUtil { 6 public enum WorkOrderOperType { 7 /** 8 * Assigned("SET ZUGE"), 分派 9 * InProgress("SET INBE"),执行 10 * Resolved("SET OMCE"), 完成 11 * Closed("SET ABGS"), 归档 12 * Cancelled("SET STOR"), 取消 13 * Pending("SET RUEC"); 重置 14 * Edit //工单主流程外的其他编辑操作 15 */ 16 17 Create("New"), 18 Assigned("Assigned"), 19 InProgress("In Progress"), 20 Resolved("Resolved"), 21 Closed("Closed"), 22 Cancelled("Cancelled"), 23 Pending("Pending"), 24 Edit("Edit"); 25 26 private String value; 27 28 private WorkOrderOperType(String value) { 29 this.value = value; 30 } 31 32 public String getValue() { 33 return value; 34 } 35 36 public static WorkOrderOperType getWithString(String value){ 37 if(Create.value.equalsIgnoreCase(value)){ 38 return Create; 39 } else if(Assigned.value.equalsIgnoreCase(value)){ 40 return Assigned; 41 } else if(InProgress.value.equalsIgnoreCase(value)){ 42 return InProgress; 43 } else if(Resolved.value.equalsIgnoreCase(value)){ 44 return Resolved; 45 } else if(Closed.value.equalsIgnoreCase(value)){ 46 return Closed; 47 } else if(Cancelled.value.equalsIgnoreCase(value)){ 48 return Cancelled; 49 } else if(Pending.value.equalsIgnoreCase(value)){ 50 return Pending; 51 } else if(Edit.value.equalsIgnoreCase(value)){ 52 return Edit; 53 } 54 return null; 55 } 56 } 57 58 public enum WorkOrderExecuteState { 59 /** 60 0 ERST 新建 61 1 ZUGE 已分派 62 2 INFO 63 3 SPER 锁定 64 4 INBE 执行 65 5 RUEC 重置 66 6 OMCE 关闭 67 7 STOR 取消 68 8 ABGS 归档 69 */ 70 ERST("0"), 71 ZUGE("1"), 72 INFO("2"), 73 SPER("3"), 74 INBE("4"), 75 RUEC("5"), 76 OMCE("6"), 77 STOR("7"), 78 ABGS("8"); 79 80 81 private String value; 82 83 private WorkOrderExecuteState(String value) { 84 this.value = value; 85 } 86 87 public String getValue() { 88 return value; 89 } 90 } 91 }