package com.yunfeiyun.agmp.fms.constant;


/**
 * 流水号类型
 * 
 * @author 杨晓辉
 */
public @interface Fms {


        public enum WaterType
        {
            PLAN("种植计划编号","Z"),
            PICK("采收任务",""),
            PICKS("采收编号","C"),
            TASK("农事任务",""),
            PATROL("巡田任务","");

            private final String key;
            private final String type;
            WaterType(String type , String key)
            {
                this.type = type;
                this.key = key;
            }

            public String getType() {
                return this.type;
            }

            public String getKey() {
                return this.key;
            }

            public static String getKey(String type) {
            for (WaterType water : WaterType.values()) {
                if (water.getType().equals(type)) {
                    return water.getKey();
                }
            }
            return null;
        }
     }

}