cl
2024-01-20 d434812c124e2dab22487f8d40d8ad6c3b8ad19c
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
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
package cn.stylefeng.guns.plcserver.init;
 
import cn.stylefeng.guns.modular.bs.collectionParamConf.service.CollectionParamConfService;
import cn.stylefeng.guns.modular.bs.equipmentInfo.model.params.EquipmentInfoParam;
import cn.stylefeng.guns.modular.bs.equipmentInfo.model.result.EquipmentInfoResult;
import cn.stylefeng.guns.modular.bs.equipmentInfo.service.EquipmentInfoService;
import cn.stylefeng.guns.modular.bs.locationInfo.service.LocationInfoService;
import cn.stylefeng.guns.modular.cm.paramCollection.service.ParamCollectionService;
import cn.stylefeng.guns.modular.cm.passingStationCollection.service.PassingStationCollectionService;
import cn.stylefeng.guns.modular.dq.materialTraceability.service.MaterialTraceabilityService;
import cn.stylefeng.guns.modular.em.equipmentAlarm.service.EquipmentAlarmService;
import cn.stylefeng.guns.modular.em.equipmentStatus.service.EquipmentStatusService;
import cn.stylefeng.guns.modular.gm.greaseManage.service.GreaseManageService;
import cn.stylefeng.guns.modular.om.productionOrdeInfo.service.ProductionOrdeInfoService;
import cn.stylefeng.guns.modular.om.productionOrderBatchInfo.service.ProductionOrderBatchInfoService;
import cn.stylefeng.guns.modular.om.productionOrderRecords.service.ProductionOrderRecordsService;
import cn.stylefeng.guns.modular.sc.repairManageInfo.service.RepairManageInfoService;
import cn.stylefeng.guns.modular.sc.serialNumbersConf.service.SerialNumbersConfService;
import cn.stylefeng.guns.plcserver.callback.*;
import cn.stylefeng.guns.plcserver.opc.GlobalVariable;
import cn.stylefeng.guns.plcserver.opc.OPCElement;
import cn.stylefeng.guns.plcserver.server.OP010.OP010ServerInterface;
import cn.stylefeng.guns.plcserver.server.OP010.impl.OP010ServerInterfaceImpl;
import com.kangaroohy.milo.service.MiloService;
import lombok.extern.slf4j.Slf4j;
import org.openscada.opc.lib.da.Item;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;
 
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
 
@Component
@Slf4j
public class CustomRunner implements ApplicationRunner {
 
    @Autowired
    public MiloService miloService;
 
    @Autowired
    public ProductionOrdeInfoService productionOrdeInfoService;
    @Autowired
    public PassingStationCollectionService passingStationCollectionService;
    @Autowired
    public ParamCollectionService paramCollectionService;
    @Autowired
    public CollectionParamConfService collectionParamConfService;
    @Autowired
    public SerialNumbersConfService serialNumbersConfService;
    @Autowired
    private EquipmentStatusService equipmentStatusService;
 
    @Autowired
    private EquipmentAlarmService equipmentAlarmService;
    @Autowired
    private MaterialTraceabilityService materialTraceabilityService;
    @Autowired
    private EquipmentInfoService equipmentInfoService;
    @Autowired
    private RepairManageInfoService repairManageInfoService;
 
    @Autowired
    private LocationInfoService locationInfoService;
 
    @Autowired
    private GreaseManageService greaseManageService;
 
    @Autowired
    private ProductionOrderRecordsService productionOrderRecordsService;
 
    @Autowired
    private ProductionOrderBatchInfoService productionOrderBatchInfoService;
 
