| package com.zy.core.enums; | 
|   | 
| import com.core.common.Cools; | 
|   | 
| public enum ShuttleChargeType { | 
|   | 
|     FIRST(1, "1800101"), | 
|     SECOND(2, "1800103"), | 
|     ; | 
|   | 
|     ShuttleChargeType(int id, String locNo) { | 
|         this.id = id; | 
|         this.locNo = locNo; | 
|     } | 
|   | 
|     public int id; | 
|   | 
|     public String locNo; | 
|   | 
|     public static ShuttleChargeType get(String locNo) { | 
|         if (Cools.isEmpty(locNo)) { | 
|             return null; | 
|         } | 
|         ShuttleChargeType[] values = ShuttleChargeType.values(); | 
|         for (ShuttleChargeType value : values) { | 
|             if (value.locNo.equals(locNo)) { | 
|                 return value; | 
|             } | 
|         } | 
|         return null; | 
|     } | 
|   | 
|     public static ShuttleChargeType get(int id) { | 
|         if (Cools.isEmpty(id)) { | 
|             return null; | 
|         } | 
|         ShuttleChargeType[] values = ShuttleChargeType.values(); | 
|         for (ShuttleChargeType value : values) { | 
|             if (value.id == id) { | 
|                 return value; | 
|             } | 
|         } | 
|         return null; | 
|     } | 
|   | 
| } |