XmlResultWrapper.java
7.3 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
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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
package StSys.RoyoTech;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.ArrayList;
import java.util.List;
/**
* Created by sunke on 2019/10/30.
*/
@XmlRootElement(name = "XmlResult")
public class XmlResultWrapper {
@XmlElement
public XmlResult XmlResult;
public static class XmlResult {
public String Errorcode;
public String Message;
public XmlResult() {
}
public XmlResult(String errorcode, String message) {
Errorcode = errorcode;
Message = message;
}
@XmlElementWrapper(name = "Data")
@XmlElement(name = "TowerDetialImforation")
public List<TowerDetialImforation> allTowerDetails;
@XmlElementWrapper(name = "Data")
@XmlElement(name = "TowerDetailInformation")
public List<TowerBaseInformation> detailTowers;
@XmlElement(name = "Data")
public TowerObj TowerObj;
@XmlElementWrapper(name = "Data")
@XmlElement(name = "TowerBaseInformation")
public List<TowerBaseInformation> baseTowers;
@XmlElementWrapper(name = "Data")
@XmlElement(name = "JobListInformation")
public List<JobListInformation> jobLists;
@XmlElementWrapper(name = "Data")
@XmlElement(name = "CarrierInformation")
public List<CarrierInformation> carriers;
}
public static class TowerObj{
public TowerObj(List<TowerBaseInformation> towers) {
baseTowers = towers;
}
@XmlElementWrapper(name = "ArrayOfTowerBaseInformation")
@XmlElement(name = "TowerBaseInformation")
public List<TowerBaseInformation> baseTowers;
}
/**
* <TowerDetailInformation> <TowerId>000800</TowerId> <TowerName>000800</TowerName> <OnlineStatus>Online</OnlineStatus> <StatusText>Bereit</StatusText> <StatusCode>26</StatusCode> <Temperature>23.52</Temperature> <Humidity>49.42</Humidity>
<Slots> <Slot>
<Slotname>s78</Slotname> <Slots_used>208</Slots_used> <Slots_free>266</Slots_free>
</Slot> <Slot>
<Slotname>s712</Slotname> <Slots_used>4</Slots_used> <Slots_free>36</Slots_free>
</Slot> .
. </Slots>
</TowerDetailInformation>
*/
public static class TowerBaseInformation {
public TowerBaseInformation() {
}
public TowerBaseInformation(int towerId) {
TowerId = towerId;
}
public int TowerId;
public String TowerName;
public String OnlineStatus;
public String StatusText;
public String StatusCode;
public String Temperature;
public String Humidity;
@XmlElementWrapper(name = "Slots")
@XmlElement(name = "Slot")
public List<Slot> Slots;
}
public static class Slot{
public String Slotname;
public int Slots_used;
public int Slots_free;
}
public static class Pos{
public String Dia; //料卷直径
public String Thinkness; //料卷厚度
public int SlotsFree; //剩余储位数量
public int SlotsUsed; //已用储位数量
}
public static class CarrierInformation{
public int ID;
public String Carrier;
public String CreateDate;
public String CreateUser="";
public int Article = 0;
/**
* 000800.72.03其中000800为TowerId
*/
public String Depot;
public int DepotOld = 0;
public String DepotDate;
public String DepotUser = "";
public String Traybox = "";
public int Stock;
public int StockMin = 0;
public int StockNew = 0;
public int StockUsed = 0;
public int StockTPSys = 0;
public boolean Guessed = false;
public int Cycles = 0;
public int Outtime = 0;
public boolean Unleaded = false;
public int PriceP = 0;
public int Height;
public int HCode = 0;
public int Diameter;
public int Supply = 0;
public String Pin1 = "";
public String Magazine = "";
public String Feeder = "";
public int StepWidth = 0;
public String ZACC = "";
public String YACC = "";
public int Duration = 0;
public int Frequency = 0;
public int Amplitude = 0;
public String Lock = "";
public String MSL = "";
public boolean MSLWatch = false;
public String MSLDate = "2016-09-23T00:00:00";
public String DryDate = "2016-09-23T00:00:00";
public String Expiry = "0001-01-01T00:00:00";
public int Core = 0;
public int TapeHeight = 0;
public String C_Order = "";
/**
* 唯一码后面的几个字符串
*/
public String Manufactur = "";
public String MReference = "";
public String MBarcode = "";
public String Batch;
/**
* 使用条码中的最后一个字段
*/
public String Custom1;
public String Custom2 = "";
public String Custom3 = "";
public String Custom4 = "";
public String Custom5 = "";
public String Custom6 = "";
}
public static class JobListInformation{
public String ID;
public String Name;
public String CreateDate;
public String CreateTime;
@XmlElementWrapper(name = "List")
@XmlElement(name = "JobListItem")
public List<JobListItem> jobListItems;
public void addItem(String barcode, String pn){
if(jobListItems == null){
jobListItems = new ArrayList<>();
}
JobListItem item = new JobListItem();
item.Article = pn;
item.Carrier = barcode;
jobListItems.add(item);
}
}
public static class JobListItem{
public String Article;
public String Carrier;
}
//Tower详细信息
public static class TowerDetialImforation
{
public String TowerID; //机台编号
public boolean DoorIsClosed; //机台门已关上
public boolean LightYellow; //机台三色灯_黄灯
public boolean LightGreen; //机台三色灯_绿灯
public boolean LightRed; //机台三色灯_红灯
public int StatusCode; //机台状态代码(厂商自行定义 Ex:1.Ready、2.未开机、3.卡料、……)
public String StatusDescription; //机台状态描述(对上述状态代码的描述)
public MaterialState Material; //入料口料状态信息(详细内容见MaterialState类)
@XmlElementWrapper(name = "Slots")
@XmlElement(name = "Slot")
public List<Pos> Storages; //机台仓储信息(详细内容见Slot类)
}
//入料口料状态信息
public static class MaterialState
{
public boolean Exist; //入料口有料感应
public String State; //入料口料状态(枚举States:Loading/Unloading/Unloaded/LoadNG)
public String Barcode2D; //入料口料二维码(出料时要有)
public String Message; //LoadNG入料失败原因
}
//入料口料卷状态
public static enum States
{
Loading, //正在入料
Unloading, //正在出料
Unloaded, //出料完成
LoadNG//入料失败
}
}