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
| package com.zy.asrs.domain.enums;
|
|
| import com.zy.core.model.protocol.StationProtocol;
|
| /**
| * 站点状态枚举
| */
| public enum StationStatusType {
|
| // 自动
| SITE_AUTO,
| // 非自动
| SITE_UNAUTO,
| // 自动+有物+ID
| SITE_AUTO_RUN_ID,
| // 自动+有物
| SITE_AUTO_RUN,
| // 自动+ID
| SITE_AUTO_ID,
| ;
|
| public static StationStatusType process(StationProtocol stationProtocol){
| if (stationProtocol == null) {
| return null;
| }
| if (stationProtocol.isAutoing() && stationProtocol.isLoading() && stationProtocol.getTaskNo() > 0) {
| return SITE_AUTO_RUN_ID;
| }
| if (stationProtocol.isAutoing() && stationProtocol.isLoading()) {
| return SITE_AUTO_RUN;
| }
| if (stationProtocol.isAutoing() && stationProtocol.getTaskNo() > 0) {
| return SITE_AUTO_ID;
| }
| if (stationProtocol.isAutoing()) {
| return SITE_AUTO;
| }
| if (!stationProtocol.isAutoing()) {
| return SITE_UNAUTO;
| }
| return null;
| }
|
| }
|
|