LocationAreaUtils.java
2.33 KB
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
package com.huaheng.common.utils;
import java.util.ArrayList;
import java.util.List;
/**
* 库区 区域转换
* @author huaheng
*/
public class LocationAreaUtils {
/**
* 包装区对应区域限制验证
* @param station
* @return
*/
public static String checkHLocationCheck(String station, String area) {
String locationArea = "";
// switch (station) {
// case StationConstant.H1:
// if (!area.equals(StationConstant.HL1) && !area.equals(StationConstant.HL2)) {
// throw new BusinessException("不能跨区域分配任务");
// }
// break;
// case StationConstant.H2:
// if (!area.equals(StationConstant.HL1) && !area.equals(StationConstant.HL2) && !area.equals(StationConstant.HL3)) {
// throw new BusinessException("不能跨区域分配任务");
// }
// break;
// case StationConstant.H3:
// if (!area.equals(StationConstant.HL2) && !area.equals(StationConstant.HL3)) {
// throw new BusinessException("不能跨区域分配任务");
// }
// break;
// case StationConstant.H4:
// if (!area.equals(StationConstant.HL4) && !area.equals(StationConstant.HL5)) {
// throw new BusinessException("不能跨区域分配任务");
// }
// break;
// case StationConstant.H5:
// if (!area.equals(StationConstant.HL4) && !area.equals(StationConstant.HL5)) {
// throw new BusinessException("不能跨区域分配任务");
// }
// break;
// default:
// break;
// }
return locationArea;
}
public static List<String> getRoadWaysByArea(Integer area) {
List<String> roadWays = new ArrayList<>();
switch (area) {
case 1:
case 7:
roadWays.add("1");
roadWays.add("2");
break;
case 2:
case 3:
case 4:
case 5:
case 6:
case 8:
roadWays.add("1");
break;
default:
break;
}
return roadWays;
}
}