package com.doumee.core.tms.model; 
 | 
  
 | 
import com.doumee.core.utils.Constants; 
 | 
import org.apache.commons.lang3.StringUtils; 
 | 
  
 | 
import java.util.List; 
 | 
  
 | 
public class TMSContants { 
 | 
  
 | 
    public interface InterfacePath { 
 | 
        String[] getSevenArrivalStatus = new String[]{"/tms/zhyt/getSevenArrivalStatus",  "【TMS】近7日到货情况"};//TMS近7日到货情况接口地址 
 | 
        String[] getCurrentTransportationTask = new String[]{ "【TMS】/zhyt/getCurrentTransportationTask",  "【TMS】当前运输任务"};//TMS当前运输任务接口地址 
 | 
        String[] getDistributionOfDeliveryLocations = new String[]{"/tms/zhyt/getDistributionOfDeliveryLocations",  "【TMS】全国到货地分布查询查询"};//TMS全国到货地分布查询查询接口地址 
 | 
        String[] getRealTimeInventory = new String[]{"/tms/zhyt/getRealTimeInventory",  "【TMS】实时库存查询"};//TMS实时库存查询接口地址 
 | 
        String[] getInboundOutbound = new String[]{"/tms/zhyt/getInboundOutbound",  "【TMS】出入库记录查询"};//TMS出入库记录查询接口地址 
 | 
        String[] getIntransitDetails = new String[]{"/tms/zhyt/getIntransitDetails",  "【TMS】在途明细列表"};//TMS在途明细列表接口地址 
 | 
        String[] getOrderList = new String[]{"/tms/zhyt/getOrderList",  "【TMS】合同列表查询"};//TMS合同列表查询接口地址 
 | 
        String[] getTotalAndReportVehicleQty = new String[]{"/tms/zhyt/getTotalAndReportVehicleQty",  "【TMS】查询5个厂的运力资源利用情况。"};//查询5个厂的运力资源利用情况。 
 | 
        String[] getElecByContractNumberList = new String[]{"/tms/zhyt/getElecByContractNumberList",  "【TMS】合同上锁状态"};//TMS合同上锁状态接口地址 
 | 
        String[] getOrderDetailByContractNumber = new String[]{"/tms/zhyt/getOrderDetailByContractNumber",  "【TMS】合同详情"};//TMS合同详情接口地址 
 | 
        String[] getGis = new String[]{"/tms/zhyt/getGis",  "【TMS】根据运输单号查询gis轨"};//TMS根据运输单号查询gis轨接口地址 
 | 
        String[] getOrderStatusByContractNumber = new String[]{"/tms/zhyt/getOrderStatusByContractNumber",  "【TMS】单生命周期"};//3.8订单生命周期 
 | 
        String[] getOutQtyAndVehicleQty = new String[]{"/tms/zhyt/getOutQtyAndVehicleQty",  "【TMS】指定时间范围内累计出库量"};//3.8指定时间范围内累计出库量 
 | 
        String[] getSevenArrivalStatusAndDetails = new String[]{"/tms/zhyt/getSevenArrivalStatusAndDetails",  "【TMS】近7日到货情况(含明细)"};//3.13近7日到货情况(含明细) 
 | 
        String[] getNotFinishOrderList = new String[]{"/tms/zhyt/getNotFinishOrderList",  "【TMS】未完成订单"};//3.13未完成订单 
 | 
        String[] getOutboundCapability = new String[]{"/tms/zhyt/getOutboundCapability",  "【TMS】出库能力统计"};//3.14出库能力统计 
 | 
    } 
 | 
  