    private List stateLists = null;
    @Override
    public void run(ApplicationArguments args) throws Exception {
 
        GlobalVariable.PRODUCT_TYPE_MAP.put("12980500000198","1");//C1 36V
        GlobalVariable.PRODUCT_TYPE_MAP.put("12980500000174","2");//C1 48V
        GlobalVariable.PRODUCT_TYPE_MAP.put("12980500000194","3");//T1 36V
        GlobalVariable.PRODUCT_TYPE_MAP.put("12980500000201","4");//T1 48V
 
        GlobalVariable.PRODUCT_CODE_MAP.put("1","12980500000198");
        GlobalVariable.PRODUCT_CODE_MAP.put("2","12980500000174");
        GlobalVariable.PRODUCT_CODE_MAP.put("3","12980500000194");
        GlobalVariable.PRODUCT_CODE_MAP.put("4","12980500000201");
 
        EquipmentInfoParam equipmentInfoParam = new EquipmentInfoParam();
        List list = equipmentInfoService.findListBySpec(equipmentInfoParam);
 
      /*  state();*/
        init();
/*        COP010();
        COP020();
        COP030();
 
        BOP010();
        BOP020();
        BOP030();
        BOP030B();
        BOP040();
        BOP040B();
 
        DOP010();
        //DOP020();
 
        EOP010();
        EOP020();
        EOP030();
        EOP040();
        EOP050();
        EOP060();
        EOP070();
        EOP080();
        EOP090();
        EOP090B();
 
        OP010();
        OP020();
        OP030();
        OP040();
        OP050();
 
        OP070();
        OP080();
        OP090();
        OP100();
        OP110();
        OP120();
        OP120B();
        OP130();
        OP130B();
        OP140();
        //OP150();
        OP160();
        OP170();
 
        state();*/
    }
 
 
 
    private void init() throws Exception {
        InitCallback InitCallback = new InitCallback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
 
        List<String> lists = getList();
        miloService.subscriptionFromOpcUa(lists,InitCallback);
    }
 
