EnumValuesFbServer.java 5.6 KB
Newer Older
wanjia committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
package com.sw.mes.enumvalue;


import com.sw.mes.core.enums.EnumValue;
import com.sw.mes.core.enums.EnumValues;
import lombok.Getter;

public class EnumValuesFbServer {
    /**
     * 任务状态 - 方棒工单排除
     */
    public enum ProductionScheduleStatus implements EnumValue.KeyValueInt {
        未开始(0, "未开始"), 进行中(1, "进行中"), 已完成(2, "已完成"), 已取消(3, "已取消");

        private ProductionScheduleStatus(int key, String value) {
            this.key = key;
            this.value = value;
        }

        public static String getText(int value) {
            ProductionScheduleStatus[] businessModeEnums = values();
            for (ProductionScheduleStatus businessModeEnum : businessModeEnums) {
                if (businessModeEnum.getKey() == value) {
                    return businessModeEnum.getValue();
                }
            }
            return null;
        }

        private int key;
        private String value;

        public int getKey() {
            return key;
        }

        void setKey(int key) {
            this.key = key;
        }

        public String getValue() {
            return value;
        }

        void setValue(String value) {
            this.value = value;
        }
    }


    /**
     * 订单类型 - 方棒工单排除
     */
    public enum ProductionOrderType implements EnumValue.KeyValue {
        常规("常规", "常规"), 研发("研发", "研发"), 在建("ZH05", "在建"), 返工("ZH04", "返工"),
vanga committed
56
        内部代工("ZH06", "内部代工"), 客户受托("ZH07", "客户受托"), 工厂代工("工厂代工", "工厂代工"), ZRB4("ZRB4","研发工单");
wanjia committed
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197

        ProductionOrderType(String key, String value) {
            this.key = key;
            this.value = value;
        }

        public static String getText(String value) {
            ProductionOrderType[] businessModeEnums = values();
            for (ProductionOrderType businessModeEnum : businessModeEnums) {
                if (businessModeEnum.getKey().equals(value)) {
                    return businessModeEnum.getValue();
                }
            }
            return null;
        }

        public static ProductionOrderType getEnum(String value) {
            ProductionOrderType[] enums = values();
            for (ProductionOrderType enumz : enums) {
                if (enumz.getKey().equals(value)) {
                    return enumz;
                }
            }
            return null;
        }

        private String key;
        private String value;

        public String getKey() {
            return key;
        }

        void setKey(String key) {
            this.key = key;
        }

        public String getValue() {
            return value;
        }

        void setValue(String value) {
            this.value = value;
        }
    }


    /**
     * 加工类型
     */
    @Getter
    public enum MatchingType implements EnumValue.KeyValueInt {
        普通加工(0, "普通加工"), 非标加工(1, "非标加工");

        MatchingType(int key, String value) {
            this.key = key;
            this.value = value;
        }

        public static String getText(int value) {
            MatchingType[] businessModeEnums = values();
            for (MatchingType businessModeEnum : businessModeEnums) {
                if (businessModeEnum.getKey() == value) {
                    return businessModeEnum.getValue();
                }
            }
            return null;
        }

        private int key;
        private String value;
    }

    /**
     * 收尾方式
     */
    @Getter
    public enum WindUp implements EnumValues.KeyValue {
        完结棒("V", "完结棒"),
        完结尾("W", "完结尾"),
        正常收尾("Y", "正常收尾"),
        等径断线("N1", "等径断线"),
        收尾断线("N2", "收尾断线"),
        多晶棒("D", "多晶棒");

        private WindUp(String key, String value) {
            this.key = key;
            this.value = value;
        }

        public static String getText(String value) {
            WindUp[] businessModeEnums = values();
            for (WindUp businessModeEnum : businessModeEnums) {
                if (businessModeEnum.getKey().equals(value)) {
                    return businessModeEnum.getValue();
                }
            }
            return null;
        }

        private String key;
        private String value;
    }

    /**
     * 完结标识
     */
    @Getter
    public enum ClosureIdentification implements EnumValues.KeyValue {
        ("无", "无"),
        完结尾("W", "完结尾"),
        完结棒("V", "完结棒");

        private ClosureIdentification(String key, String value) {
            this.key = key;
            this.value = value;
        }

        public static String getText(String value) {
            ClosureIdentification[] businessModeEnums = values();
            for (ClosureIdentification businessModeEnum : businessModeEnums) {
                if (businessModeEnum.getKey().equals(value)) {
                    return businessModeEnum.getValue();
                }
            }
            return null;
        }

        private String key;
        private String value;
    }

    //region 方棒检验类型
    public static String checkoutNameOne = "一次检验";
    public static String checkoutNameGoodsRejected = "退货复检";
    public static String checkoutNameCancellingStocks = "退库复检";
    public static String checkoutNameZfb = "粘方棒复检";
    public static String checkoutNameFq = "返切复检";
    public static String checkoutNameFx = "返修复检";
    //endregion
}