 | 
    public  enum TopStatusLevel { 
 | 
        /** 
 | 
         * 订单生成 
 | 
         * 运单配载中 
 | 
         * 仓库出库中 
 | 
         * 车辆运输中 
 | 
         * 已到货 
 | 
         * 已入库 
 | 
         */ 
 | 
        ddsc(0,"订单生成",new Integer[]{ChildStatusLevel.create.getOrderStatus()}), 
 | 
        ydpzz (1,"运单配载中",new Integer[]{ChildStatusLevel.ysdxc.getOrderStatus() 
 | 
                ,ChildStatusLevel.ysdcx.getOrderStatus() 
 | 
                ,ChildStatusLevel.shtg.getOrderStatus() 
 | 
                ,ChildStatusLevel.shwtg.getOrderStatus()}), 
 | 
        ckckz (2,"仓库出库中",new Integer[]{ChildStatusLevel.ddzhddzs.getOrderStatus() 
 | 
                ,ChildStatusLevel.sqzyzwc.getOrderStatus() 
 | 
                ,ChildStatusLevel.clqddzs.getOrderStatus()}), 
 | 
        clysz(3, "车辆运输中",new Integer[]{ChildStatusLevel.clqdapp.getOrderStatus()}), 
 | 
        ydh(4,"已到货",new Integer[]{ChildStatusLevel.ddzhd.getOrderStatus()}), 
 | 
        yrk (5,"已入库",new Integer[]{ChildStatusLevel.ddxhd.getOrderStatus()}); 
 | 
  
 | 
        // 成员变量 
 | 
        private int key; 
 | 
        private  Integer[] chileIndexList  ; 
 | 
        private String name; 
 | 
  
 | 
        // 构造方法 
 | 
        TopStatusLevel(int key, String name,  Integer[] chileIndexList) { 
 | 
            this.key = key; 
 | 
            this.chileIndexList = chileIndexList; 
 | 
            this.name = name; 
 | 
        } 
 | 
        public static String getNameByKey(Integer key ) { 
 | 
            if(key == null){ 
 | 
                return null; 
 | 
            } 
 | 
            for (TopStatusLevel c : TopStatusLevel.values()) { 
 | 
                if (c.getKey() == key) { 
 | 
                    return c.getName(); 
 | 
                } 
 | 
            } 
 | 
            return null; 
 | 
        } 
 | 
        public int getKey() { 
 | 
            return key; 
 | 
        } 
 | 
  
 | 
        public void setKey(int key) { 
 | 
            this.key = key; 
 | 
        } 
 | 
  
 | 
        public String getName() { 
 | 
            return name; 
 | 
        } 
 | 
  
 | 
        public void setName(String name) { 
 | 
            this.name = name; 
 | 
        } 
 | 
  
 | 
        public Integer[] getChileIndexList() { 
 | 
            return chileIndexList; 
 | 
        } 
 | 
  
 | 
        public void setChileIndexList(Integer[] chileIndexList) { 
 | 
            this.chileIndexList = chileIndexList; 
 | 
        } 
 | 
    } 
 | 
    public  interface  StatusCode{ 
 | 
        /** 
 | 
         * 1-准运证 
 | 
         * 2-电子锁汽运 
 | 
         * 3-电子锁非汽运 
 | 
         * 4-GIS 
 | 
         * 5-APP 
 | 
         * 6-人工更新 
 | 
         */ 
 | 
        int zyz =1; 
 | 
        int dzsqy =2; 
 | 
        int dzsfqy =3; 
 | 
        int gis =4; 
 | 
        int app =5; 
 | 
        int rggx =6; 
 | 
    } 
 | 
    public  enum ChildStatusLevel { 
 | 
        /** 
 | 
         订单生成(发货仓库联系电话:0551-63451234)    0    订单生成(发货仓库联系电话:0551-63451234) 
 | 
  
 | 
         运输单形成    1    运输单形成 
 | 
         运输单撤销(原因:XXX)    -2    运输单撤销(原因:XXX) 
 | 
         运输单审核未通过    -1    运输单审核未通过 
 | 
         运输单审核通过    2    运输单审核通过 
 | 
         运输单确认        运输单确认 
 | 
         到达装货地-电子锁汽运    3    车辆已到达装货地 
 | 
         车辆启运-电子锁汽运    4    车辆装货完成,电子锁已上锁 
 | 
         车辆启运-APP    4    车辆运输中 
 | 
         到达卸货地-APP    5    车辆已到达卸货地 
 | 
         到达卸货地-电子锁汽运    5    电子锁已解锁,运输任务已完成 
 | 
         */ 
 | 
        create(0,0, 0,"订单生成",null), 
 | 
        ysdxc(1,1,1, "运输单形成",null), 
 | 
        ysdcx(2, -2,1,"运输单撤销",null ), 
 | 
        shtg(3,-1, 1,"运输单审核未通过",null ), 
 | 
        shwtg(4, 2,1,"运输单审核通过",null), 
 | 
        sqzyzwc(5,6, 1,"申请准运证完成","车辆准运证申请完成" ), 
 | 
        ddzhddzs(6,3,2,"到达装货地-电子锁汽运","车辆已到达装货地" ), 
 | 
        clqddzs(7, 4,2,"车辆启运-电子锁汽运","车辆装货完成,电子锁已上锁" ), 
 | 
        clqdapp(8, 7,3,"车辆启运-APP","车辆运输中" ), 
 | 
        ddzhd(9, 8,4,"到达卸货地-APP","车辆已到达卸货地" ), 
 | 
        ddxhd(10, 5,5,"到达卸货地-电子锁汽运","电子锁已解锁,运输任务已完成" ), 
 | 
        ; 
 | 
  
