提交 | 用户 | 时间
|
d43481
|
1 |
package cn.stylefeng.guns.plcserver.callback; |
C |
2 |
|
|
3 |
|
|
4 |
import cn.stylefeng.guns.modular.bs.collectionParamConf.model.params.CollectionParamConfParam; |
|
5 |
import cn.stylefeng.guns.modular.bs.collectionParamConf.model.result.CollectionParamConfResult; |
|
6 |
import cn.stylefeng.guns.modular.bs.collectionParamConf.service.CollectionParamConfService; |
|
7 |
import cn.stylefeng.guns.modular.bs.equipmentInfo.model.params.EquipmentInfoParam; |
|
8 |
import cn.stylefeng.guns.modular.bs.equipmentInfo.model.result.EquipmentInfoResult; |
|
9 |
import cn.stylefeng.guns.modular.bs.equipmentInfo.service.EquipmentInfoService; |
|
10 |
import cn.stylefeng.guns.modular.bs.locationInfo.model.params.LocationInfoParam; |
|
11 |
import cn.stylefeng.guns.modular.bs.locationInfo.model.result.LocationInfoResult; |
|
12 |
import cn.stylefeng.guns.modular.bs.locationInfo.service.LocationInfoService; |
|
13 |
import cn.stylefeng.guns.modular.cm.paramCollection.model.params.ParamCollectionParam; |
|
14 |
import cn.stylefeng.guns.modular.cm.paramCollection.service.ParamCollectionService; |
|
15 |
import cn.stylefeng.guns.modular.cm.passingStationCollection.model.params.PassingStationCollectionParam; |
|
16 |
import cn.stylefeng.guns.modular.cm.passingStationCollection.service.PassingStationCollectionService; |
|
17 |
import cn.stylefeng.guns.modular.dq.materialTraceability.model.params.MaterialTraceabilityParam; |
|
18 |
import cn.stylefeng.guns.modular.dq.materialTraceability.service.MaterialTraceabilityService; |
|
19 |
import cn.stylefeng.guns.modular.em.equipmentAlarm.model.params.EquipmentAlarmParam; |
|
20 |
import cn.stylefeng.guns.modular.em.equipmentAlarm.service.EquipmentAlarmService; |
|
21 |
import cn.stylefeng.guns.modular.em.equipmentStatus.model.params.EquipmentStatusParam; |
|
22 |
import cn.stylefeng.guns.modular.em.equipmentStatus.model.result.EquipmentStatusResult; |
|
23 |
import cn.stylefeng.guns.modular.em.equipmentStatus.service.EquipmentStatusService; |
|
24 |
import cn.stylefeng.guns.modular.gm.greaseManage.service.GreaseManageService; |
|
25 |
import cn.stylefeng.guns.modular.om.productionOrdeInfo.model.params.ProductionOrdeInfoParam; |
|
26 |
import cn.stylefeng.guns.modular.om.productionOrdeInfo.model.result.ProductionOrdeInfoResult; |
|
27 |
import cn.stylefeng.guns.modular.om.productionOrdeInfo.service.ProductionOrdeInfoService; |
|
28 |
import cn.stylefeng.guns.modular.om.productionOrderBatchInfo.model.params.ProductionOrderBatchInfoParam; |
|
29 |
import cn.stylefeng.guns.modular.om.productionOrderBatchInfo.model.result.ProductionOrderBatchInfoResult; |
|
30 |
import cn.stylefeng.guns.modular.om.productionOrderBatchInfo.service.ProductionOrderBatchInfoService; |
|
31 |
import cn.stylefeng.guns.modular.om.productionOrderRecords.model.params.ProductionOrderRecordsParam; |
|
32 |
import cn.stylefeng.guns.modular.om.productionOrderRecords.model.result.ProductionOrderRecordsResult; |
|
33 |
import cn.stylefeng.guns.modular.om.productionOrderRecords.service.ProductionOrderRecordsService; |
|
34 |
import cn.stylefeng.guns.modular.sc.repairManageInfo.model.params.RepairManageInfoParam; |
|
35 |
import cn.stylefeng.guns.modular.sc.repairManageInfo.model.result.RepairManageInfoResult; |
|
36 |
import cn.stylefeng.guns.modular.sc.repairManageInfo.service.RepairManageInfoService; |
|
37 |
import cn.stylefeng.guns.modular.sc.serialNumbersConf.model.params.SerialNumbersConfParam; |
|
38 |
import cn.stylefeng.guns.modular.sc.serialNumbersConf.model.result.SerialNumbersConfResult; |
|
39 |
import cn.stylefeng.guns.modular.sc.serialNumbersConf.service.SerialNumbersConfService; |
|
40 |
import cn.stylefeng.guns.plcserver.opc.GlobalVariable; |
|
41 |
import cn.stylefeng.guns.plcserver.opc.OPCElement; |
|
42 |
import cn.stylefeng.guns.plcserver.opc.unit.SFCCodeTool; |
|
43 |
import cn.stylefeng.guns.plcserver.tool.DateTool; |
|
44 |
import cn.stylefeng.guns.plcserver.tool.LogUtil; |
|
45 |
import com.kangaroohy.milo.model.ReadWriteEntity; |
|
46 |
import com.kangaroohy.milo.runner.subscription.SubscriptionCallback; |
|
47 |
import com.kangaroohy.milo.service.MiloService; |
|
48 |
import org.apache.commons.lang3.StringUtils; |
|
49 |
import org.apache.log4j.Logger; |
|
50 |
import org.springframework.beans.factory.annotation.Autowired; |
|
51 |
import org.springframework.stereotype.Component; |
|
52 |
|
|
53 |
import java.util.ArrayList; |
|
54 |
import java.util.Calendar; |
|
55 |
import java.util.Date; |
|
56 |
import java.util.List; |
|
57 |
|
|
58 |
@Component |
|
59 |
public class InitCallback implements SubscriptionCallback { |
|
60 |
|
|
61 |
public MiloService miloService; |
|
62 |
|
|
63 |
@Autowired |
|
64 |
public ProductionOrdeInfoService productionOrdeInfoService; |
|
65 |
@Autowired |
|
66 |
public PassingStationCollectionService passingStationCollectionService; |
|
67 |
@Autowired |
|
68 |
public ParamCollectionService paramCollectionService; |
|
69 |
@Autowired |
|
70 |
public CollectionParamConfService collectionParamConfService; |
|
71 |
@Autowired |
|
72 |
public SerialNumbersConfService serialNumbersConfService; |
|
73 |
@Autowired |
|
74 |
private EquipmentStatusService equipmentStatusService; |
|
75 |
|
|
76 |
@Autowired |
|
77 |
private EquipmentAlarmService equipmentAlarmService; |
|
78 |
@Autowired |
|
79 |
private MaterialTraceabilityService materialTraceabilityService; |
|
80 |
@Autowired |
|
81 |
private EquipmentInfoService equipmentInfoService; |
|
82 |
@Autowired |
|
83 |
private RepairManageInfoService repairManageInfoService; |
|
84 |
|
|
85 |
@Autowired |
|
86 |
private LocationInfoService locationInfoService; |
|
87 |
|
|
88 |
@Autowired |
|
89 |
private GreaseManageService greaseManageService; |
|
90 |
|
|
91 |
@Autowired |
|
92 |
private ProductionOrderRecordsService productionOrderRecordsService; |
|
93 |
|
|
94 |
@Autowired |
|
95 |
private ProductionOrderBatchInfoService productionOrderBatchInfoService; |
|
96 |
|
|
97 |
private static Logger logger; |
|
98 |
LogUtil logUtil = new LogUtil(); |
|
99 |
static { |
|
100 |
logger = Logger.getLogger(InitCallback.class); |
|
101 |
} |
|
102 |
|
|
103 |
OP010Callback OP010Callback; |
|
104 |
OP020Callback OP020Callback; |
|
105 |
OP030Callback OP030Callback; |
|
106 |
OP040Callback OP040Callback; |
|
107 |
OP050Callback OP050Callback; |
|
108 |
OP070Callback OP070Callback; |
|
109 |
OP080Callback OP080Callback; |
|
110 |
OP090Callback OP090Callback; |
|
111 |
OP100Callback OP100Callback; |
|
112 |
OP110Callback OP110Callback; |
|
113 |
OP120Callback OP120Callback; |
|
114 |
OP120BCallback OP120BCallback; |
|
115 |
OP130Callback OP130Callback; |
|
116 |
OP130BCallback OP130BCallback; |
|
117 |
OP140Callback OP140Callback; |
|
118 |
OP150Callback OP150Callback; |
|
119 |
OP160Callback OP160Callback; |
|
120 |
OP170Callback OP170Callback; |
|
121 |
BOP010Callback BOP010Callback; |
|
122 |
BOP020Callback BOP020Callback; |
|
123 |
BOP030Callback BOP030Callback; |
|
124 |
BOP030BCallback BOP030BCallback; |
|
125 |
BOP040Callback BOP040Callback; |
|
126 |
BOP040BCallback BOP040BCallback; |
|
127 |
COP010Callback COP010Callback; |
|
128 |
COP020Callback COP020Callback; |
|
129 |
COP030Callback COP030Callback; |
|
130 |
DOP010Callback DOP010Callback; |
|
131 |
DOP020Callback DOP020Callback; |
|
132 |
EOP010Callback EOP010Callback; |
|
133 |
EOP020Callback EOP020Callback; |
|
134 |
EOP030Callback EOP030Callback; |
|
135 |
EOP040Callback EOP040Callback; |
|
136 |
EOP050Callback EOP050Callback; |
|
137 |
EOP060Callback EOP060Callback; |
|
138 |
EOP070Callback EOP070Callback; |
|
139 |
EOP080Callback EOP080Callback; |
|
140 |
EOP090Callback EOP090Callback; |
|
141 |
EOP090BCallback EOP090BCallback; |
|
142 |
|
|
143 |
StateCallback StateCallback; |
|
144 |
|
|
145 |
|
|
146 |
public InitCallback(MiloService miloService, |
|
147 |
ProductionOrdeInfoService productionOrdeInfoService, |
|
148 |
PassingStationCollectionService passingStationCollectionService, |
|
149 |
ParamCollectionService paramCollectionService, |
|
150 |
CollectionParamConfService collectionParamConfService, |
|
151 |
SerialNumbersConfService serialNumbersConfService, |
|
152 |
EquipmentStatusService equipmentStatusService, |
|
153 |
EquipmentAlarmService equipmentAlarmService, |
|
154 |
MaterialTraceabilityService materialTraceabilityService, |
|
155 |
EquipmentInfoService equipmentInfoService, |
|
156 |
RepairManageInfoService repairManageInfoService, |
|
157 |
LocationInfoService locationInfoService, |
|
158 |
GreaseManageService greaseManageService, |
|
159 |
ProductionOrderRecordsService productionOrderRecordsService, |
|
160 |
ProductionOrderBatchInfoService productionOrderBatchInfoService) { |
|
161 |
this.miloService = miloService; |
|
162 |
this.productionOrdeInfoService = productionOrdeInfoService; |
|
163 |
this.passingStationCollectionService = passingStationCollectionService; |
|
164 |
this.paramCollectionService = paramCollectionService; |
|
165 |
this.collectionParamConfService = collectionParamConfService; |
|
166 |
this.serialNumbersConfService = serialNumbersConfService; |
|
167 |
this.equipmentStatusService = equipmentStatusService; |
|
168 |
this.equipmentAlarmService = equipmentAlarmService; |
|
169 |
this.materialTraceabilityService = materialTraceabilityService; |
|
170 |
this.equipmentInfoService = equipmentInfoService; |
|
171 |
this.repairManageInfoService = repairManageInfoService; |
|
172 |
this.locationInfoService = locationInfoService; |
|
173 |
this.greaseManageService = greaseManageService; |
|
174 |
this.productionOrderRecordsService = productionOrderRecordsService; |
|
175 |
this.productionOrderBatchInfoService = productionOrderBatchInfoService; |
|
176 |
|
|
177 |
OP010Callback = new OP010Callback(miloService,productionOrdeInfoService, |
|
178 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
179 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
180 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
181 |
productionOrderBatchInfoService); |
|
182 |
OP020Callback = new OP020Callback(miloService,productionOrdeInfoService, |
|
183 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
184 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
185 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
186 |
productionOrderBatchInfoService); |
|
187 |
OP030Callback = new OP030Callback(miloService,productionOrdeInfoService, |
|
188 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
189 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
190 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
191 |
productionOrderBatchInfoService); |
|
192 |
OP040Callback = new OP040Callback(miloService,productionOrdeInfoService, |
|
193 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
194 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
195 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
196 |
productionOrderBatchInfoService); |
|
197 |
OP050Callback = new OP050Callback(miloService,productionOrdeInfoService, |
|
198 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
199 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
200 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
201 |
productionOrderBatchInfoService); |
|
202 |
/* OP060Callback = new OP060Callback(miloService,productionOrdeInfoService, |
|
203 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
204 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
205 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
206 |
productionOrderBatchInfoService);*/ |
|
207 |
OP070Callback = new OP070Callback(miloService,productionOrdeInfoService, |
|
208 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
209 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
210 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
211 |
productionOrderBatchInfoService); |
|
212 |
OP080Callback = new OP080Callback(miloService,productionOrdeInfoService, |
|
213 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
214 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
215 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
216 |
productionOrderBatchInfoService); |
|
217 |
OP090Callback = new OP090Callback(miloService,productionOrdeInfoService, |
|
218 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
219 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
220 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
221 |
productionOrderBatchInfoService); |
|
222 |
OP100Callback = new OP100Callback(miloService,productionOrdeInfoService, |
|
223 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
224 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
225 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
226 |
productionOrderBatchInfoService); |
|
227 |
OP110Callback = new OP110Callback(miloService,productionOrdeInfoService, |
|
228 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
229 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
230 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
231 |
productionOrderBatchInfoService); |
|
232 |
OP120Callback = new OP120Callback(miloService,productionOrdeInfoService, |
|
233 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
234 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
235 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
236 |
productionOrderBatchInfoService); |
|
237 |
OP120BCallback = new OP120BCallback(miloService,productionOrdeInfoService, |
|
238 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
239 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
240 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
241 |
productionOrderBatchInfoService); |
|
242 |
OP130Callback = new OP130Callback(miloService,productionOrdeInfoService, |
|
243 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
244 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
245 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
246 |
productionOrderBatchInfoService); |
|
247 |
OP130BCallback = new OP130BCallback(miloService,productionOrdeInfoService, |
|
248 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
249 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
250 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
251 |
productionOrderBatchInfoService); |
|
252 |
OP140Callback = new OP140Callback(miloService,productionOrdeInfoService, |
|
253 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
254 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
255 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
256 |
productionOrderBatchInfoService); |
|
257 |
OP150Callback = new OP150Callback(miloService,productionOrdeInfoService, |
|
258 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
259 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
260 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
261 |
productionOrderBatchInfoService); |
|
262 |
OP160Callback = new OP160Callback(miloService,productionOrdeInfoService, |
|
263 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
264 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
265 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
266 |
productionOrderBatchInfoService); |
|
267 |
OP170Callback = new OP170Callback(miloService,productionOrdeInfoService, |
|
268 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
269 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
270 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
271 |
productionOrderBatchInfoService); |
|
272 |
COP010Callback = new COP010Callback(miloService,productionOrdeInfoService, |
|
273 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
274 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
275 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
276 |
productionOrderBatchInfoService); |
|
277 |
COP020Callback = new COP020Callback(miloService,productionOrdeInfoService, |
|
278 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
279 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
280 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
281 |
productionOrderBatchInfoService); |
|
282 |
COP030Callback = new COP030Callback(miloService,productionOrdeInfoService, |
|
283 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
284 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
285 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
286 |
productionOrderBatchInfoService); |
|
287 |
BOP010Callback = new BOP010Callback(miloService,productionOrdeInfoService, |
|
288 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
289 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
290 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
291 |
productionOrderBatchInfoService); |
|
292 |
BOP020Callback = new BOP020Callback(miloService,productionOrdeInfoService, |
|
293 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
294 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
295 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
296 |
productionOrderBatchInfoService); |
|
297 |
BOP030Callback = new BOP030Callback(miloService,productionOrdeInfoService, |
|
298 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
299 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
300 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
301 |
productionOrderBatchInfoService); |
|
302 |
BOP030BCallback = new BOP030BCallback(miloService,productionOrdeInfoService, |
|
303 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
304 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
305 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
306 |
productionOrderBatchInfoService); |
|
307 |
BOP040Callback = new BOP040Callback(miloService,productionOrdeInfoService, |
|
308 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
309 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
310 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
311 |
productionOrderBatchInfoService); |
|
312 |
BOP040BCallback = new BOP040BCallback(miloService,productionOrdeInfoService, |
|
313 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
314 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
315 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
316 |
productionOrderBatchInfoService); |
|
317 |
DOP010Callback = new DOP010Callback(miloService,productionOrdeInfoService, |
|
318 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
319 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
320 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
321 |
productionOrderBatchInfoService); |
|
322 |
DOP020Callback = new DOP020Callback(miloService,productionOrdeInfoService, |
|
323 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
324 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
325 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
326 |
productionOrderBatchInfoService); |
|
327 |
EOP010Callback = new EOP010Callback(miloService,productionOrdeInfoService, |
|
328 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
329 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
330 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
331 |
productionOrderBatchInfoService); |
|
332 |
EOP020Callback = new EOP020Callback(miloService,productionOrdeInfoService, |
|
333 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
334 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
335 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
336 |
productionOrderBatchInfoService); |
|
337 |
EOP030Callback = new EOP030Callback(miloService,productionOrdeInfoService, |
|
338 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
339 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
340 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
341 |
productionOrderBatchInfoService); |
|
342 |
EOP040Callback = new EOP040Callback(miloService,productionOrdeInfoService, |
|
343 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
344 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
345 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
346 |
productionOrderBatchInfoService); |
|
347 |
EOP050Callback = new EOP050Callback(miloService,productionOrdeInfoService, |
|
348 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
349 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
350 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
351 |
productionOrderBatchInfoService); |
|
352 |
EOP060Callback = new EOP060Callback(miloService,productionOrdeInfoService, |
|
353 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
354 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
355 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
356 |
productionOrderBatchInfoService); |
|
357 |
EOP070Callback = new EOP070Callback(miloService,productionOrdeInfoService, |
|
358 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
359 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
360 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
361 |
productionOrderBatchInfoService); |
|
362 |
EOP080Callback = new EOP080Callback(miloService,productionOrdeInfoService, |
|
363 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
364 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
365 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
366 |
productionOrderBatchInfoService); |
|
367 |
EOP090Callback = new EOP090Callback(miloService,productionOrdeInfoService, |
|
368 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
369 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
370 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
371 |
productionOrderBatchInfoService); |
|
372 |
EOP090BCallback = new EOP090BCallback(miloService,productionOrdeInfoService, |
|
373 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
374 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
375 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
376 |
productionOrderBatchInfoService); |
|
377 |
|
|
378 |
StateCallback = new StateCallback(miloService,productionOrdeInfoService, |
|
379 |
passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, |
|
380 |
equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, |
|
381 |
repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService, |
|
382 |
productionOrderBatchInfoService); |
|
383 |
} |
|
384 |
|
|
385 |
|
|
386 |
|
|
387 |
@Override |
|
388 |
public void onSubscribe(String identifier, Object value) { |
|
389 |
String ecpStr = "";//异常记录标记 |
|
390 |
try { |
|
391 |
if(null != value) { |
|
392 |
//OP010 |
|
393 |
//心跳 |
|
394 |
if (identifier.equals(OPCElement.OP010_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
395 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP010_F_HEART_BEAT, true); |
|
396 |
miloService.writeToOpcUa(entity); |
|
397 |
} |
|
398 |
//PLC进站 |
|
399 |
else if (identifier.equals(OPCElement.OP010_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
400 |
String isRepair = miloService.readFromOpcUa(OPCElement.OP010_P_REPAIR).getValue().toString();//是否返修 |
|
401 |
if (isRepair.equals("true")) { |
|
402 |
OP010Callback.handleRepair(); |
|
403 |
} else { |
|
404 |
OP010Callback.handleOrder(); |
|
405 |
} |
|
406 |
} |
|
407 |
//PLC出站 |
|
408 |
else if (identifier.equals(OPCElement.OP010_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
409 |
OP010Callback.handleFinsh(); |
|
410 |
OP010Callback.handleMaterial(); |
|
411 |
} |
|
412 |
|
|
413 |
//OP020 |
|
414 |
//心跳 |
|
415 |
else if (identifier.equals(OPCElement.OP020_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
416 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP020_F_HEART_BEAT, true); |
|
417 |
miloService.writeToOpcUa(entity); |
|
418 |
} |
|
419 |
//PLC进站 |
|
420 |
else if (identifier.equals(OPCElement.OP020_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
421 |
OP020Callback.handleOrder(); |
|
422 |
} |
|
423 |
//PLC出站 |
|
424 |
else if (identifier.equals(OPCElement.OP020_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
425 |
OP020Callback.handleFinsh(); |
|
426 |
OP020Callback.handleInfo(); |
73bc06
|
427 |
OP020Callback.handleMaterial(); |
C |
428 |
|
d43481
|
429 |
} |
C |
430 |
|
|
431 |
//OP030 |
|
432 |
//心跳 |
|
433 |
else if (identifier.equals(OPCElement.OP030_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
434 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP030_F_HEART_BEAT, true); |
|
435 |
miloService.writeToOpcUa(entity); |
|
436 |
} |
|
437 |
//PLC进站 |
|
438 |
else if (identifier.equals(OPCElement.OP030_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
439 |
OP030Callback.handleOrder(); |
|
440 |
} |
|
441 |
//PLC出站 |
|
442 |
else if (identifier.equals(OPCElement.OP030_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
443 |
OP030Callback.handleFinsh(); |
|
444 |
OP030Callback.handleInfo(); |
73bc06
|
445 |
OP030Callback.handleMaterial(); |
C |
446 |
|
d43481
|
447 |
} |
C |
448 |
|
|
449 |
//OP040 |
|
450 |
//心跳 |
|
451 |
else if (identifier.equals(OPCElement.OP040_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
452 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP040_F_HEART_BEAT, true); |
|
453 |
miloService.writeToOpcUa(entity); |
|
454 |
} |
|
455 |
//PLC进站 |
|
456 |
else if (identifier.equals(OPCElement.OP040_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
457 |
OP040Callback.handleOrder(); |
|
458 |
} |
|
459 |
//PLC出站 |
|
460 |
else if (identifier.equals(OPCElement.OP040_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
461 |
OP040Callback.handleFinsh(); |
|
462 |
OP040Callback.handleInfo(); |
73bc06
|
463 |
OP040Callback.handleMaterial(); |
C |
464 |
|
d43481
|
465 |
} |
C |
466 |
|
|
467 |
//OP050 |
|
468 |
//心跳 |
|
469 |
else if (identifier.equals(OPCElement.OP050_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
470 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP050_F_HEART_BEAT, true); |
|
471 |
miloService.writeToOpcUa(entity); |
|
472 |
} |
|
473 |
//PLC进站 |
|
474 |
else if (identifier.equals(OPCElement.OP050_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
475 |
OP050Callback.handleOrder(); |
|
476 |
} |
|
477 |
//PLC出站 |
|
478 |
else if (identifier.equals(OPCElement.OP050_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
479 |
OP050Callback.handleFinsh(); |
ff13e6
|
480 |
OP050Callback.handleInfo(); |
C |
481 |
OP050Callback.handleMaterial(); |
d43481
|
482 |
} |
C |
483 |
|
|
484 |
//OP070 |
|
485 |
//心跳 |
|
486 |
else if (identifier.equals(OPCElement.OP070_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
487 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP070_F_HEART_BEAT, true); |
|
488 |
miloService.writeToOpcUa(entity); |
|
489 |
} |
|
490 |
//PLC进站 |
|
491 |
else if (identifier.equals(OPCElement.OP070_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
492 |
OP070Callback.handleOrder(); |
|
493 |
} |
|
494 |
//PLC出站 |
|
495 |
else if (identifier.equals(OPCElement.OP070_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
496 |
OP070Callback.handleFinsh(); |
|
497 |
OP070Callback.handleMaterial(); |
|
498 |
OP070Callback.handleInfo(); |
|
499 |
} |
|
500 |
|
|
501 |
//OP080 |
|
502 |
//心跳 |
|
503 |
else if (identifier.equals(OPCElement.OP080_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
504 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP080_F_HEART_BEAT, true); |
|
505 |
miloService.writeToOpcUa(entity); |
|
506 |
} |
|
507 |
//PLC进站 |
|
508 |
else if (identifier.equals(OPCElement.OP080_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
509 |
String isRepair = miloService.readFromOpcUa(OPCElement.OP080_P_REPAIR).getValue().toString();//是否返修 |
|
510 |
if (isRepair.equals("true")) { |
|
511 |
OP080Callback.handleRepair(); |
|
512 |
} else { |
|
513 |
OP080Callback.handleOrder(); |
|
514 |
} |
|
515 |
} |
|
516 |
//PLC出站 |
|
517 |
else if (identifier.equals(OPCElement.OP080_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
518 |
OP080Callback.handleFinsh(); |
|
519 |
OP080Callback.handleInfo(); |
6dadf3
|
520 |
OP080Callback.handleMaterial(); |
C |
521 |
|
d43481
|
522 |
} |
C |
523 |
|
|
524 |
//OP090 |
|
525 |
//心跳 |
|
526 |
else if (identifier.equals(OPCElement.OP090_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
527 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP090_F_HEART_BEAT, true); |
|
528 |
miloService.writeToOpcUa(entity); |
|
529 |
} |
|
530 |
//PLC进站 |
|
531 |
else if (identifier.equals(OPCElement.OP090_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
532 |
OP090Callback.handleOrder(); |
6dadf3
|
533 |
} |
C |
534 |
//PLC出站 |
|
535 |
else if (identifier.equals(OPCElement.OP090_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
ff13e6
|
536 |
OP090Callback.handleFinsh(); |
6dadf3
|
537 |
OP090Callback.handleInfo(); |
73bc06
|
538 |
OP090Callback.handleMaterial(); |
C |
539 |
|
ff13e6
|
540 |
|
6dadf3
|
541 |
} |
C |
542 |
|
|
543 |
//OP100 |
|
544 |
//心跳 |
|
545 |
else if (identifier.equals(OPCElement.OP100_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
546 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP100_F_HEART_BEAT, true); |
|
547 |
miloService.writeToOpcUa(entity); |
|
548 |
} |
|
549 |
//PLC进站 |
|
550 |
else if (identifier.equals(OPCElement.OP100_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
551 |
OP100Callback.handleOrder(); |
d43481
|
552 |
} |
C |
553 |
//PLC出站 |
|
554 |
else if (identifier.equals(OPCElement.OP100_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
555 |
OP100Callback.handleFinsh(); |
73bc06
|
556 |
OP100Callback.handleInfo(); |
C |
557 |
OP100Callback.handleMaterial(); |
|
558 |
|
|
559 |
|
d43481
|
560 |
} |
C |
561 |
|
|
562 |
//OP110 |
|
563 |
//心跳 |
|
564 |
else if (identifier.equals(OPCElement.OP110_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
565 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP110_F_HEART_BEAT, true); |
|
566 |
miloService.writeToOpcUa(entity); |
|
567 |
} |
|
568 |
//PLC进站 |
|
569 |
else if (identifier.equals(OPCElement.OP110_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
570 |
OP110Callback.handleOrder(); |
|
571 |
} |
|
572 |
//PLC出站 |
|
573 |
else if (identifier.equals(OPCElement.OP110_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
574 |
OP110Callback.handleFinsh(); |
|
575 |
OP110Callback.handleInfo(); |
73bc06
|
576 |
OP110Callback.handleMaterial(); |
C |
577 |
|
d43481
|
578 |
} |
C |
579 |
|
|
580 |
//OP120 |
|
581 |
//心跳 |
|
582 |
else if (identifier.equals(OPCElement.OP120_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
583 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP120_F_HEART_BEAT, true); |
|
584 |
miloService.writeToOpcUa(entity); |
|
585 |
} |
|
586 |
//PLC进站 |
|
587 |
else if (identifier.equals(OPCElement.OP120_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
588 |
OP120Callback.handleOrder(); |
|
589 |
} |
|
590 |
//PLC出站 |
|
591 |
else if (identifier.equals(OPCElement.OP120_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
592 |
OP120Callback.handleFinsh(); |
|
593 |
OP120Callback.handleInfo(); |
73bc06
|
594 |
OP120Callback.handleMaterial(); |
C |
595 |
|
d43481
|
596 |
} |
C |
597 |
|
|
598 |
//OP120B |
|
599 |
//心跳 |
|
600 |
else if (identifier.equals(OPCElement.OP120B_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
601 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP120B_F_HEART_BEAT, true); |
|
602 |
miloService.writeToOpcUa(entity); |
|
603 |
} |
|
604 |
//PLC进站 |
|
605 |
else if (identifier.equals(OPCElement.OP120B_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
606 |
OP120BCallback.handleOrder(); |
|
607 |
} |
|
608 |
//PLC出站 |
|
609 |
else if (identifier.equals(OPCElement.OP120B_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
610 |
OP120BCallback.handleFinsh(); |
6dadf3
|
611 |
//OP120BCallback.handleMaterial(); |
C |
612 |
//OP120BCallback.handleInfo(); |
d43481
|
613 |
} |
C |
614 |
|
|
615 |
//OP130 |
|
616 |
//心跳 |
|
617 |
else if (identifier.equals(OPCElement.OP130_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
618 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP130_F_HEART_BEAT, true); |
|
619 |
miloService.writeToOpcUa(entity); |
|
620 |
} |
|
621 |
//PLC进站 |
|
622 |
else if (identifier.equals(OPCElement.OP130_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
623 |
OP130Callback.handleOrder(); |
|
624 |
} |
|
625 |
//PLC出站 |
|
626 |
else if (identifier.equals(OPCElement.OP130_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
627 |
OP130Callback.handleFinsh(); |
|
628 |
OP130Callback.handleInfo(); |
73bc06
|
629 |
OP130Callback.handleMaterial(); |
C |
630 |
|
d43481
|
631 |
} |
C |
632 |
|
|
633 |
//OP130B |
|
634 |
//心跳 |
|
635 |
else if (identifier.equals(OPCElement.OP130B_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
636 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP130B_F_HEART_BEAT, true); |
|
637 |
miloService.writeToOpcUa(entity); |
|
638 |
} |
|
639 |
//PLC进站 |
|
640 |
else if (identifier.equals(OPCElement.OP130B_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
641 |
OP130BCallback.handleOrder(); |
|
642 |
} |
|
643 |
//PLC出站 |
|
644 |
else if (identifier.equals(OPCElement.OP130B_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
645 |
OP130BCallback.handleFinsh(); |
|
646 |
OP130BCallback.handleInfo(); |
73bc06
|
647 |
OP130BCallback.handleMaterial(); |
C |
648 |
|
d43481
|
649 |
} |
C |
650 |
|
|
651 |
//OP140 |
|
652 |
//心跳 |
|
653 |
else if (identifier.equals(OPCElement.OP140_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
654 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP140_F_HEART_BEAT, true); |
|
655 |
miloService.writeToOpcUa(entity); |
|
656 |
} |
|
657 |
//PLC进站 |
|
658 |
else if (identifier.equals(OPCElement.OP140_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
659 |
OP140Callback.handleOrder(); |
|
660 |
} |
|
661 |
//PLC出站 |
|
662 |
else if (identifier.equals(OPCElement.OP140_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
663 |
OP140Callback.handleFinsh(); |
|
664 |
OP140Callback.handleInfo(); |
73bc06
|
665 |
OP140Callback.handleMaterial(); |
C |
666 |
|
d43481
|
667 |
} |
C |
668 |
|
|
669 |
//OP150 |
|
670 |
//心跳 |
|
671 |
else if (identifier.equals(OPCElement.OP150_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
672 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP150_F_HEART_BEAT, true); |
|
673 |
miloService.writeToOpcUa(entity); |
|
674 |
} |
|
675 |
//PLC进站 |
|
676 |
else if (identifier.equals(OPCElement.OP150_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
677 |
OP150Callback.handleOrder(); |
|
678 |
} |
|
679 |
//PLC出站 |
|
680 |
else if (identifier.equals(OPCElement.OP150_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
681 |
OP150Callback.handleFinsh(); |
|
682 |
OP150Callback.handleMaterial(); |
|
683 |
OP150Callback.handleInfo(); |
|
684 |
} |
|
685 |
|
|
686 |
//OP160 |
|
687 |
//心跳 |
|
688 |
else if (identifier.equals(OPCElement.OP160_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
689 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP160_F_HEART_BEAT, true); |
|
690 |
miloService.writeToOpcUa(entity); |
|
691 |
} |
|
692 |
//PLC进站 |
|
693 |
else if (identifier.equals(OPCElement.OP160_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
694 |
OP160Callback.handleOrder(); |
|
695 |
} |
|
696 |
//PLC出站 |
|
697 |
else if (identifier.equals(OPCElement.OP160_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
698 |
OP160Callback.handleFinsh(); |
|
699 |
OP160Callback.handleMaterial(); |
|
700 |
OP160Callback.handleInfo(); |
|
701 |
} |
|
702 |
|
|
703 |
//OP170 |
|
704 |
//心跳 |
|
705 |
else if (identifier.equals(OPCElement.OP170_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
706 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP170_F_HEART_BEAT, true); |
|
707 |
miloService.writeToOpcUa(entity); |
|
708 |
} |
|
709 |
//PLC进站 |
|
710 |
else if (identifier.equals(OPCElement.OP170_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
711 |
OP170Callback.handleOrder(); |
|
712 |
} |
|
713 |
//PLC出站 |
|
714 |
else if (identifier.equals(OPCElement.OP170_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
715 |
OP170Callback.handleFinsh(); |
|
716 |
OP170Callback.handleMaterial(); |
|
717 |
//OP170Callback.handleInfo(); |
|
718 |
} |
|
719 |
|
|
720 |
//BOP010 |
|
721 |
//心跳 |
|
722 |
else if (identifier.equals(OPCElement.BOP010_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
723 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.BOP010_F_HEART_BEAT, true); |
|
724 |
miloService.writeToOpcUa(entity); |
|
725 |
} |
|
726 |
//PLC进站 |
|
727 |
else if (identifier.equals(OPCElement.BOP010_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
728 |
String isRepair = miloService.readFromOpcUa(OPCElement.BOP010_P_REPAIR).getValue().toString();//是否返修 |
|
729 |
if (isRepair.equals("true")) { |
|
730 |
BOP010Callback.handleRepair(); |
|
731 |
} else { |
|
732 |
BOP010Callback.handleOrder(); |
|
733 |
} |
|
734 |
} |
|
735 |
//PLC出站 |
|
736 |
else if (identifier.equals(OPCElement.BOP010_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
737 |
BOP010Callback.handleFinsh(); |
|
738 |
BOP010Callback.handleMaterial(); |
|
739 |
//BOP010Callback.handleInfo(); |
|
740 |
} |
|
741 |
|
|
742 |
|
|
743 |
//BOP020 |
|
744 |
//心跳 |
|
745 |
else if (identifier.equals(OPCElement.BOP020_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
746 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.BOP020_F_HEART_BEAT, true); |
|
747 |
miloService.writeToOpcUa(entity); |
|
748 |
} |
|
749 |
//PLC进站 |
|
750 |
else if (identifier.equals(OPCElement.BOP020_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
751 |
BOP020Callback.handleOrder(); |
|
752 |
} |
|
753 |
//PLC出站 |
|
754 |
else if (identifier.equals(OPCElement.BOP020_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
755 |
BOP020Callback.handleFinsh(); |
|
756 |
BOP020Callback.handleInfo(); |
73bc06
|
757 |
BOP020Callback.handleMaterial(); |
d43481
|
758 |
} |
C |
759 |
|
|
760 |
|
|
761 |
//BOP030 |
|
762 |
//心跳 |
|
763 |
else if (identifier.equals(OPCElement.BOP030_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
764 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.BOP030_F_HEART_BEAT, true); |
|
765 |
miloService.writeToOpcUa(entity); |
|
766 |
} |
|
767 |
//PLC进站 |
|
768 |
else if (identifier.equals(OPCElement.BOP030_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
769 |
BOP030Callback.handleOrder(); |
|
770 |
} |
|
771 |
//PLC出站 |
|
772 |
else if (identifier.equals(OPCElement.BOP030_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
773 |
BOP030Callback.handleFinsh(); |
|
774 |
BOP030Callback.handleInfo(); |
73bc06
|
775 |
BOP030Callback.handleMaterial(); |
C |
776 |
|
d43481
|
777 |
} |
C |
778 |
|
|
779 |
//BOP030B |
|
780 |
//心跳 |
|
781 |
else if (identifier.equals(OPCElement.BOP030B_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
782 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.BOP030B_F_HEART_BEAT, true); |
|
783 |
miloService.writeToOpcUa(entity); |
|
784 |
} |
|
785 |
//PLC进站 |
|
786 |
else if (identifier.equals(OPCElement.BOP030B_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
787 |
BOP030BCallback.handleOrder(); |
|
788 |
} |
|
789 |
//PLC出站 |
|
790 |
else if (identifier.equals(OPCElement.BOP030B_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
791 |
BOP030BCallback.handleFinsh(); |
|
792 |
//BOP030BCallback.handleMaterial(); |
|
793 |
//BOP030BCallback.handleInfo(); |
|
794 |
} |
|
795 |
|
|
796 |
//BOP040 |
|
797 |
//心跳 |
|
798 |
else if (identifier.equals(OPCElement.BOP040_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
799 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.BOP040_F_HEART_BEAT, true); |
|
800 |
miloService.writeToOpcUa(entity); |
|
801 |
} |
|
802 |
//PLC进站 |
|
803 |
else if (identifier.equals(OPCElement.BOP040_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
804 |
BOP040Callback.handleOrder(); |
|
805 |
} |
|
806 |
//PLC出站 |
|
807 |
else if (identifier.equals(OPCElement.BOP040_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
808 |
BOP040Callback.handleFinsh(); |
|
809 |
BOP040Callback.handleInfo(); |
73bc06
|
810 |
BOP040Callback.handleMaterial(); |
C |
811 |
|
d43481
|
812 |
} |
C |
813 |
|
|
814 |
//BOP040B |
|
815 |
//心跳 |
|
816 |
else if (identifier.equals(OPCElement.BOP040B_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
817 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.BOP040B_F_HEART_BEAT, true); |
|
818 |
miloService.writeToOpcUa(entity); |
|
819 |
} |
|
820 |
//PLC进站 |
|
821 |
else if (identifier.equals(OPCElement.BOP040B_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
822 |
BOP040BCallback.handleOrder(); |
|
823 |
} |
|
824 |
//PLC出站 |
|
825 |
else if (identifier.equals(OPCElement.BOP040B_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
826 |
BOP040BCallback.handleFinsh(); |
6dadf3
|
827 |
// BOP040BCallback.handleMaterial(); |
d43481
|
828 |
//BOP040BCallback.handleInfo(); |
C |
829 |
} |
|
830 |
|
|
831 |
|
|
832 |
//COP010 |
|
833 |
//心跳 |
|
834 |
else if (identifier.equals(OPCElement.COP010_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
835 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.COP010_F_HEART_BEAT, true); |
|
836 |
miloService.writeToOpcUa(entity); |
|
837 |
} |
|
838 |
//PLC进站 |
|
839 |
else if (identifier.equals(OPCElement.COP010_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
840 |
String isRepair = miloService.readFromOpcUa(OPCElement.COP010_P_REPAIR).getValue().toString();//是否返修 |
|
841 |
if (isRepair.equals("true")) { |
|
842 |
COP010Callback.handleRepair(); |
|
843 |
} else { |
|
844 |
COP010Callback.handleOrder(); |
|
845 |
} |
|
846 |
} |
|
847 |
//PLC出站 |
|
848 |
else if (identifier.equals(OPCElement.COP010_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
849 |
COP010Callback.handleFinsh(); |
|
850 |
COP010Callback.handleMaterial(); |
|
851 |
//COP010Callback.handleInfo(); |
|
852 |
} |
|
853 |
|
|
854 |
|
|
855 |
//COP020 |
|
856 |
//心跳 |
|
857 |
else if (identifier.equals(OPCElement.COP020_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
858 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.COP020_F_HEART_BEAT, true); |
|
859 |
miloService.writeToOpcUa(entity); |
|
860 |
} |
|
861 |
//PLC进站 |
|
862 |
else if (identifier.equals(OPCElement.COP020_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
863 |
COP020Callback.handleOrder(); |
|
864 |
} |
|
865 |
//PLC出站 |
|
866 |
else if (identifier.equals(OPCElement.COP020_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
867 |
COP020Callback.handleFinsh(); |
|
868 |
COP020Callback.handleInfo(); |
73bc06
|
869 |
COP020Callback.handleMaterial(); |
C |
870 |
|
d43481
|
871 |
} |
C |
872 |
|
|
873 |
|
|
874 |
//COP030 |
|
875 |
//心跳 |
|
876 |
else if (identifier.equals(OPCElement.COP030_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
877 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.COP030_F_HEART_BEAT, true); |
|
878 |
miloService.writeToOpcUa(entity); |
|
879 |
} |
|
880 |
//PLC进站 |
|
881 |
else if (identifier.equals(OPCElement.COP030_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
882 |
COP030Callback.handleOrder(); |
|
883 |
} |
|
884 |
//PLC出站 |
|
885 |
else if (identifier.equals(OPCElement.COP030_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
886 |
COP030Callback.handleFinsh(); |
|
887 |
COP030Callback.handleInfo(); |
73bc06
|
888 |
COP030Callback.handleMaterial(); |
C |
889 |
|
d43481
|
890 |
} |
C |
891 |
|
|
892 |
|
|
893 |
//DOP010 |
|
894 |
//心跳 |
|
895 |
else if (identifier.equals(OPCElement.DOP010_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
896 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.DOP010_F_HEART_BEAT, true); |
|
897 |
miloService.writeToOpcUa(entity); |
|
898 |
} |
|
899 |
//PLC进站 |
|
900 |
else if (identifier.equals(OPCElement.DOP010_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
901 |
String isRepair = miloService.readFromOpcUa(OPCElement.DOP010_P_REPAIR).getValue().toString();//是否返修 |
|
902 |
if (isRepair.equals("true")) { |
|
903 |
DOP010Callback.handleRepair(); |
|
904 |
} else { |
|
905 |
DOP010Callback.handleOrder(); |
|
906 |
} |
|
907 |
} |
|
908 |
//PLC出站 |
|
909 |
else if (identifier.equals(OPCElement.DOP010_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
910 |
DOP010Callback.handleFinsh(); |
|
911 |
DOP010Callback.handleMaterial(); |
|
912 |
//DOP010Callback.handleInfo(); |
|
913 |
} |
|
914 |
|
|
915 |
|
|
916 |
//DOP020 |
|
917 |
//心跳 |
|
918 |
else if (identifier.equals(OPCElement.DOP020_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
919 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.DOP020_F_HEART_BEAT, true); |
|
920 |
miloService.writeToOpcUa(entity); |
|
921 |
} |
|
922 |
//PLC进站 |
|
923 |
else if (identifier.equals(OPCElement.DOP020_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
924 |
DOP020Callback.handleOrder(); |
|
925 |
} |
|
926 |
//PLC出站 |
|
927 |
else if (identifier.equals(OPCElement.DOP020_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
928 |
DOP020Callback.handleFinsh(); |
|
929 |
DOP020Callback.handleInfo(); |
73bc06
|
930 |
DOP020Callback.handleMaterial(); |
C |
931 |
|
d43481
|
932 |
} |
C |
933 |
|
|
934 |
//EOP010 |
|
935 |
//心跳 |
|
936 |
else if (identifier.equals(OPCElement.EOP010_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
937 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.EOP010_F_HEART_BEAT, true); |
|
938 |
miloService.writeToOpcUa(entity); |
|
939 |
} |
|
940 |
//PLC进站 |
|
941 |
else if (identifier.equals(OPCElement.EOP010_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
942 |
EOP010Callback.handleOrder(); |
|
943 |
} |
|
944 |
//PLC出站 |
|
945 |
else if (identifier.equals(OPCElement.EOP010_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
946 |
EOP010Callback.handleFinsh(); |
|
947 |
EOP010Callback.handleInfo(); |
73bc06
|
948 |
EOP010Callback.handleMaterial(); |
C |
949 |
|
d43481
|
950 |
} |
C |
951 |
//EOP020 |
|
952 |
//心跳 |
|
953 |
else if (identifier.equals(OPCElement.EOP020_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
954 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.EOP020_F_HEART_BEAT, true); |
|
955 |
miloService.writeToOpcUa(entity); |
|
956 |
} |
|
957 |
//PLC进站 |
|
958 |
else if (identifier.equals(OPCElement.EOP020_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
959 |
EOP020Callback.handleOrder(); |
|
960 |
} |
|
961 |
//PLC出站 |
|
962 |
else if (identifier.equals(OPCElement.EOP020_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
963 |
EOP020Callback.handleFinsh(); |
|
964 |
EOP020Callback.handleInfo(); |
73bc06
|
965 |
EOP020Callback.handleMaterial(); |
C |
966 |
|
d43481
|
967 |
} |
C |
968 |
|
|
969 |
//EOP030 |
|
970 |
//心跳 |
|
971 |
else if (identifier.equals(OPCElement.EOP030_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
972 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.EOP030_F_HEART_BEAT, true); |
|
973 |
miloService.writeToOpcUa(entity); |
|
974 |
} |
|
975 |
//PLC进站 |
|
976 |
else if (identifier.equals(OPCElement.EOP030_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
977 |
EOP030Callback.handleOrder(); |
|
978 |
} |
|
979 |
//PLC出站 |
|
980 |
else if (identifier.equals(OPCElement.EOP030_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
981 |
EOP030Callback.handleFinsh(); |
|
982 |
EOP030Callback.handleInfo(); |
73bc06
|
983 |
EOP030Callback.handleMaterial(); |
C |
984 |
|
d43481
|
985 |
} |
C |
986 |
|
|
987 |
//EOP040 |
|
988 |
//心跳 |
|
989 |
else if (identifier.equals(OPCElement.EOP040_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
990 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.EOP040_F_HEART_BEAT, true); |
|
991 |
miloService.writeToOpcUa(entity); |
|
992 |
} |
|
993 |
//PLC进站 |
|
994 |
else if (identifier.equals(OPCElement.EOP040_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
995 |
EOP040Callback.handleOrder(); |
|
996 |
} |
|
997 |
//PLC出站 |
|
998 |
else if (identifier.equals(OPCElement.EOP040_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
999 |
EOP040Callback.handleFinsh(); |
|
1000 |
EOP040Callback.handleInfo(); |
73bc06
|
1001 |
EOP040Callback.handleMaterial(); |
C |
1002 |
|
d43481
|
1003 |
} |
C |
1004 |
|
|
1005 |
//EOP050 |
|
1006 |
//心跳 |
|
1007 |
else if (identifier.equals(OPCElement.EOP050_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
1008 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.EOP050_F_HEART_BEAT, true); |
|
1009 |
miloService.writeToOpcUa(entity); |
|
1010 |
} |
|
1011 |
//PLC进站 |
|
1012 |
else if (identifier.equals(OPCElement.EOP050_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
1013 |
EOP050Callback.handleOrder(); |
|
1014 |
} |
|
1015 |
//PLC出站 |
|
1016 |
else if (identifier.equals(OPCElement.EOP050_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
1017 |
EOP050Callback.handleFinsh(); |
|
1018 |
EOP050Callback.handleInfo(); |
73bc06
|
1019 |
EOP050Callback.handleMaterial(); |
C |
1020 |
|
d43481
|
1021 |
} |
C |
1022 |
|
|
1023 |
//EOP060 |
|
1024 |
//心跳 |
|
1025 |
else if (identifier.equals(OPCElement.EOP060_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
1026 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.EOP060_F_HEART_BEAT, true); |
|
1027 |
miloService.writeToOpcUa(entity); |
|
1028 |
} |
|
1029 |
//PLC进站 |
|
1030 |
else if (identifier.equals(OPCElement.EOP060_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
1031 |
EOP060Callback.handleOrder(); |
|
1032 |
} |
|
1033 |
//PLC出站 |
|
1034 |
else if (identifier.equals(OPCElement.EOP060_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
1035 |
EOP060Callback.handleFinsh(); |
|
1036 |
EOP060Callback.handleInfo(); |
73bc06
|
1037 |
EOP060Callback.handleMaterial(); |
C |
1038 |
|
d43481
|
1039 |
} |
C |
1040 |
|
|
1041 |
//EOP070 |
|
1042 |
//心跳 |
|
1043 |
else if (identifier.equals(OPCElement.EOP070_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
1044 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.EOP070_F_HEART_BEAT, true); |
|
1045 |
miloService.writeToOpcUa(entity); |
|
1046 |
} |
|
1047 |
//PLC进站 |
|
1048 |
else if (identifier.equals(OPCElement.EOP070_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
1049 |
EOP070Callback.handleOrder(); |
|
1050 |
} |
|
1051 |
//PLC出站 |
|
1052 |
else if (identifier.equals(OPCElement.EOP070_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
1053 |
EOP070Callback.handleFinsh(); |
|
1054 |
EOP070Callback.handleInfo(); |
73bc06
|
1055 |
EOP070Callback.handleMaterial(); |
C |
1056 |
|
d43481
|
1057 |
} |
C |
1058 |
|
|
1059 |
//EOP080 |
|
1060 |
//心跳 |
|
1061 |
else if (identifier.equals(OPCElement.EOP080_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
1062 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.EOP080_F_HEART_BEAT, true); |
|
1063 |
miloService.writeToOpcUa(entity); |
|
1064 |
} |
|
1065 |
//PLC进站 |
|
1066 |
else if (identifier.equals(OPCElement.EOP080_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
1067 |
EOP080Callback.handleOrder(); |
|
1068 |
} |
|
1069 |
//PLC出站 |
|
1070 |
else if (identifier.equals(OPCElement.EOP080_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
1071 |
EOP080Callback.handleFinsh(); |
|
1072 |
EOP080Callback.handleInfo(); |
73bc06
|
1073 |
EOP080Callback.handleMaterial(); |
C |
1074 |
|
d43481
|
1075 |
} |
C |
1076 |
|
|
1077 |
//EOP090 |
|
1078 |
//心跳 |
|
1079 |
else if (identifier.equals(OPCElement.EOP090_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
1080 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.EOP090_F_HEART_BEAT, true); |
|
1081 |
miloService.writeToOpcUa(entity); |
|
1082 |
} |
|
1083 |
//PLC进站 |
|
1084 |
else if (identifier.equals(OPCElement.EOP090_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
1085 |
EOP090Callback.handleOrder(); |
|
1086 |
} |
|
1087 |
//PLC出站 |
|
1088 |
else if (identifier.equals(OPCElement.EOP090_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
1089 |
EOP090Callback.handleFinsh(); |
|
1090 |
EOP090Callback.handleInfo(); |
73bc06
|
1091 |
EOP090Callback.handleMaterial(); |
C |
1092 |
|
d43481
|
1093 |
} |
C |
1094 |
|
|
1095 |
//EOP090B |
|
1096 |
//心跳 |
|
1097 |
else if (identifier.equals(OPCElement.EOP090B_F_HEART_BEAT) && null != value && "false".equals(value.toString())) { |
|
1098 |
ReadWriteEntity entity = new ReadWriteEntity(OPCElement.EOP090B_F_HEART_BEAT, true); |
|
1099 |
miloService.writeToOpcUa(entity); |
|
1100 |
} |
|
1101 |
//PLC进站 |
|
1102 |
else if (identifier.equals(OPCElement.EOP090B_J_PLC_START) && null != value && "true".equals(value.toString())) { |
|
1103 |
EOP090BCallback.handleOrder(); |
|
1104 |
} |
|
1105 |
//PLC出站 |
|
1106 |
else if (identifier.equals(OPCElement.EOP090B_J_PLC_FINISH) && null != value && "true".equals(value.toString())) { |
|
1107 |
EOP090BCallback.handleFinsh(); |
|
1108 |
EOP090BCallback.handleMaterial(); |
|
1109 |
EOP090BCallback.handleInfo(); |
|
1110 |
} |
|
1111 |
|
314bc7
|
1112 |
else if (identifier.contains("STATE") && null != value) { |
d43481
|
1113 |
EquipmentInfoParam equipmentInfoParam = new EquipmentInfoParam(); |
C |
1114 |
equipmentInfoParam.setSpareField1(identifier); |
|
1115 |
List<EquipmentInfoResult> lists = equipmentInfoService.findListBySpec(equipmentInfoParam); |
6dadf3
|
1116 |
if(!lists.isEmpty() && lists.size()>0){ |
C |
1117 |
EquipmentInfoResult result = (EquipmentInfoResult) lists.get(0); |
d43481
|
1118 |
String equipmentNo = result.getEquipmentNo(); |
C |
1119 |
EquipmentStatusParam equipmentStatusParam = new EquipmentStatusParam(); |
|
1120 |
equipmentStatusParam.setEquipmentNo(equipmentNo); |
|
1121 |
List statuslist = equipmentStatusService.findListBySpec(equipmentStatusParam); |
|
1122 |
if(statuslist.size()>0){ |
|
1123 |
EquipmentStatusResult equipmentStatusResult = (EquipmentStatusResult) statuslist.get(0); |
|
1124 |
if(!value.equals(equipmentStatusResult.getStatus())){ |
|
1125 |
equipmentStatusParam.setId(equipmentStatusResult.getId()); |
|
1126 |
equipmentStatusParam.setStatus(value.toString()); |
|
1127 |
equipmentStatusParam.setUpdateTime(DateTool.getLocalTimeForDate()); |
|
1128 |
equipmentStatusService.update(equipmentStatusParam);//更新设备状态 |
|
1129 |
|
|
1130 |
//添加设备报警 |
|
1131 |
if("3".equals(value)){ |
|
1132 |
EquipmentAlarmParam equipmentAlarmParam = new EquipmentAlarmParam(); |
|
1133 |
equipmentAlarmParam.setEquipmentNo(equipmentNo); |
|
1134 |
equipmentAlarmParam.setEquipmentName(result.getEquipmentName()); |
|
1135 |
equipmentAlarmParam.setWorkshopCode(result.getWorkshopCode()); |
|
1136 |
equipmentAlarmParam.setProductionLineCode(result.getProductionLineCode()); |
|
1137 |
equipmentAlarmParam.setLocationCode(result.getLocationCode()); |
|
1138 |
equipmentAlarmParam.setErrorDesc(result.getEquipmentName()+"报警!"); |
|
1139 |
equipmentAlarmParam.setAlarmTime(DateTool.getLocalTimeForDate()); |
|
1140 |
equipmentAlarmService.add(equipmentAlarmParam); |
|
1141 |
} |
|
1142 |
} |
|
1143 |
|
|
1144 |
}else{ |
|
1145 |
equipmentStatusParam.setEquipmentName(result.getEquipmentName()); |
|
1146 |
equipmentStatusParam.setWorkshopCode(result.getWorkshopCode()); |
|
1147 |
equipmentStatusParam.setProductionLineCode(result.getProductionLineCode()); |
|
1148 |
equipmentStatusParam.setLocationCode(result.getLocationCode()); |
|
1149 |
equipmentStatusParam.setStatus(value.toString()); |
|
1150 |
equipmentStatusParam.setUpdateTime(DateTool.getLocalTimeForDate()); |
|
1151 |
equipmentStatusService.add(equipmentStatusParam); |
|
1152 |
|
|
1153 |
//添加设备报警 |
|
1154 |
if("3".equals(value)){ |
|
1155 |
EquipmentAlarmParam equipmentAlarmParam = new EquipmentAlarmParam(); |
|
1156 |
equipmentAlarmParam.setEquipmentNo(equipmentNo); |
|
1157 |
equipmentAlarmParam.setEquipmentName(result.getEquipmentName()); |
|
1158 |
equipmentAlarmParam.setWorkshopCode(result.getWorkshopCode()); |
|
1159 |
equipmentAlarmParam.setProductionLineCode(result.getProductionLineCode()); |
|
1160 |
equipmentAlarmParam.setLocationCode(result.getLocationCode()); |
|
1161 |
equipmentAlarmParam.setErrorDesc(result.getEquipmentName()+"报警!"); |
|
1162 |
equipmentAlarmParam.setAlarmTime(DateTool.getLocalTimeForDate()); |
|
1163 |
equipmentAlarmService.add(equipmentAlarmParam); |
|
1164 |
} |
|
1165 |
} |
|
1166 |
} |
|
1167 |
|
314bc7
|
1168 |
if(identifier.contains("OP050") && !identifier.contains("EOP050") ){ |
C |
1169 |
StateCallback.handleOilStateOP050("OP050"); |
|
1170 |
} |
|
1171 |
if (identifier.contains("BOP030")){ |
|
1172 |
StateCallback.handleOilStateBOP030("BOP030"); |
|
1173 |
} |
d43481
|
1174 |
} |
C |
1175 |
|
|
1176 |
else { |
|
1177 |
System.out.println("值没有变"); |
|
1178 |
} |
|
1179 |
|
|
1180 |
|
|
1181 |
}else { |
|
1182 |
System.out.println("值为空"); |
|
1183 |
} |
|
1184 |
|
|
1185 |
} catch (Exception e) { |
|
1186 |
ecpStr ="出现异常:" + logUtil.getTrace(e); |
|
1187 |
}finally { |
|
1188 |
if(!"".equals(ecpStr)){ |
|
1189 |
System.out.println(ecpStr+"\r\n"); |
|
1190 |
logger.info(ecpStr+"\r\n"); |
|
1191 |
} |
|
1192 |
} |
|
1193 |
} |
|
1194 |
|
|
1195 |
|
|
1196 |
|
|
1197 |
} |