|
|
@@ -0,0 +1,60 @@
|
|
|
+package com.aoyang.tms.common;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @Description: 作业状态枚举类
|
|
|
+ * @Author guoyong
|
|
|
+ * @Date 2022/4/20 17:05
|
|
|
+ * @Version 1.0
|
|
|
+ */
|
|
|
+public enum WorkOrderEnum {
|
|
|
+ //待执行
|
|
|
+ TODO(0, "待执行"),
|
|
|
+
|
|
|
+ //前往装卸车点
|
|
|
+ GOTO_WORK_SPOT(10, "前往装卸车点"),
|
|
|
+
|
|
|
+ //装卸车等待
|
|
|
+ WORK_WAIT(20, "装卸车等待"),
|
|
|
+
|
|
|
+ //成果报备中
|
|
|
+ RESULT_SUBMIT(30, "成果报备中"),
|
|
|
+
|
|
|
+ //已完成
|
|
|
+ COMPLETED(40, "已完成"),
|
|
|
+
|
|
|
+ //已关闭
|
|
|
+ CLOSED(50, "已关闭"),
|
|
|
+
|
|
|
+ //已取消
|
|
|
+ CONCELED(10, "已取消");
|
|
|
+
|
|
|
+
|
|
|
+ private Integer orderStatus;
|
|
|
+ private String orderStatusName;
|
|
|
+
|
|
|
+ WorkOrderEnum(Integer orderStatus, String orderStatusName) {
|
|
|
+ this.orderStatus = orderStatus;
|
|
|
+ this.orderStatusName = orderStatusName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static String getOrderStatusName(Integer orderStatus) {
|
|
|
+ if (orderStatus == null) {
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ WorkOrderEnum[] workOrderEnum = values();
|
|
|
+ for (WorkOrderEnum typenum : workOrderEnum) {
|
|
|
+ if (typenum.orderStatus().equals(orderStatus)) {
|
|
|
+ return typenum.orderStatusName();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Integer orderStatus() {
|
|
|
+ return this.orderStatus;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String orderStatusName() {
|
|
|
+ return this.orderStatusName;
|
|
|
+ }
|
|
|
+}
|