 | 
        // 成员变量 
 | 
        private Integer key; 
 | 
        private Integer orderStatus; 
 | 
        private Integer parentIndex; 
 | 
        private String name; 
 | 
        private String info; 
 | 
  
 | 
        // 构造方法 
 | 
        ChildStatusLevel(Integer key,Integer orderStatus,Integer parentIndex, String name,String info ) { 
 | 
            this.key = key; 
 | 
            this.info = info; 
 | 
            this.name = name; 
 | 
            this.orderStatus = orderStatus; 
 | 
            this.parentIndex = parentIndex; 
 | 
        } 
 | 
        public static Integer getParentIndexByStatus(Integer orderStatus) { 
 | 
            if(orderStatus == null){ 
 | 
                return null; 
 | 
            } 
 | 
            for (ChildStatusLevel c : ChildStatusLevel.values()) { 
 | 
                if (c.getOrderStatus() == orderStatus) { 
 | 
                    return c.parentIndex; 
 | 
                } 
 | 
            } 
 | 
            return null; 
 | 
        } 
 | 
        public static String getInfo(int orderStatus,String defualt) { 
 | 
            for (ChildStatusLevel c : ChildStatusLevel.values()) { 
 | 
                if (c.getOrderStatus() == orderStatus) { 
 | 
                    return StringUtils.defaultString(c.getInfo(),StringUtils.defaultString(defualt,c.getName())); 
 | 
                } 
 | 
            } 
 | 
            return null; 
 | 
        } 
 | 
  
 | 
        public int getKey() { 
 | 
            return key; 
 | 
        } 
 | 
  
 | 
        public void setKey(int key) { 
 | 
            this.key = key; 
 | 
        } 
 | 
  
 | 
        public String getName() { 
 | 
            return name; 
 | 
        } 
 | 
  
 | 
        public void setName(String name) { 
 | 
            this.name = name; 
 | 
        } 
 | 
  
 | 
        public String getInfo() { 
 | 
            return info; 
 | 
        } 
 | 
  
 | 
        public void setInfo(String info) { 
 | 
            this.info = info; 
 | 
        } 
 | 
  
 | 
        public int getOrderStatus() { 
 | 
            return orderStatus; 
 | 
        } 
 | 
  
 | 
        public void setOrderStatus(int orderStatus) { 
 | 
            this.orderStatus = orderStatus; 
 | 
        } 
 | 
  
 | 
        public int getParentIndex() { 
 | 
            return parentIndex; 
 | 
        } 
 | 
  
 | 
        public void setParentIndex(int parentIndex) { 
 | 
            this.parentIndex = parentIndex; 
 | 
        } 
 | 
    } 
 | 
} 
 |