jiangping
2025-01-06 e462144e6dcf574cf538baba510b69e477d2b057
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
56
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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
package com.doumee.service.business.third.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出库能力统计
        String[] getDriverTaskList = new String[]{"/tms/zhyt/getDriverTaskList",  "【TMS】查询司机所有代办任务。"};//3.15查询司机所有代办任务。
        String[] getDriverTaskDetail = new String[]{"/tms/zhyt/getDriverTaskDetail",  "【TMS】司机待办任务详情。"};//3.16司机待办任务详情。
        String[] driverStart = new String[]{"/tms/zhyt/driverStartAndArrival",  "【TMS】司机启运。"};//3.17司机启运
        String[] driverArrival = new String[]{"/tms/zhyt/driverStartAndArrival",  "【TMS】司机到货。"};//3.18司机到货
        String[] getEmployeeList = new String[]{"/tms/zhyt/getEmployeeList",  "【TMS】营销人员信息实时查询。"};//3.19营销人员信息实时查询
    }
 
    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;
        }
    }
}