jinxin
2025-06-04 d968571628134ed672d9c6e4ba5cf32ba8d9644b
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
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace HH.WCS.NongFuChaYuan.OtherService
{
    public class Settings
    {
        #region   项目流程配置区域
 
        #region ProjectName
        private static string _ProjectName = "";
        public static string ProjectName
        {
            get
            {
                if (_ProjectName == "")
                {
                    _ProjectName = XmlHelper.GetElementValue("ProjectName");
                }
                return _ProjectName;
            }
        }
        #endregion
 
        #region TableProType
        private static string _TableProType = "";
        public static string TableProType
        {
            get
            {
                if (_TableProType == "")
                {
                    _TableProType = XmlHelper.GetElementValue("TableProType");
                }
                return _TableProType;
            }
        }
        #endregion
 
        #region TableName
        private static string _TableName = "";
        private static string TableNameList
        {
            get
            {
                if (_TableName == "")
                {
                    _TableName = XmlHelper.GetElementValue("TableName");
                }
                return _TableName;
            }
        }
 
        private static List<TableNameModel> TableNames = new List<TableNameModel>();
        public static List<TableNameModel> GetTableNameList()
        {
            if (TableNames.Count == 0 && TableNameList != "")
            {
                TableNames = Newtonsoft.Json.JsonConvert.DeserializeObject<List<TableNameModel>>(TableNameList);
            }
            return TableNames;
        }
 
        public class TableNameModel
        {
            /// <summary>
            /// 表名标识:便于实施观看
            /// </summary>
            public string TableSignNo { get; set; }
            /// <summary>
            /// 泛意表名
            /// </summary>
            public string TableName { get; set; }
            /// <summary>
            /// 数据库实际表名
            /// </summary>
            public string TableSqlName { get; set; }
            /// <summary>
            /// 项目表类型
            /// </summary>
            public string TableProType { get; set; }
            /// <summary>
            /// 是否启用
            /// </summary>
            public string Enable { get; set; }
        }
        #endregion
 
        #region FactoryCode
        private static string _FactoryCode = "";
        public static string FactoryCode
        {
            get
            {
                if (_FactoryCode == "")
                {
                    _FactoryCode = XmlHelper.GetElementValue("FactoryCode");
                }
                return _FactoryCode;
            }
        }
        #endregion
 
        #region FactoryName
        private static string _FactoryName = "";
        public static string FactoryName
        {
            get
            {
                if (_FactoryName == "")
                {
                    _FactoryName = XmlHelper.GetElementValue("FactoryName");
                }
                return _FactoryName;
            }
        }
        #endregion
 
        #region OneSign
        private static string _OneSign = "";
        public static string OneSign
        {
            get
            {
                if (_OneSign == "")
                {
                    _OneSign = XmlHelper.GetElementValue("OneSign");
                }
                return _OneSign;
            }
        }
        #endregion
 
        #endregion
 
        #region   URL配置区域
 
        #region HostToAgvServerUrl
        private static string _hostToAgvServerUrl = "";
        public static string HostToAgvServerUrl
        {
            get
            {
                if (_hostToAgvServerUrl == "")
                {
                    _hostToAgvServerUrl = XmlHelper.GetElementValue("HostToAgvServerUrl");
                }
                return _hostToAgvServerUrl;
            }
        }
        #endregion
 
        #region OITcpServerUrl
        private static string _OITcpServerUrl = "";
        public static string OITcpSeverUrl
        {
            get
            {
                if (_OITcpServerUrl == "")
                {
                    _OITcpServerUrl = XmlHelper.GetElementValue("OITcpServerUrl");
                }
                return _OITcpServerUrl;
            }
        }
        #endregion
 
        #region HttpUrlPort
        private static string _HttpUrlPort = "";
        public static string HttpUrlPort
        {
            get
            {
                if (_HttpUrlPort == "")
                {
                    _HttpUrlPort = XmlHelper.GetElementValue("HttpUrlPort");
                }
                return _HttpUrlPort;
            }
        }
        #endregion
 
        #region TcpPort
        private static string _TcpPort = "";
        public static string TcpPort
        {
            get
            {
                if (_TcpPort == "")
                {
                    _TcpPort = XmlHelper.GetElementValue("TcpPort");
                }
                return _TcpPort;
            }
        }
        #endregion
 
        #region SqlServer
        private static string _SqlServer = "";
        public static string SqlServer
        {
            get
            {
                if (_SqlServer == "")
                {
                    _SqlServer = XmlHelper.GetElementValue("SqlServer");
                }
                return _SqlServer;
            }
        }
        #endregion
 
        #region ThirdPartyUrl
        private static string _ThirdPartyUrl = "";
        private static string ThirdPartyUrlList
        {
            get
            {
                if (_ThirdPartyUrl == "")
                {
                    _ThirdPartyUrl = XmlHelper.GetElementValue("ThirdPartyUrl");
                }
                return _ThirdPartyUrl;
            }
        }
 
        private static List<ThirdPartyUrlModel> ThirdPartyUrls = new List<ThirdPartyUrlModel>();
        public static List<ThirdPartyUrlModel> GetThirdPartyUrlList()
        {
            if (ThirdPartyUrls.Count == 0 && ThirdPartyUrlList != "")
            {
                ThirdPartyUrls = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ThirdPartyUrlModel>>(ThirdPartyUrlList);
            }
            return ThirdPartyUrls;
        }
 
        public class ThirdPartyUrlModel
        {
            /// <summary>
            /// URL编号-唯一
            /// </summary>
            public string UrlNo { get; set; }
            /// <summary>
            /// URL标识名
            /// </summary>
            public string UrlName { get; set; }
            /// <summary>
            /// URL路径
            /// </summary>
            public string Url { get; set; }
            /// <summary>
            /// 是否启用
            /// </summary>
            public string Enable { get; set; }
        }
        #endregion
 
        #region HttpApiVerify
        private static string _HttpApiVerify = "";
        private static string HttpApiVerifyList
        {
            get
            {
                if (_HttpApiVerify == "")
                {
                    _HttpApiVerify = XmlHelper.GetElementValue("HttpApiVerify");
                }
                return _HttpApiVerify;
            }
        }
 
        private static List<HttpApiVerifyModel> HttpApiVerifys = new List<HttpApiVerifyModel>();
        public static List<HttpApiVerifyModel> GetHttpApiVerifyList()
        {
            if (HttpApiVerifys.Count == 0 && HttpApiVerifyList != "")
            {
                HttpApiVerifys = Newtonsoft.Json.JsonConvert.DeserializeObject<List<HttpApiVerifyModel>>(HttpApiVerifyList);
            }
            return HttpApiVerifys;
        }
 
        public class HttpApiVerifyModel
        {
            /// <summary>
            /// 验证编码
            /// </summary>
            public string VerifyNo { get; set; }
            /// <summary>
            /// 项目编码
            /// </summary>
            public string Project { get; set; }
            /// <summary>
            /// 扩展编码
            /// </summary>
            public string[] Extend { get; set; }
            /// <summary>
            /// 是否启用
            /// </summary>
            public string Enable { get; set; }
        }
        #endregion
 
        #endregion
 
        #region   设备协议配置区域
 
        #region DeviceInfo
        private static string _deviceInfo = "";
        private static string deviceInfoList
        {
            get
            {
                if (_deviceInfo == "")
                {
                    _deviceInfo = XmlHelper.GetElementValue("deviceInfo");
                }
                return _deviceInfo;
            }
        }
 
        private static List<deviceInfo> deviceInfos = new List<deviceInfo>();
        public static List<deviceInfo> GetDeviceInfoList()
        {
            if (deviceInfos.Count == 0 && deviceInfoList != "")
            {
                deviceInfos = Newtonsoft.Json.JsonConvert.DeserializeObject<List<deviceInfo>>(deviceInfoList);
            }
            return deviceInfos;
        }
 
        public class deviceInfo
        {
            public string address { get; set; }
            public string deviceName { get; set; }
            public string[] deviceNo { get; set; }
            public string[] location { get; set; }
            /// <summary>
            /// deviceType=1 自动门;deviceType=2 瓶盖机-无菌盖;deviceType=3 瓶盖机-水盖;deviceType=4 翻斗机(水盖);
            /// deviceType=5 翻斗机(无菌盖 v1/v2);deviceType=6 翻斗机(无菌盖 v6);deviceType=7 翻斗机(无菌盖 v8)
            /// </summary>
            public int deviceType { get; set; }
            public int enable { get; set; }
        }
        #endregion
 
        #region   ModBusTcpPlc
        private static string _ModBusTcpPlc = "";
        private static string ModBusTcpPlc
        {
            get
            {
                if (_ModBusTcpPlc == "")
                {
                    _ModBusTcpPlc = XmlHelper.GetElementValue("ModBusTcpPlc");
                }
                return _ModBusTcpPlc;
            }
        }
        public static List<ModBusTcpPlcModel> GetModBusTcpPlc()
        {
            return JsonConvert.DeserializeObject<List<ModBusTcpPlcModel>>(ModBusTcpPlc);
        }
        public class ModBusTcpPlcModel
        {
            public string device { get; set; }
            public string deviceType { get; set; }
            public string ip { get; set; }
            public int readAddr { get; set; }
            public int writeAddr { get; set; }
            public string location { get; set; }
            public int enable { get; set; }
            public int port { get; set; }
        }
        #endregion
 
        #region   ChargingPile
 
        #region   BatteryTime
        private static string _BatteryTime = "";
        public static string BatteryTime
        {
            get
            {
                if (_BatteryTime == "")
                {
                    _BatteryTime = XmlHelper.GetElementValue("BatteryTime");
                }
                return _BatteryTime;
            }
        }
        #endregion
 
        #region   BatteryTimeEnd
        private static string _BatteryTimeEnd = "";
        public static string BatteryTimeEnd
        {
            get
            {
                if (_BatteryTimeEnd == "")
                {
                    _BatteryTimeEnd = XmlHelper.GetElementValue("BatteryTimeEnd");
                }
                return _BatteryTimeEnd;
            }
        }
        #endregion
 
        #region 充电桩信息
        private static string _ChargingPile = "";
        private static string ChargingPile
        {
            get
            {
                if (_ChargingPile == "")
                {
                    _ChargingPile = XmlHelper.GetElementValue("ChargingPile");
                }
                return _ChargingPile;
            }
        }
        public static List<ChargingPileInfo> GetChargingPile()
        {
            return JsonConvert.DeserializeObject<List<ChargingPileInfo>>(ChargingPile);
        }
        public class ChargingPileInfo
        {
            public string agvNo { get; set; }
            public string agvType { get; set; }
            public string charginGroup { get; set; }
            public string charginIP { get; set; }
            public string agvBit { get; set; }
            public string enable { get; set; }
        }
        #endregion
 
        #endregion
 
        #endregion
 
        #region   特殊流程配置区域
 
        #region   江苏西门子配置区域
 
        #region   江苏西门子-特殊点位配置获取
        private static string _SpecialPoint = "";
        private static string SpecialPoint
        {
            get
            {
                if (_SpecialPoint == "")
                {
                    _SpecialPoint = XmlHelper.GetElementValue("XiMenZiSpecialPoint");
                }
                return _SpecialPoint;
            }
        }
        private static List<SpecialPointModel> SpecialPointList = new List<SpecialPointModel>();
        public static List<SpecialPointModel> GetSpecialPointList()
        {
            if (SpecialPointList.Count == 0 && SpecialPoint != "")
            {
                SpecialPointList = JsonConvert.DeserializeObject<List<SpecialPointModel>>(SpecialPoint);
            }
            return SpecialPointList;
        }
        public class SpecialPointModel
        {
            /// <summary>
            /// 货位编码
            /// </summary>
            public string Location { get; set; }
            /// <summary>
            /// AGV站点号
            /// </summary>
            public string AgvCode { get; set; }
            public string Enable { get; set; }
        }
        #endregion
 
        #endregion
 
        #region   农夫均州配置区域
 
        #region _elevatorIP
        private static string _elevatorIP = "";
        public static string ElevatorIP
        {
            get
            {
                if (_elevatorIP == "")
                {
                    _elevatorIP = XmlHelper.GetElementValue("elevatorIP");
                }
                return _elevatorIP;
            }
        }
        #endregion
 
        #region _elevatorWaitMinute
        private static int _elevatorWaitMinute = 0;
        public static int ElevatorWaitMinute
        {
            get
            {
                if (_elevatorWaitMinute == 0)
                {
                    _elevatorWaitMinute = int.Parse(XmlHelper.GetElementValue("elevatorWaitMinute"));
                }
                return _elevatorWaitMinute;
            }
        }
        #endregion
 
        #region elevatorCacheBit
        private static string _elevatorCacheBit = "";
        private static string elevatorCacheList
        {
            get
            {
                if (_elevatorCacheBit == "")
                {
                    _elevatorCacheBit = XmlHelper.GetElementValue("elevatorCacheBit");
                }
                return _elevatorCacheBit;
            }
        }
 
        private static List<elevatorCacheBit> elevatorCacheBits = new List<elevatorCacheBit>();
        public static List<elevatorCacheBit> GetElevatorCacheBits()
        {
            //Console.WriteLine("elevatorCacheList  =" + elevatorCacheList);
            if (elevatorCacheBits.Count == 0 && elevatorCacheList != "")
            {
                elevatorCacheBits = Newtonsoft.Json.JsonConvert.DeserializeObject<List<elevatorCacheBit>>(elevatorCacheList);
            }
            return elevatorCacheBits;
        }
        /// <summary>
        ///  {"location":"内部货位","order":0,"agvBits":[100,101]},
        /// </summary>
        public class elevatorCacheBit
        {
 
            public string location { get; set; }
 
            public int order { get; set; }
            public int[] agvBits { get; set; }
 
        }
        #endregion
 
        #region elevatorDoor
        private static string _elevatorDoor = "";
        public static string elevatorDoorList
        {
            get
            {
                if (_elevatorDoor == "")
                {
                    _elevatorDoor = XmlHelper.GetElementValue("elevatorDoor");
                }
                return _elevatorDoor;
            }
        }
 
        private static List<elevatorDoor> elevatorDoors = new List<elevatorDoor>();
        public static List<elevatorDoor> GetelEvatorDoorList()
        {
            if (elevatorDoors.Count == 0 && elevatorDoorList != "")
            {
                elevatorDoors = Newtonsoft.Json.JsonConvert.DeserializeObject<List<elevatorDoor>>(elevatorDoorList);
            }
            return elevatorDoors;
        }
 
        public class elevatorDoor
        {
            public string door { get; set; }
            public int floor { get; set; }
            public int addr { get; set; }
 
 
        }
        #endregion
 
        #region tipperCacheBit
        private static string _tipperCacheBit = "";
        private static string tipperCacheBitList
        {
            get
            {
                if (_tipperCacheBit == "")
                {
                    _tipperCacheBit = XmlHelper.GetElementValue("tipperCacheBit");
                }
                return _tipperCacheBit;
            }
        }
 
        private static List<TipperCacheBit> tipperCacheBits = new List<TipperCacheBit>();
        public static List<TipperCacheBit> GetTipperCacheList()
        {
            if (tipperCacheBits.Count == 0 && tipperCacheBitList != "")
            {
                tipperCacheBits = Newtonsoft.Json.JsonConvert.DeserializeObject<List<TipperCacheBit>>(tipperCacheBitList);
            }
            return tipperCacheBits;
        }
 
        public class TipperCacheBit
        {
            public string deviceName { get; set; }
            public string[] location { get; set; }
            /// <summary>
            ///locationType=11 满托位       locationType=12 空铁筐       locationType=13 空塑料筐     
            /// </summary>
            public int locationType { get; set; }
 
        }
        #endregion
 
        #region outStockCacheBit
        private static string _outStockCacheBit = "";
        private static string outStockCacheBitList
        {
            get
            {
                if (_outStockCacheBit == "")
                {
                    _outStockCacheBit = XmlHelper.GetElementValue("outStockCacheBit");
                }
                return _outStockCacheBit;
            }
        }
 
        private static List<outStockCacheBit> outStockCacheBits = new List<outStockCacheBit>();
        public static List<outStockCacheBit> GetOutStockCacheList()
        {
            if (outStockCacheBits.Count == 0 && outStockCacheBitList != "")
            {
                outStockCacheBits = Newtonsoft.Json.JsonConvert.DeserializeObject<List<outStockCacheBit>>(outStockCacheBitList);
            }
            return outStockCacheBits;
        }
 
        public class outStockCacheBit
        {
            public string areaName { get; set; }
            public string[] location { get; set; }
            /// <summary>
            ///locationType=1 无菌盖满(row=0专门给V6)  locationType=2 水盖满 
            ///locationType=3 铁空2层 loationType = 4 塑料空2层
            ///locationType = 4 v8满 locationType = 5 v8铁空 locationType = 6 v8塑料空
            /// </summary>
            public int locationType { get; set; }
            public int row { get; set; }
 
        }
        #endregion
 
        #region rawMaterialCacheBit
        private static string _rawMaterialCacheBit = "";
        private static string rawMaterialCacheBitList
        {
            get
            {
                if (_rawMaterialCacheBit == "")
                {
                    _rawMaterialCacheBit = XmlHelper.GetElementValue("rawMaterialCacheBit");
                }
                return _rawMaterialCacheBit;
            }
        }
 
        private static List<RawMaterialCacheBit> rawMaterialCacheBits = new List<RawMaterialCacheBit>();
        public static List<RawMaterialCacheBit> GetRawMaterialCacheList()
        {
            if (rawMaterialCacheBits.Count == 0 && rawMaterialCacheBitList != "")
            {
                rawMaterialCacheBits = Newtonsoft.Json.JsonConvert.DeserializeObject<List<RawMaterialCacheBit>>(rawMaterialCacheBitList);
            }
            return rawMaterialCacheBits;
        }
 
        public class RawMaterialCacheBit
        {
            public string[] location { get; set; }
            public int locationType { get; set; }
            public int row { get; set; }
 
        }
        #endregion
 
        #region outStockCacheBit
        private static string _outgoCacheBit = "";
        private static string outgoCacheBitList
        {
            get
            {
                if (_outgoCacheBit == "")
                {
                    _outgoCacheBit = XmlHelper.GetElementValue("outgoCacheBit");
                }
                return _outgoCacheBit;
            }
        }
 
        private static List<OutgoCacheBit> outgoCacheBits = new List<OutgoCacheBit>();
        public static List<OutgoCacheBit> GetOutgoCacheList()
        {
            if (outgoCacheBits.Count == 0 && outgoCacheBitList != "")
            {
                outgoCacheBits = Newtonsoft.Json.JsonConvert.DeserializeObject<List<OutgoCacheBit>>(outgoCacheBitList);
            }
            return outgoCacheBits;
        }
 
        public class OutgoCacheBit
        {
            public string[] location { get; set; }
            public int locationType { get; set; }
            public int row { get; set; }
 
        }
        #endregion
 
        #endregion
 
        #region   农夫淳安配置区域
 
        #region   农夫淳安-生产产线优先库区获取
        private static string _ChunAnPriProLine = "";
        private static string ChunAnPriProLine
        {
            get
            {
                if (_ChunAnPriProLine == "")
                {
                    _ChunAnPriProLine = XmlHelper.GetElementValue("ChunAnPriProLine");
                }
                return _ChunAnPriProLine;
            }
        }
        private static List<ChunAnPriProLineModel> ChunAnPriProLineList = new List<ChunAnPriProLineModel>();
        public static List<ChunAnPriProLineModel> GetChunAnPriProLineList()
        {
            if (ChunAnPriProLineList.Count == 0 && ChunAnPriProLine != "")
            {
                ChunAnPriProLineList = JsonConvert.DeserializeObject<List<ChunAnPriProLineModel>>(ChunAnPriProLine);
            }
            return ChunAnPriProLineList;
        }
        public class ChunAnPriProLineModel
        {
            public string ItemName { get; set; }
            public string ItemTrayType { get; set; }
            public string AgvItemLayer { get; set; }
            public string[] ProductArea { get; set; }
            public string Enable { get; set; }
        }
        #endregion
 
        #region   农夫淳安-特殊库区编码配置
        private static string _ChunAnExtendArea = "";
        private static string ChunAnExtendArea
        {
            get
            {
                if (_ChunAnExtendArea == "")
                {
                    _ChunAnExtendArea = XmlHelper.GetElementValue("ChunAnExtendArea");
                }
                return _ChunAnExtendArea;
            }
        }
        private static List<ChunAnExtendAreaModel> ChunAnExtendAreaList = new List<ChunAnExtendAreaModel>();
        public static List<ChunAnExtendAreaModel> GetChunAnExtendAreaList()
        {
            if (ChunAnExtendAreaList.Count == 0 && ChunAnExtendArea != "")
            {
                ChunAnExtendAreaList = JsonConvert.DeserializeObject<List<ChunAnExtendAreaModel>>(ChunAnExtendArea);
            }
            return ChunAnExtendAreaList;
        }
        public class ChunAnExtendAreaModel
        {
            public string AreaName { get; set; }
            /// <summary>
            /// AGV参数4
            /// </summary>
            public string AgvTRow4 { get; set; }
            public string[] AreaNo { get; set; }
            public string[] ExtendNo { get; set; }
            public string Enable { get; set; }
        }
        #endregion
 
        #endregion
 
        #region 农夫大明山配置区域
 
        #region 瓶坯区域上下线指定库区
        private static string _DaMingShanPriProLine = "";
        private static string DaMingShanPriProLine
        {
            get
            {
                if (_DaMingShanPriProLine == "")
                {
                    _DaMingShanPriProLine = XmlHelper.GetElementValue("DaMingShanPriProLine");
                }
                return _DaMingShanPriProLine;
            }
        }
        private static List<DaMingShanPriProLineModel> DaMingShanPriProLineList = new List<DaMingShanPriProLineModel>();
        public static List<DaMingShanPriProLineModel> GetDaMingShanPriProLineList()
        {
            if (DaMingShanPriProLineList.Count == 0 && DaMingShanPriProLine != "")
            {
                DaMingShanPriProLineList = JsonConvert.DeserializeObject<List<DaMingShanPriProLineModel>>(DaMingShanPriProLine);
            }
            return DaMingShanPriProLineList;
        }
        public class DaMingShanPriProLineModel
        {
            public string deviceName { get; set; }
            public string ItemName { get; set; }
            public string ItemTrayType { get; set; }
            public string[] ProductLocation { get; set; }
            public string[] ProductArea { get; set; }
            /// <summary>
            /// 密集型 0 1
            /// </summary>
            public int IsDense { get; set; } = 0;
            public string Enable { get; set; }
        }
        #endregion
 
        #region 物料编码对应配置
        private static string _DaMingShanItemName = "";
        private static string DaMingShanItemName
        {
            get
            {
                if (_DaMingShanItemName == "")
                {
                    _DaMingShanItemName = XmlHelper.GetElementValue("DaMingShanItemName");
                }
                return _DaMingShanItemName;
            }
        }
        private static List<DaMingShanItemNameModel> DaMingShanItemNameList = new List<DaMingShanItemNameModel>();
        public static List<DaMingShanItemNameModel> GetDaMingShanItemNameList()
        {
            if (DaMingShanItemNameList.Count == 0 && DaMingShanItemName != "")
            {
                DaMingShanItemNameList = JsonConvert.DeserializeObject<List<DaMingShanItemNameModel>>(DaMingShanItemName);
            }
            return DaMingShanItemNameList;
        }
        public class DaMingShanItemNameModel
        {
            /// <summary>
            /// 物料编码
            /// </summary>
            public string ItemName { get; set; }
            /// <summary>
            /// 规格
            /// </summary>
            public string Specifications { get; set; }
            /// <summary>
            /// 品相
            /// </summary>
            public string Condition { get; set; }
            /// <summary>
            /// 包装
            /// </summary>
            public string Package { get; set; }
            /// <summary>
            /// 物料层数
            /// </summary>
            public string Layers { get; set; }
            /// <summary>
            /// 传给TS层数
            /// </summary>
            public string TSlayers { get; set; }
            /// <summary>
            /// 配置开关
            /// </summary>
            public string Enable { get; set; }
        }
        #endregion
 
        #region 瓶坯区域上下线指定库区
        private static string _inStockCacheBit = "";
        private static string inStockCacheBit
        {
            get
            {
                if (_inStockCacheBit == "")
                {
                    _inStockCacheBit = XmlHelper.GetElementValue("inStockCacheBit");
                }
                return _inStockCacheBit;
            }
        }
        private static List<inStockCacheBitModel> inStockCacheBitList = new List<inStockCacheBitModel>();
        public static List<inStockCacheBitModel> GetinStockCacheBitList()
        {
            if (inStockCacheBitList.Count == 0 && inStockCacheBit != "")
            {
                inStockCacheBitList = JsonConvert.DeserializeObject<List<inStockCacheBitModel>>(inStockCacheBit);
            }
            return inStockCacheBitList;
        }
        public class inStockCacheBitModel
        {
            /// <summary>
            /// 瓶盖区域出入库缓存点
            /// </summary>
            public string location { get; set; }
            /// <summary>
            /// 空/满
            /// </summary>
            public string ItemTrayType { get; set; }
            /// <summary>
            /// 设备类型 1:瓶盖机 2:瓶盖翻斗机
            /// </summary>
            public int deviceType { get; set; }
            /// <summary>
            /// 对应库区
            /// </summary>
            public string[] ProductArea { get; set; }
            /// <summary>
            /// 是否启用
            /// </summary>
            public string Enable { get; set; }
        }
        #endregion
 
        #region 瓶坯区域上下线指定库区
        private static string _updateCacheBit = "";
        private static string updateCacheBit
        {
            get
            {
                if (_updateCacheBit == "")
                {
                    _updateCacheBit = XmlHelper.GetElementValue("updateCacheBit");
                }
                return _updateCacheBit;
            }
        }
        private static List<updateCacheBitModel> updateCacheBitList = new List<updateCacheBitModel>();
        public static List<updateCacheBitModel> GetupdateCacheBitList()
        {
            if (updateCacheBitList.Count == 0 && updateCacheBit != "")
            {
                updateCacheBitList = JsonConvert.DeserializeObject<List<updateCacheBitModel>>(updateCacheBit);
            }
            return updateCacheBitList;
        }
        public class updateCacheBitModel
        {
            /// <summary>
            /// 瓶盖区域出入库缓存点
            /// </summary>
            public string location { get; set; }
            /// <summary>
            /// 空/满
            /// </summary>
            public string AGVlocation { get; set; }
 
        }
        #endregion
 
        #region 盘库实时更新库存
        private static string _PanKu = "";
        public static string PanKuList
        {
            get
            {
                if (_PanKu == "")
                {
                    _PanKu = XmlHelper.GetElementValue("PanKu");
                }
                return _PanKu;
            }
        }
 
        private static List<string> PanKu = new List<string>();
        public static List<string> GetPanKuList()
        {
            if (PanKu.Count == 0 && PanKuList != "")
            {
                PanKu = JsonConvert.DeserializeObject<List<string>>(PanKuList);
            }
            return PanKu;
        }
        #endregion
 
        #region 柔性线段
        private static string _flexibility = "";
        public static string flexibilityList
        {
            get
            {
                if (_flexibility == "")
                {
                    _flexibility = XmlHelper.GetElementValue("flexibility");
                }
                return _flexibility;
            }
        }
 
        private static List<flexibilitymodel> flexibility = new List<flexibilitymodel>();
        public static List<flexibilitymodel> GetflexibilityList()
        {
            if (flexibility.Count == 0 && flexibilityList != "")
            {
                flexibility = JsonConvert.DeserializeObject<List<flexibilitymodel>>(flexibilityList);
            }
            return flexibility;
        }
 
        public class flexibilitymodel
        {
            public string AGVbit { get; set; }
            public List<int> col { get; set; } = new List<int>();
            public string row { get; set; }
            public string area { get; set; }
        }
        #endregion
 
        #region flexibilityenable
        private static string _flexibilityenable = "";
        public static string flexibilityenable
        {
            get
            {
                if (_flexibilityenable == "")
                {
                    _flexibilityenable = XmlHelper.GetElementValue("flexibilityenable");
                }
                return _flexibilityenable;
            }
        }
        #endregion
 
        #region FULEenable
        private static string _FULEenable = "";
        public static string FULEenable
        {
            get
            {
                if (_FULEenable == "")
                {
                    _FULEenable = XmlHelper.GetElementValue("FULEenable");
                }
                return _FULEenable;
            }
        }
        #endregion
 
        #region 成品库区分类
        private static string _AreaType = "";
        private static string AreaType
        {
            get
            {
                if (_AreaType == "")
                {
                    _AreaType = XmlHelper.GetElementValue("AreaType");
                }
                return _AreaType;
            }
        }
        private static List<AreaTypeModel> AreaTypeList = new List<AreaTypeModel>();
        public static List<AreaTypeModel> GetAreaTypeList()
        {
            if (AreaTypeList.Count == 0 && DaMingShanPriProLine != "")
            {
                AreaTypeList = JsonConvert.DeserializeObject<List<AreaTypeModel>>(AreaType);
            }
            return AreaTypeList;
        }
 
        public class AreaTypeModel
        {
            public string AreaName { get; set; }
            public string[] AreaCode { get; set; }
            public string AreaType { get; set; }
        }
        #endregion
 
        #endregion
 
        #region 自动转运流程配置
        private static string _inStockCacheArea = "";
        private static string inStockCacheArea
        {
            get
            {
                if (_inStockCacheArea == "")
                {
                    _inStockCacheArea = XmlHelper.GetElementValue("inStockCacheArea");
                }
                return _inStockCacheArea;
            }
        }
        private static List<inStockCacheAreaModel> inStockCacheAreaList = new List<inStockCacheAreaModel>();
        public static List<inStockCacheAreaModel> GetinStockCacheAreaList()
        {
            if (inStockCacheAreaList.Count == 0 && inStockCacheArea != "")
            {
                inStockCacheAreaList = JsonConvert.DeserializeObject<List<inStockCacheAreaModel>>(inStockCacheArea);
            }
            return inStockCacheAreaList;
        }
        public class inStockCacheAreaModel
        {
            public string deviceName { get; set; }
            /// <summary>
            /// 空满筐缓存区
            /// </summary>
            public string CacheAreaNo { get; set; }
            /// <summary>
            /// 对应库区
            /// </summary>
            public string ProductArea { get; set; }
            public string CacheAreaNoLock { get; set; }
            public int Priority { get; set; }
            public string ProductAreaLock { get; set; }
            public int CntrCount { get; set; }
            public string TaskType { get; set; }
            /// <summary>
            /// 是否启用
            /// </summary>
            public string Enable { get; set; }
        }
        #endregion
 
        #region 根据物料不同自动选择终点库区配置
        private static string _ItemCacheArea = "";
        private static string ItemCacheArea
        {
            get
            {
                if (_ItemCacheArea == "")
                {
                    _ItemCacheArea = XmlHelper.GetElementValue("ItemCacheArea");
                }
                return _ItemCacheArea;
            }
        }
        private static List<ItemCacheAreaModel> ItemCacheAreaList = new List<ItemCacheAreaModel>();
        public static List<ItemCacheAreaModel> GetItemCacheAreaList()
        {
            if (ItemCacheAreaList.Count == 0 && inStockCacheArea != "")
            {
                ItemCacheAreaList = JsonConvert.DeserializeObject<List<ItemCacheAreaModel>>(ItemCacheArea);
            }
            return ItemCacheAreaList;
        }
        public class ItemCacheAreaModel
        {
            public string ItemCode { get; set; }
            public string AreaCode { get; set; }
        }
        #endregion
        #endregion
    }
}