    private void state() throws Exception {
        StateCallback StateCallback = new StateCallback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        StateCallback.handleInfo();
        // handleOilState("DOP020");
        StateCallback.handleOilStateOP050("OP050");
        StateCallback.handleOilStateBOP030("BOP030");
    }
    private void COP010() throws Exception {
        COP010Callback COP010Callback = new COP010Callback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.COP010_F_HEART_BEAT);
        lists.add(OPCElement.COP010_J_PLC_START);
        lists.add(OPCElement.COP010_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,COP010Callback);
        System.out.println("1");
    }
    private void COP020() throws Exception {
        COP020Callback COP020Callback = new COP020Callback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.COP020_F_HEART_BEAT);
        lists.add(OPCElement.COP020_J_PLC_START);
        lists.add(OPCElement.COP020_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,COP020Callback);
    }
    private void COP030() throws Exception {
        COP030Callback COP030Callback = new COP030Callback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.COP030_F_HEART_BEAT);
        lists.add(OPCElement.COP030_J_PLC_START);
        lists.add(OPCElement.COP030_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,COP030Callback);
    }
    private void BOP010() throws Exception {
        BOP010Callback BOP010Callback = new BOP010Callback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.BOP010_F_HEART_BEAT);
        lists.add(OPCElement.BOP010_J_PLC_START);
        lists.add(OPCElement.BOP010_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,BOP010Callback);
    }
    private void BOP020() throws Exception {
        BOP020Callback BOP020Callback = new BOP020Callback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.BOP020_F_HEART_BEAT);
        lists.add(OPCElement.BOP020_J_PLC_START);
        lists.add(OPCElement.BOP020_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,BOP020Callback);
    }
    private void BOP030() throws Exception {
        BOP030Callback BOP030Callback = new BOP030Callback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.BOP030_F_HEART_BEAT);
        lists.add(OPCElement.BOP030_J_PLC_START);
        lists.add(OPCElement.BOP030_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,BOP030Callback);
    }
    private void BOP030B() throws Exception {
        BOP030BCallback BOP030BCallback = new BOP030BCallback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.BOP030B_F_HEART_BEAT);
        lists.add(OPCElement.BOP030B_J_PLC_START);
        lists.add(OPCElement.BOP030B_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,BOP030BCallback);
    }
    private void BOP040() throws Exception {
        BOP040Callback BOP040Callback = new BOP040Callback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.BOP040_F_HEART_BEAT);
        lists.add(OPCElement.BOP040_J_PLC_START);
        lists.add(OPCElement.BOP040_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,BOP040Callback);
    }
    private void BOP040B() throws Exception {
        BOP040BCallback BOP040BCallback = new BOP040BCallback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.BOP040B_F_HEART_BEAT);
        lists.add(OPCElement.BOP040B_J_PLC_START);
        lists.add(OPCElement.BOP040B_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,BOP040BCallback);
    }
    private void DOP010() throws Exception {
        DOP010Callback DOP010Callback = new DOP010Callback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.DOP010_F_HEART_BEAT);
        lists.add(OPCElement.DOP010_J_PLC_START);
        lists.add(OPCElement.DOP010_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,DOP010Callback);
    }
    private void DOP020() throws Exception {
        DOP020Callback DOP020Callback = new DOP020Callback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.DOP020_F_HEART_BEAT);
        lists.add(OPCElement.DOP020_J_PLC_START);
        lists.add(OPCElement.DOP020_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,DOP020Callback);
    }
    private void EOP010() throws Exception {
        EOP010Callback EOP010Callback = new EOP010Callback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.EOP010_F_HEART_BEAT);
        lists.add(OPCElement.EOP010_J_PLC_START);
        lists.add(OPCElement.EOP010_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,EOP010Callback);
    }
    private void EOP020() throws Exception {
        EOP020Callback EOP020Callback = new EOP020Callback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.EOP020_F_HEART_BEAT);
        lists.add(OPCElement.EOP020_J_PLC_START);
        lists.add(OPCElement.EOP020_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,EOP020Callback);
    }
    private void EOP030() throws Exception {
        EOP030Callback EOP030Callback = new EOP030Callback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.EOP030_F_HEART_BEAT);
        lists.add(OPCElement.EOP030_J_PLC_START);
        lists.add(OPCElement.EOP030_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,EOP030Callback);
    }
    private void EOP040() throws Exception {
        EOP040Callback EOP040Callback = new EOP040Callback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.EOP040_F_HEART_BEAT);
        lists.add(OPCElement.EOP040_J_PLC_START);
        lists.add(OPCElement.EOP040_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,EOP040Callback);
    }
 
    private void EOP050() throws Exception {
        EOP050Callback EOP050Callback = new EOP050Callback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.EOP050_F_HEART_BEAT);
        lists.add(OPCElement.EOP050_J_PLC_START);
        lists.add(OPCElement.EOP050_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,EOP050Callback);
    }
    private void EOP060() throws Exception {
        EOP060Callback EOP060Callback = new EOP060Callback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.EOP060_F_HEART_BEAT);
        lists.add(OPCElement.EOP060_J_PLC_START);
        lists.add(OPCElement.EOP060_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,EOP060Callback);
    }
    private void EOP070() throws Exception {
        EOP070Callback EOP070Callback = new EOP070Callback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.EOP070_F_HEART_BEAT);
        lists.add(OPCElement.EOP070_J_PLC_START);
        lists.add(OPCElement.EOP070_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,EOP070Callback);
    }
    private void EOP080() throws Exception {
        EOP080Callback EOP080Callback = new EOP080Callback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.EOP080_F_HEART_BEAT);
        lists.add(OPCElement.EOP080_J_PLC_START);
        lists.add(OPCElement.EOP080_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,EOP080Callback);
    }
    private void EOP090() throws Exception {
        EOP090Callback EOP090Callback = new EOP090Callback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.EOP090_F_HEART_BEAT);
        lists.add(OPCElement.EOP090_J_PLC_START);
        lists.add(OPCElement.EOP090_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,EOP090Callback);
    }
    private void EOP090B() throws Exception {
        EOP090BCallback EOP090BCallback = new EOP090BCallback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.EOP090B_F_HEART_BEAT);
        lists.add(OPCElement.EOP090B_J_PLC_START);
        lists.add(OPCElement.EOP090B_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,EOP090BCallback);
    }
    private void OP010() throws Exception {
        OP010Callback OP010Callback = new OP010Callback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.OP010_F_HEART_BEAT);
        lists.add(OPCElement.OP010_J_PLC_START);
        lists.add(OPCElement.OP010_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,OP010Callback);
    }
    private void OP020() throws Exception {
        OP020Callback OP020Callback = new OP020Callback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.OP020_F_HEART_BEAT);
        lists.add(OPCElement.OP020_J_PLC_START);
        lists.add(OPCElement.OP020_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,OP020Callback);
    }
    private void OP030() throws Exception {
        OP030Callback OP030Callback = new OP030Callback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.OP030_F_HEART_BEAT);
        lists.add(OPCElement.OP030_J_PLC_START);
        lists.add(OPCElement.OP030_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,OP030Callback);
    }
    private void OP040() throws Exception {
        OP040Callback OP040Callback = new OP040Callback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.OP040_F_HEART_BEAT);
        lists.add(OPCElement.OP040_J_PLC_START);
        lists.add(OPCElement.OP040_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,OP040Callback);
    }
    private void OP050() throws Exception {
        OP050Callback OP050Callback = new OP050Callback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.OP050_F_HEART_BEAT);
        lists.add(OPCElement.OP050_J_PLC_START);
        lists.add(OPCElement.OP050_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,OP050Callback);
    }
    private void OP070() throws Exception {
        OP070Callback OP070Callback = new OP070Callback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.OP070_F_HEART_BEAT);
        lists.add(OPCElement.OP070_J_PLC_START);
        lists.add(OPCElement.OP070_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,OP070Callback);
    }
    private void OP080() throws Exception {
        OP080Callback OP080Callback = new OP080Callback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.OP080_F_HEART_BEAT);
        lists.add(OPCElement.OP080_J_PLC_START);
        lists.add(OPCElement.OP080_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,OP080Callback);
    }
    private void OP090() throws Exception {
        OP090Callback OP090Callback = new OP090Callback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.OP090_F_HEART_BEAT);
        lists.add(OPCElement.OP090_J_PLC_START);
        lists.add(OPCElement.OP090_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,OP090Callback);
    }
    private void OP100() throws Exception {
        OP100Callback OP100Callback = new OP100Callback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.OP100_F_HEART_BEAT);
        lists.add(OPCElement.OP100_J_PLC_START);
        lists.add(OPCElement.OP100_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,OP100Callback);
    }
    private void OP110() throws Exception {
        OP110Callback OP110Callback = new OP110Callback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.OP110_F_HEART_BEAT);
        lists.add(OPCElement.OP110_J_PLC_START);
        lists.add(OPCElement.OP110_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,OP110Callback);
    }
    private void OP120() throws Exception {
        OP120Callback OP120Callback = new OP120Callback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.OP120_F_HEART_BEAT);
        lists.add(OPCElement.OP120_J_PLC_START);
        lists.add(OPCElement.OP120_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,OP120Callback);
    }
    private void OP120B() throws Exception {
        OP120BCallback OP120BCallback = new OP120BCallback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.OP120B_F_HEART_BEAT);
        lists.add(OPCElement.OP120B_J_PLC_START);
        lists.add(OPCElement.OP120B_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,OP120BCallback);
    }
    private void OP130() throws Exception {
        OP130Callback OP130Callback = new OP130Callback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.OP130_F_HEART_BEAT);
        lists.add(OPCElement.OP130_J_PLC_START);
        lists.add(OPCElement.OP130_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,OP130Callback);
    }
    private void OP130B() throws Exception {
        OP130BCallback OP130BCallback = new OP130BCallback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.OP130B_F_HEART_BEAT);
        lists.add(OPCElement.OP130B_J_PLC_START);
        lists.add(OPCElement.OP130B_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,OP130BCallback);
    }
    private void OP140() throws Exception {
        OP140Callback OP140Callback = new OP140Callback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.OP140_F_HEART_BEAT);
        lists.add(OPCElement.OP140_J_PLC_START);
        lists.add(OPCElement.OP140_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,OP140Callback);
    }
    private void OP150() throws Exception {
        OP150Callback OP150Callback = new OP150Callback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.OP150_F_HEART_BEAT);
        lists.add(OPCElement.OP150_J_PLC_START);
        lists.add(OPCElement.OP150_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,OP150Callback);
    }
    private void OP160() throws Exception {
        OP160Callback OP160Callback = new OP160Callback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.OP160_F_HEART_BEAT);
        lists.add(OPCElement.OP160_J_PLC_START);
        lists.add(OPCElement.OP160_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,OP160Callback);
    }
    private void OP170() throws Exception {
        OP170Callback OP170Callback = new OP170Callback(miloService,productionOrdeInfoService,
                passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService,
                equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService,
                repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,
                productionOrderBatchInfoService);
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.OP170_F_HEART_BEAT);
        lists.add(OPCElement.OP170_J_PLC_START);
        lists.add(OPCElement.OP170_J_PLC_FINISH);
        miloService.subscriptionFromOpcUa(lists,OP170Callback);
    }
 
 
    public List<String> getList(){
        List<String> lists = new ArrayList<>();
 
        lists.add(OPCElement.COP010_F_HEART_BEAT);
        lists.add(OPCElement.COP010_J_PLC_START);
        lists.add(OPCElement.COP010_J_PLC_FINISH);
 
        lists.add(OPCElement.COP020_F_HEART_BEAT);
        lists.add(OPCElement.COP020_J_PLC_START);
        lists.add(OPCElement.COP020_J_PLC_FINISH);
 
        lists.add(OPCElement.COP030_F_HEART_BEAT);
        lists.add(OPCElement.COP030_J_PLC_START);
        lists.add(OPCElement.COP030_J_PLC_FINISH);
 
        lists.add(OPCElement.BOP010_F_HEART_BEAT);
        lists.add(OPCElement.BOP010_J_PLC_START);
        lists.add(OPCElement.BOP010_J_PLC_FINISH);
 
        lists.add(OPCElement.BOP020_F_HEART_BEAT);
        lists.add(OPCElement.BOP020_J_PLC_START);
        lists.add(OPCElement.BOP020_J_PLC_FINISH);
 
        lists.add(OPCElement.BOP030_F_HEART_BEAT);
        lists.add(OPCElement.BOP030_J_PLC_START);
        lists.add(OPCElement.BOP030_J_PLC_FINISH);
 
        lists.add(OPCElement.BOP030B_F_HEART_BEAT);
        lists.add(OPCElement.BOP030B_J_PLC_START);
        lists.add(OPCElement.BOP030B_J_PLC_FINISH);
 
        lists.add(OPCElement.BOP040_F_HEART_BEAT);
        lists.add(OPCElement.BOP040_J_PLC_START);
        lists.add(OPCElement.BOP040_J_PLC_FINISH);
 
        lists.add(OPCElement.BOP040B_F_HEART_BEAT);
        lists.add(OPCElement.BOP040B_J_PLC_START);
        lists.add(OPCElement.BOP040B_J_PLC_FINISH);
 
        lists.add(OPCElement.DOP010_F_HEART_BEAT);
        lists.add(OPCElement.DOP010_J_PLC_START);
        lists.add(OPCElement.DOP010_J_PLC_FINISH);
 
    /*    lists.add(OPCElement.DOP020_F_HEART_BEAT);
        lists.add(OPCElement.DOP020_J_PLC_START);
        lists.add(OPCElement.DOP020_J_PLC_FINISH);*/
 
        lists.add(OPCElement.EOP010_F_HEART_BEAT);
        lists.add(OPCElement.EOP010_J_PLC_START);
        lists.add(OPCElement.EOP010_J_PLC_FINISH);
 
        lists.add(OPCElement.EOP020_F_HEART_BEAT);
        lists.add(OPCElement.EOP020_J_PLC_START);
        lists.add(OPCElement.EOP020_J_PLC_FINISH);
 
        lists.add(OPCElement.EOP030_F_HEART_BEAT);
        lists.add(OPCElement.EOP030_J_PLC_START);
        lists.add(OPCElement.EOP030_J_PLC_FINISH);
 
        lists.add(OPCElement.EOP040_F_HEART_BEAT);
        lists.add(OPCElement.EOP040_J_PLC_START);
        lists.add(OPCElement.EOP040_J_PLC_FINISH);
 
        lists.add(OPCElement.EOP050_F_HEART_BEAT);
        lists.add(OPCElement.EOP050_J_PLC_START);
        lists.add(OPCElement.EOP050_J_PLC_FINISH);
 
        lists.add(OPCElement.EOP060_F_HEART_BEAT);
        lists.add(OPCElement.EOP060_J_PLC_START);
        lists.add(OPCElement.EOP060_J_PLC_FINISH);
 
        lists.add(OPCElement.EOP070_F_HEART_BEAT);
        lists.add(OPCElement.EOP070_J_PLC_START);
        lists.add(OPCElement.EOP070_J_PLC_FINISH);
 
        lists.add(OPCElement.EOP070_F_HEART_BEAT);
        lists.add(OPCElement.EOP070_J_PLC_START);
        lists.add(OPCElement.EOP070_J_PLC_FINISH);
 
        lists.add(OPCElement.EOP090_F_HEART_BEAT);
        lists.add(OPCElement.EOP090_J_PLC_START);
        lists.add(OPCElement.EOP090_J_PLC_FINISH);
 
        lists.add(OPCElement.EOP090B_F_HEART_BEAT);
        lists.add(OPCElement.EOP090B_J_PLC_START);
        lists.add(OPCElement.EOP090B_J_PLC_FINISH);
 
        lists.add(OPCElement.OP010_F_HEART_BEAT);
        lists.add(OPCElement.OP010_J_PLC_START);
        lists.add(OPCElement.OP010_J_PLC_FINISH);
 
        lists.add(OPCElement.OP020_F_HEART_BEAT);
        lists.add(OPCElement.OP020_J_PLC_START);
        lists.add(OPCElement.OP020_J_PLC_FINISH);
 
        lists.add(OPCElement.OP030_F_HEART_BEAT);
        lists.add(OPCElement.OP030_J_PLC_START);
        lists.add(OPCElement.OP030_J_PLC_FINISH);
 
        lists.add(OPCElement.OP040_F_HEART_BEAT);
        lists.add(OPCElement.OP040_J_PLC_START);
        lists.add(OPCElement.OP040_J_PLC_FINISH);
 
        lists.add(OPCElement.OP050_F_HEART_BEAT);
        lists.add(OPCElement.OP050_J_PLC_START);
        lists.add(OPCElement.OP050_J_PLC_FINISH);
 
        lists.add(OPCElement.OP070_F_HEART_BEAT);
        lists.add(OPCElement.OP070_J_PLC_START);
        lists.add(OPCElement.OP070_J_PLC_FINISH);
 
        lists.add(OPCElement.OP080_F_HEART_BEAT);
        lists.add(OPCElement.OP080_J_PLC_START);
        lists.add(OPCElement.OP080_J_PLC_FINISH);
 
        lists.add(OPCElement.OP090_F_HEART_BEAT);
        lists.add(OPCElement.OP090_J_PLC_START);
        lists.add(OPCElement.OP090_J_PLC_FINISH);
 
        lists.add(OPCElement.OP100_F_HEART_BEAT);
        lists.add(OPCElement.OP100_J_PLC_START);
        lists.add(OPCElement.OP100_J_PLC_FINISH);
 
        lists.add(OPCElement.OP110_F_HEART_BEAT);
        lists.add(OPCElement.OP110_J_PLC_START);
        lists.add(OPCElement.OP110_J_PLC_FINISH);
 
        lists.add(OPCElement.OP120_F_HEART_BEAT);
        lists.add(OPCElement.OP120_J_PLC_START);
        lists.add(OPCElement.OP120_J_PLC_FINISH);
 
        lists.add(OPCElement.OP120B_F_HEART_BEAT);
        lists.add(OPCElement.OP120B_J_PLC_START);
        lists.add(OPCElement.OP120B_J_PLC_FINISH);
 
        lists.add(OPCElement.OP130_F_HEART_BEAT);
        lists.add(OPCElement.OP130_J_PLC_START);
        lists.add(OPCElement.OP130_J_PLC_FINISH);
 
        lists.add(OPCElement.OP130B_F_HEART_BEAT);
        lists.add(OPCElement.OP130B_J_PLC_START);
        lists.add(OPCElement.OP130B_J_PLC_FINISH);
 
        lists.add(OPCElement.OP140_F_HEART_BEAT);
        lists.add(OPCElement.OP140_J_PLC_START);
        lists.add(OPCElement.OP140_J_PLC_FINISH);
 
     /*   lists.add(OPCElement.OP150_F_HEART_BEAT);
        lists.add(OPCElement.OP150_J_PLC_START);
        lists.add(OPCElement.OP150_J_PLC_FINISH);*/
 
        lists.add(OPCElement.OP160_F_HEART_BEAT);
        lists.add(OPCElement.OP160_J_PLC_START);
        lists.add(OPCElement.OP160_J_PLC_FINISH);
 
        lists.add(OPCElement.OP170_F_HEART_BEAT);
        lists.add(OPCElement.OP170_J_PLC_START);
        lists.add(OPCElement.OP170_J_PLC_FINISH);
 
        if(null == stateLists ){
            EquipmentInfoParam equipmentInfoParam = new EquipmentInfoParam();
            stateLists = equipmentInfoService.findListBySpec(equipmentInfoParam);
        }
 
        if(!stateLists.isEmpty()){
            for(int i=0;i<stateLists.size();i++) {
                EquipmentInfoResult result = (EquipmentInfoResult) stateLists.get(i);
                if(null != result.getSpareField1()){
                    lists.add(result.getSpareField1());
                }
            }
        }
        return lists;
    }
}