林豪 左 3 anos atrás
pai
commit
1f601c1fa8

+ 28 - 5
Projects/永冠OPP/WCS.Entity.Protocol/RGV/WCS_RGV521.cs

@@ -1,4 +1,5 @@
-using System.Runtime.Serialization;
+using SqlSugar;
+using System.Runtime.Serialization;
 using WCS.Entity.Protocol.RGV;
 
 namespace WCS.Entity.Protocol
@@ -6,82 +7,104 @@ namespace WCS.Entity.Protocol
     /// <summary>
     /// RGV 读取协议 后缀 _1=1工位 _2=2工位 无=共用
     /// </summary>
+    [SugarTable(nameof(WCS_RGV521), "RGV 读取协议 后缀 _1=1工位 _2=2工位 无=共用")]
     [DataContract]
     public class WCS_RGV521 : WCS_PROTOCOLDATA, IRGV521
     {
+        [SugarColumn(ColumnDescription = "任务号")]
         [DataMember(Order = 0)]
         public int TaskID_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "任务类型")]
         [DataMember(Order = 1)]
         public RGVTaskType TaskType_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "起始站台")]
         [DataMember(Order = 2)]
         public short StartPosition_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "目标站台")]
         [DataMember(Order = 3)]
         public short DestPosition_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "优先级")]
         [DataMember(Order = 4)]
         public short PRIORITY_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "备用1")]
         [DataMember(Order = 5)]
         public short RES1_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "备用2")]
         [DataMember(Order = 6)]
         public short RES2_1 { get; set; }
 
-        /// <summary>
-        ///
-        /// </summary>
+        [SugarColumn(ColumnDescription = "状态")]
         [DataMember(Order = 7)]
         public RGVStatus Status_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "凭证号")]
         [DataMember(Order = 8)]
         public int Trigger_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "任务号")]
         [DataMember(Order = 9)]
         public int TaskID_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "任务类型")]
         [DataMember(Order = 10)]
         public RGVTaskType TaskType_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "起始站点")]
         [DataMember(Order = 11)]
         public short StartPosition_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "目标站点")]
         [DataMember(Order = 12)]
         public short DestPosition_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "优先级")]
         [DataMember(Order = 13)]
         public short PRIORITY_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "备用1")]
         [DataMember(Order = 14)]
         public short RES1_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "备用2")]
         [DataMember(Order = 15)]
         public short RES2_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "状态")]
         [DataMember(Order = 16)]
         public RGVStatus Status_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "凭证号")]
         [DataMember(Order = 17)]
         public int Trigger_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "运行状态")]
         [DataMember(Order = 18)]
         public RGVRunStatus SystemStatus { get; set; }
 
+        [SugarColumn(ColumnDescription = "运行模式")]
         [DataMember(Order = 19)]
         public RGVMode WorkMode { get; set; }
 
+        [SugarColumn(ColumnDescription = "备用6")]
         [DataMember(Order = 20)]
         public short RES6 { get; set; }
 
+        [SugarColumn(ColumnDescription = "位置")]
         [DataMember(Order = 21)]
         public float Position { get; set; }
 
+        [SugarColumn(ColumnDescription = "里程")]
         [DataMember(Order = 22)]
         public float Mileage { get; set; }
 
+        [SugarColumn(ColumnDescription = "运行时长")]
         [DataMember(Order = 23)]
         public float Runtime { get; set; }
     }
-}
+}

+ 10 - 2
Projects/永冠OPP/WCS.Entity.Protocol/RGV/WCS_RGV523.cs

@@ -1,4 +1,5 @@
-using System.Runtime.Serialization;
+using SqlSugar;
+using System.Runtime.Serialization;
 using WCS.Entity.Protocol.RGV;
 
 namespace WCS.Entity.Protocol
@@ -6,25 +7,32 @@ namespace WCS.Entity.Protocol
     /// <summary>
     /// RGV状态记录
     /// </summary>
+    [SugarTable(nameof(WCS_RGV523), "RGV状态记录")]
     [DataContract]
     public class WCS_RGV523 : WCS_PROTOCOLDATA, IRGV523
     {
+        [SugarColumn(ColumnDescription = "环形穿梭车故障")]
         [DataMember(Order = 0)]
         public RGVFault Fault { get; set; }
 
+        [SugarColumn(ColumnDescription = "工位1故障")]
         [DataMember(Order = 1)]
         public RGVPlatformFault Fault1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "工位2故障")]
         [DataMember(Order = 2)]
         public RGVPlatformFault Fault2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "环穿状态")]
         [DataMember(Order = 3)]
         public RGVStatus Status { get; set; }
 
+        [SugarColumn(ColumnDescription = "工位1状态")]
         [DataMember(Order = 4)]
         public RGVPlatformStatus Status1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "工位2状态")]
         [DataMember(Order = 5)]
         public RGVPlatformStatus Status2 { get; set; }
     }
-}
+}

+ 1 - 1
Projects/永冠OPP/WCS.Entity.Protocol/SRM/ISRM521.cs

@@ -317,7 +317,7 @@ namespace WCS.Entity.Protocol
         SCMode SRMMode { get; set; }
 
         /// <summary>
-        /// 堆垛机模式
+        /// 堆垛机状态
         /// </summary>
         SCRunStatus SRMStatus { get; set; }
 

+ 40 - 2
Projects/永冠OPP/WCS.Entity.Protocol/SRM/WCS_SRM520.cs

@@ -1,4 +1,5 @@
-using System.Runtime.Serialization;
+using SqlSugar;
+using System.Runtime.Serialization;
 using WCS.Entity.Protocol.SRM;
 
 namespace WCS.Entity.Protocol
@@ -6,115 +7,152 @@ namespace WCS.Entity.Protocol
     /// <summary>
     /// 堆垛机协议,WCS写入
     /// </summary>
+    [SugarTable(nameof(WCS_SRM520), "堆垛机协议,WCS写入")]
     [DataContract]
     public class WCS_SRM520 : WCS_PROTOCOLDATA, ISRM520
     {
+        [SugarColumn(ColumnDescription = "WCS心跳信号")]
         [DataMember(Order = 0)]
         public short Handshake_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "货物数量")]
         [DataMember(Order = 1)]
         public short RES1_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "备用")]
         [DataMember(Order = 2)]
         public short RES2_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "货物类型")]
         [DataMember(Order = 3)]
         public short GoodsType_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "速度")]
         [DataMember(Order = 4)]
         public SCSpeedMode SpeedMode_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "起始行")]
         [DataMember(Order = 5)]
         public short SLine_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "起始列")]
         [DataMember(Order = 6)]
         public short SCol_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "起始层")]
         [DataMember(Order = 7)]
         public short SLayer_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "起始深度")]
         [DataMember(Order = 8)]
         public short SDepth_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "目标行")]
         [DataMember(Order = 9)]
         public short ELine_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "目标列")]
         [DataMember(Order = 10)]
         public short ECol_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "目标层")]
         [DataMember(Order = 11)]
         public short ELayer_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "目标深度")]
         [DataMember(Order = 12)]
         public short EDepth_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "任务号")]
         [DataMember(Order = 13)]
         public int TaskID_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "触发")]
         [DataMember(Order = 14)]
         public short VoucherNo_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "完成任务触发")]
         [DataMember(Order = 15)]
         public short FinishedACK_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "备用3")]
         [DataMember(Order = 16)]
         public short RES3_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "备用4")]
         [DataMember(Order = 17)]
         public short RES4_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "WCS心跳信号")]
         [DataMember(Order = 18)]
         public short Handshake_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "货物数量")]
         [DataMember(Order = 19)]
         public short RES1_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "备用2")]
         [DataMember(Order = 20)]
         public short RES2_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "货物类型")]
         [DataMember(Order = 21)]
         public short GoodsType_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "行驶速度")]
         [DataMember(Order = 22)]
         public SCSpeedMode SCSpeedMode_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "起始行")]
         [DataMember(Order = 23)]
         public short SLine_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "起始列")]
         [DataMember(Order = 24)]
         public short SCol_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "起始层")]
         [DataMember(Order = 25)]
         public short SLayer_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "起始深度")]
         [DataMember(Order = 26)]
         public short SDepth_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "目标行")]
         [DataMember(Order = 27)]
         public short ELine_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "目标列")]
         [DataMember(Order = 28)]
         public short ECol_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "目标层")]
         [DataMember(Order = 29)]
         public short ELayer_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "目标深度")]
         [DataMember(Order = 30)]
         public short EDepth_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "任务号")]
         [DataMember(Order = 31)]
         public int TaskID_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "触发")]
         [DataMember(Order = 32)]
         public short VoucherNo_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "完成任务触发")]
         [DataMember(Order = 33)]
         public short FinishedACK_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "备用3")]
         [DataMember(Order = 34)]
         public short RES3_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "备用4")]
         [DataMember(Order = 35)]
         public short RES4_2 { get; set; }
     }
-}
+}

+ 68 - 3
Projects/永冠OPP/WCS.Entity.Protocol/SRM/WCS_SRM521.cs

@@ -1,4 +1,5 @@
-using System.Runtime.Serialization;
+using SqlSugar;
+using System.Runtime.Serialization;
 using WCS.Entity.Protocol.SRM;
 
 namespace WCS.Entity.Protocol
@@ -6,196 +7,260 @@ namespace WCS.Entity.Protocol
     /// <summary>
     /// 堆垛机协议,WCS只读
     /// </summary>
+    [SugarTable(nameof(WCS_SRM521), "堆垛机协议,WCS只读")]
     [DataContract]
     public class WCS_SRM521 : WCS_PROTOCOLDATA, ISRM521
     {
+        [SugarColumn(ColumnDescription = "货叉状态")]
         [DataMember(Order = 0)]
         public SRMForkStatus ForkStatus_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "模式")]
         [DataMember(Order = 1)]
         public SCMode Mode_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "运行状态")]
         [DataMember(Order = 2)]
         public SCRunStatus Status_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "起始行")]
         [DataMember(Order = 3)]
         public short SLine_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "起始列")]
         [DataMember(Order = 4)]
         public short SCol_1 { get; set; }
 
-        [DataMember(Order = 5)]   
+        [SugarColumn(ColumnDescription = "起始层")]
+        [DataMember(Order = 5)]
         public short SLayer_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "起始深度")]
         [DataMember(Order = 6)]
         public short SDepth_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "目标行")]
         [DataMember(Order = 7)]
         public short ELine_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "目标列")]
         [DataMember(Order = 8)]
         public short ECol_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "目标层")]
         [DataMember(Order = 9)]
         public short ELayer_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "目标深度")]
         [DataMember(Order = 10)]
         public short EDepth_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "任务号")]
         [DataMember(Order = 11)]
         public int TaskID_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "触发信号")]
         [DataMember(Order = 12)]
         public short VoucherNo_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "当前行")]
         [DataMember(Order = 13)]
         public short Line_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "当前列")]
         [DataMember(Order = 14)]
         public short Col_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "当前层")]
         [DataMember(Order = 15)]
         public short Layer_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "已完成任务号")]
         [DataMember(Order = 16)]
         public int FinishedTask_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "X轴位置(0.1毫米) 行走")]
         [DataMember(Order = 17)]
         public int TravelPos_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "Y轴位置 提升")]
         [DataMember(Order = 18)]
         public int LiftPos_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "Z轴位置 货叉")]
         [DataMember(Order = 19)]
         public int ForkPos_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "备用 PLCname=Start_number1")]
         [DataMember(Order = 20)]
         public short RES9_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "备用 PLCname=End_number2")]
         [DataMember(Order = 21)]
         public short RES10_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "总里程")]
         [DataMember(Order = 22)]
         public float TotalKM_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "货物类型")]
         [DataMember(Order = 23)]
         public short GoodsType_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "运行时长")]
         [DataMember(Order = 24)]
         public float Runtime_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "备用 PLCname=ForkPos2")]
         [DataMember(Order = 25)]
         public int RES11_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "备用 PLCname=Dest_Xmm")]
         [DataMember(Order = 26)]
         public int RES12_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "备用 PLCname=Dest_Ymm")]
         [DataMember(Order = 27)]
         public int RES13_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "备用 PLCname=Dest_Zmm")]
         [DataMember(Order = 28)]
         public int RES14_1 { get; set; }
 
+        [SugarColumn(ColumnDescription = "货叉状态")]
         [DataMember(Order = 29)]
         public SRMForkStatus ForkStatus_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "模式")]
         [DataMember(Order = 30)]
         public SCMode Mode_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "运行状态")]
         [DataMember(Order = 31)]
         public SCRunStatus Status_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "起始行")]
         [DataMember(Order = 32)]
         public short SLine_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "起始列")]
         [DataMember(Order = 33)]
         public short SCol_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "起始层")]
         [DataMember(Order = 34)]
         public short SLayer_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "起始深度")]
         [DataMember(Order = 35)]
         public short SDepth_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "目标行")]
         [DataMember(Order = 36)]
         public short ELine_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "目标列")]
         [DataMember(Order = 37)]
         public short ECol_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "目标层")]
         [DataMember(Order = 38)]
         public short ELayer_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "目标深度")]
         [DataMember(Order = 39)]
         public short EDepth_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "任务号")]
         [DataMember(Order = 40)]
         public int TaskID_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "触发信号")]
         [DataMember(Order = 41)]
         public short VoucherNo_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "当前行")]
         [DataMember(Order = 42)]
         public short Line_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "当前列")]
         [DataMember(Order = 43)]
         public short Col_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "当前层")]
         [DataMember(Order = 44)]
         public short Layer_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "已完成任务号")]
         [DataMember(Order = 45)]
         public int FinishedTask_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "X轴位置(0.1毫米) 行走")]
         [DataMember(Order = 46)]
         public int TravelPos_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "Y轴位置 提升")]
         [DataMember(Order = 47)]
         public int LiftPos_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "Z轴位置 货叉")]
         [DataMember(Order = 48)]
         public int ForkPos_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "备用 PLCname=Start_number1")]
         [DataMember(Order = 49)]
         public short RES9_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "备用 PLCname=End_number2")]
         [DataMember(Order = 50)]
         public short RES10_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "总里程")]
         [DataMember(Order = 51)]
         public float TotalKM_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "货物类型")]
         [DataMember(Order = 52)]
         public short GoodsType_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "运行时长")]
         [DataMember(Order = 53)]
         public float Runtime_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "备用 PLCname=ForkPos2")]
         [DataMember(Order = 54)]
         public int RES11_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "备用 PLCname=Dest_Xmm")]
         [DataMember(Order = 55)]
         public int RES12_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "备用 PLCname=Dest_Ymm")]
         [DataMember(Order = 56)]
         public int RES13_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "备用 PLCname=Dest_Zmm")]
         [DataMember(Order = 57)]
         public int RES14_2 { get; set; }
 
+        [SugarColumn(ColumnDescription = "堆垛机模式")]
         [DataMember(Order = 58)]
         public SCMode SRMMode { get; set; }
 
+        [SugarColumn(ColumnDescription = "堆垛机状态")]
         [DataMember(Order = 59)]
         public SCRunStatus SRMStatus { get; set; }
 
+        [SugarColumn(ColumnDescription = "总里程")]
         [DataMember(Order = 60)]
         public float TotalKM { get; set; }
 
+        [SugarColumn(ColumnDescription = "运行时长")]
         [DataMember(Order = 61)]
         public float Runtime { get; set; }
 
+        [SugarColumn(ColumnDescription = "堆垛机是否异常 1:异常 0:正常")]
         [DataMember(Order = 62)]
         public short Alarm { get; set; }
     }
-}
+}

+ 5 - 2
Projects/永冠OPP/WCS.Entity.Protocol/SRM/WCS_SRM537.cs

@@ -1,4 +1,5 @@
-using System.Runtime.Serialization;
+using SqlSugar;
+using System.Runtime.Serialization;
 using WCS.Entity.Protocol.SRM;
 
 namespace WCS.Entity.Protocol
@@ -6,10 +7,12 @@ namespace WCS.Entity.Protocol
     /// <summary>
     /// 堆垛机异常读取
     /// </summary>
+    [SugarTable(nameof(WCS_SRM537), "堆垛机异常读取")]
     [DataContract]
     public class WCS_SRM537 : WCS_PROTOCOLDATA, ISRM537
     {
+        [SugarColumn(ColumnDescription = "堆垛机报警")]
         [DataMember(Order = 0)]
         public SCAlarm SCAlarm { get; set; }
     }
-}
+}

+ 34 - 14
Projects/永冠OPP/WCS.Entity.Protocol/Station/WCS_Station520.cs

@@ -1,33 +1,53 @@
-using System.Runtime.Serialization;
+using SqlSugar;
+using System.Runtime.Serialization;
 
 namespace WCS.Entity.Protocol.Station
 {
     /// <summary>
-    /// 站台交互信号 写记录表 
+    /// 站台交互信号 写记录表
     /// </summary>
+    [SugarTable(nameof(WCS_Station520), "站台交互信号 写记录表")]
     [DataContract]
     public class WCS_Station520 : WCS_PROTOCOLDATA, IStation520
     {
+        [SugarColumn(ColumnDescription = "任务号")]
         [DataMember(Order = 0)]
-        public int Tasknum { get  ; set  ; }
+        public int Tasknum { get; set; }
+
+        [SugarColumn(ColumnDescription = "货物数条码 涂布入库口代表AGV任务")]
         [DataMember(Order = 1)]
-        public int Goodscode { get  ; set  ; }
+        public int Goodscode { get; set; }
+
+        [SugarColumn(ColumnDescription = "货物数量(1.两个位置放1个货物,2.两个位置放2个货物)")]
         [DataMember(Order = 2)]
-        public short Goodsnum { get  ; set  ; }
+        public short Goodsnum { get; set; }
+
+        [SugarColumn(ColumnDescription = "货物高度")]
         [DataMember(Order = 3)]
-        public short GoodsSize { get  ; set  ; }
+        public short GoodsSize { get; set; }
+
+        [SugarColumn(ColumnDescription = "起始地址")]
         [DataMember(Order = 4)]
-        public short Goodsstart { get  ; set  ; }
+        public short Goodsstart { get; set; }
+
+        [SugarColumn(ColumnDescription = "目标地址")]
         [DataMember(Order = 5)]
-        public short Goodsend { get  ; set  ; }
+        public short Goodsend { get; set; }
+
+        [SugarColumn(ColumnDescription = "请求")]
         [DataMember(Order = 6)]
-        public IstationRequest Request { get  ; set  ; }
+        public IstationRequest Request { get; set; }
+
+        [SugarColumn(ColumnDescription = "命令类型")]
         [DataMember(Order = 7)]
-        public IstationCmdType CmdType { get  ; set  ; }
+        public IstationCmdType CmdType { get; set; }
+
+        [SugarColumn(ColumnDescription = "凭证号 每次累加")]
         [DataMember(Order = 8)]
-        public short VoucherNo { get  ; set  ; }
+        public short VoucherNo { get; set; }
+
+        [SugarColumn(ColumnDescription = "输送机状态")]
         [DataMember(Order = 9)]
-        public IstationStatus Istation521Status { get  ; set  ; }
-       
+        public IstationStatus Istation521Status { get; set; }
     }
-}
+}

+ 13 - 2
Projects/永冠OPP/WCS.Entity.Protocol/Station/WCS_Station521.cs

@@ -1,39 +1,50 @@
-using System.ComponentModel;
+using SqlSugar;
 using System.Runtime.Serialization;
 
 namespace WCS.Entity.Protocol.Station
 {
+    [SugarTable(nameof(WCS_Station521), "输送机交互信号 读记录表")]
     [DataContract]
     public class WCS_Station521 : WCS_PROTOCOLDATA, IStation521
     {
+        [SugarColumn(ColumnDescription = "任务号")]
         [DataMember(Order = 0)]
         public int Tasknum { get; set; }
 
+        [SugarColumn(ColumnDescription = "货物数条码 涂布入库扫码位是AGV任务号")]
         [DataMember(Order = 1)]
         public int Goodscode { get; set; }
 
+        [SugarColumn(ColumnDescription = "货物数量(1.两个位置放1个货物,2.两个位置放2个货物)")]
         [DataMember(Order = 2)]
         public short Goodsnum { get; set; }
 
+        [SugarColumn(ColumnDescription = "货物高度")]
         [DataMember(Order = 3)]
         public short GoodsSize { get; set; }
 
+        [SugarColumn(ColumnDescription = "起始地址")]
         [DataMember(Order = 4)]
         public short Goodsstart { get; set; }
 
+        [SugarColumn(ColumnDescription = "目标地址")]
         [DataMember(Order = 5)]
         public short Goodsend { get; set; }
 
+        [SugarColumn(ColumnDescription = "请求")]
         [DataMember(Order = 6)]
         public IstationRequest Request { get; set; }
 
+        [SugarColumn(ColumnDescription = "命令类型")]
         [DataMember(Order = 7)]
         public IstationCmdType CmdType { get; set; }
 
+        [SugarColumn(ColumnDescription = "凭证号 每次累加")]
         [DataMember(Order = 8)]
         public short VoucherNo { get; set; }
 
+        [SugarColumn(ColumnDescription = "输送机状态")]
         [DataMember(Order = 9)]
         public IstationStatus Status { get; set; }
     }
-}
+}

+ 8 - 2
Projects/永冠OPP/WCS.Entity.Protocol/Station/WCS_Station523.cs

@@ -1,23 +1,29 @@
-using System.Runtime.Serialization;
+using SqlSugar;
+using System.Runtime.Serialization;
 
 namespace WCS.Entity.Protocol.Station
 {
     /// <summary>
     /// 站台状态读取记录表
     /// </summary>
+    [SugarTable(nameof(WCS_Station523), "站台状态读取记录表")]
     [DataContract]
     public class WCS_Station523 : WCS_PROTOCOLDATA, IStation523
     {
+        [SugarColumn(ColumnDescription = "警报")]
         [DataMember(Order = 0)]
         public StationFault Alarm { get; set; }
 
+        [SugarColumn(ColumnDescription = "备用")]
         [DataMember(Order = 1)]
         public short RES { get; set; }
 
+        [SugarColumn(ColumnDescription = "允许状态 值为零时是手动")]
         [DataMember(Order = 2)]
         public StationStatus Status { get; set; }
 
+        [SugarColumn(ColumnDescription = "运行时间")]
         [DataMember(Order = 3)]
         public float RunTime { get; set; }
     }
-}
+}

+ 62 - 12
Projects/永冠OPP/WCS.Service/Worker.cs

@@ -6,6 +6,7 @@ using Microsoft.Extensions.Logging;
 using Newtonsoft.Json;
 using SqlSugar;
 using System;
+using System.Collections.Generic;
 using System.IO;
 using System.Linq;
 using System.Reflection;
@@ -18,6 +19,7 @@ using WCS.Core.DataTrans;
 using WCS.Entity;
 using WCS.Entity.Protocol;
 using WCS.Entity.Protocol.BCR;
+using WCS.Entity.Protocol.Station;
 
 namespace WCS.Service
 {
@@ -50,15 +52,64 @@ namespace WCS.Service
             Configs.ProtocolProxyBaseType = typeof(ProtocolProxy);
             Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
             Configs.StringEncoding = Encoding.UTF8;
-            var data = new PLCData()
+
+            Db.CreateContext(new ConnectionConfig()
             {
-                IP = "192.168.3.1",
-                DB = "520",
-                Length = 1320,
-                DataLength = 22,
-            };
-            PlcData.Init("127.0.0.1,database=0").InitPlcData(data);
+                ConnectionString = AppSettings.Config.GetConnectionString("WCSDB"),
+                DbType = DbType.MySql
+            }, "WCSDB");
+            Db.SetDefaultDbContextType("WCSDB");
+            Db.Do(db =>
+            {
+                //TODO:DbMaintenance.CreateDatabase()并没起到作用,如果没有对应的数据库的话任然需要手动新建一个
+                db.Default.DbMaintenance.CreateDatabase();
+                db.Default.CodeFirst.InitTables(typeof(WCS_CMD));
+                db.Default.CodeFirst.InitTables(typeof(WCS_PLC));
+                db.Default.CodeFirst.InitTables(typeof(WCS_DATABLOCK));
+                db.Default.CodeFirst.InitTables(typeof(WCS_DEVICE));
+                db.Default.CodeFirst.InitTables(typeof(WCS_PATH));
+                db.Default.CodeFirst.InitTables(typeof(WCS_PATHPOINT));
+                db.Default.CodeFirst.InitTables(typeof(WCS_ROUTE));
+                db.Default.CodeFirst.InitTables(typeof(WCS_TASK));
+                db.Default.CodeFirst.InitTables(typeof(WCS_TASK_OLD));
+                db.Default.CodeFirst.InitTables(typeof(WCS_EXCEPTION));
+                db.Default.CodeFirst.InitTables(typeof(WCS_SystemConfig));
+                db.Default.CodeFirst.InitTables(typeof(WCS_AGVTask));
+                db.Default.CodeFirst.InitTables(typeof(WCS_DEVICEPROTOCOL));
+                db.Default.CodeFirst.InitTables(typeof(WCS_GROUPMEMBER));
+                db.Default.CodeFirst.InitTables(typeof(WCS_MAPPINGENTRY));
+                db.Default.CodeFirst.InitTables(typeof(WCS_USERS));
+                db.Default.CodeFirst.InitTables(typeof(WCS_StatusLog));
+                db.Default.CodeFirst.InitTables(typeof(WCS_BCR80));
+                db.Default.CodeFirst.InitTables(typeof(WCS_RGV520));
+                db.Default.CodeFirst.InitTables(typeof(WCS_RGV521));
+                db.Default.CodeFirst.InitTables(typeof(WCS_RGV523));
+                db.Default.CodeFirst.InitTables(typeof(WCS_SRM520));
+                db.Default.CodeFirst.InitTables(typeof(WCS_SRM521));
+                db.Default.CodeFirst.InitTables(typeof(WCS_SRM537));
+                db.Default.CodeFirst.InitTables(typeof(WCS_Station520));
+                db.Default.CodeFirst.InitTables(typeof(WCS_Station521));
+                db.Default.CodeFirst.InitTables(typeof(WCS_Station523));
+            });
+
+            //从现有结构解析出需要的结构
+            List<PLCData> list = new List<PLCData>();
+            Db.Do(db =>
+            {
+                var dataBlocks = db.Default.Queryable<WCS_DATABLOCK>().Includes(v => v.PLC).ToList();
+                foreach (var dataBlock in dataBlocks)
+                {
+                    list.Add(new PLCData()
+                    {
+                        IP = dataBlock.PLC.IP,
+                        DB = dataBlock.NO,
+                        Length = dataBlock.LENGTH,
+                        DataLength = dataBlock.DATALENGTH,
+                    });
+                }
+            });
 
+            PlcData.Init("127.0.0.1,database=0").InitPlcData(list);
             //日志发布事件s
             Configs.PublishEvent += () =>
             {
@@ -68,8 +119,7 @@ namespace WCS.Service
             //异常上抛
             Configs.UploadException = (d, s) =>
             {
-                if (s == "接口调用中")
-                    return;
+                if (s == "接口调用中") return;
                 if (ProtocolProxy.AllDatas.ContainsKey(d))
                 {
                     ProtocolProxy.AllDatas[d].Info = s;
@@ -86,9 +136,9 @@ namespace WCS.Service
                 Db.Do(db =>
                 {
                     var items = db.Default.Queryable<WCS_DEVICEPROTOCOL>()
-                   .Includes(v => v.DEVICE.ROUTES)
-                   .Includes(v => v.DEVICE.PATHS)
-                   .Includes(v => v.DB.PLC).ToArray();
+                    .Includes(d => d.DEVICE, r => r.ROUTES)
+                    .Includes(d => d.DEVICE, p => p.PATHS)
+                    .Includes(d => d.DB, p => p.PLC).ToArray();
                     items.Select(v => v.Data()).ToArray();
                     LogicHandler.AllObjects.AddRange(items);
 

+ 6 - 6
Projects/永冠OPP/WCS.Service/Works/RGV/RGVWorks.cs

@@ -6,11 +6,11 @@ using WCS.Service.Handlers;
 namespace WCS.Service.Works.RGV
 {
     [WorkTitle(typeof(RGVHandler), "直穿RGV")]
-    public class 直穿RGV : Work<IRGV520>
+    public class 直穿RGV : DeviceWork<Device<IRGV520, IRGV521, IRGV523>>
     {
         private const string Rgv8 = "RGV8";
 
-        protected override void Do(IRGV520 rgv)
+        protected override void Do(Device<IRGV520, IRGV521, IRGV523> rgv)
         {
         }
 
@@ -21,9 +21,9 @@ namespace WCS.Service.Works.RGV
     }
 
     [WorkTitle(typeof(RGVHandler), "涂布环穿")]
-    public class 涂布环穿 : Work<IRGV520>
+    public class 涂布环穿 : DeviceWork<Device<IRGV520, IRGV521, IRGV523>>
     {
-        protected override void Do(IRGV520 obj)
+        protected override void Do(Device<IRGV520, IRGV521, IRGV523> obj)
         {
         }
 
@@ -34,9 +34,9 @@ namespace WCS.Service.Works.RGV
     }
 
     [WorkTitle(typeof(RGVHandler), "BOPP环穿")]
-    public class BOPP环穿 : Work<IRGV520>
+    public class BOPP环穿 : DeviceWork<Device<IRGV520, IRGV521, IRGV523>>
     {
-        protected override void Do(IRGV520 obj)
+        protected override void Do(Device<IRGV520, IRGV521, IRGV523> obj)
         {
         }
 

+ 2 - 2
Projects/永冠OPP/WCS.Service/Works/SRM/SRMWork.cs

@@ -7,7 +7,7 @@ using WCS.Service.Handlers;
 namespace WCS.Service.Works.SRM
 {
     [WorkTitle(typeof(SRMHandler), "堆垛机")]
-    internal class SRMWork : Work<ISRM520>
+    internal class SRMWork : DeviceWork<Device<ISRM520, ISRM521, ISRM537>>
     {
         //月台发货需要的设备
         private ISRM520[] DockDevs;
@@ -20,7 +20,7 @@ namespace WCS.Service.Works.SRM
             }.Select(v => Device.Find(v)).SelectMany(v => v.DEVICEGROUP).Select(v => v.MEMBER.Create<ISRM520>()).ToArray();
         }
 
-        protected override void Do(ISRM520 obj)
+        protected override void Do(Device<ISRM520, ISRM521, ISRM537> obj)
         {
         }
 

+ 6 - 7
Projects/永冠OPP/WCS.Service/Works/Station/BOPP入库.cs

@@ -2,7 +2,6 @@
 using WCS.Core;
 using WCS.Entity;
 using WCS.Entity.Protocol;
-using WCS.Service.Extensions;
 using WCS.Service.Handlers;
 
 namespace WCS.Service.Works.Station
@@ -11,9 +10,9 @@ namespace WCS.Service.Works.Station
     ///BOPP扫码入库
     /// </summary>
     [WorkTitle(typeof(BOPPHandler), "BOPP扫码入库")]
-    public class BOPP扫码入库 : Work<IStation520>
+    public class BOPP扫码入库 : DeviceWork<Device<IStation520, IStation521, IStation523>>
     {
-        protected override void Do(IStation520 obj)
+        protected override void Do(Device<IStation520, IStation521, IStation523> obj)
         {
         }
 
@@ -27,9 +26,9 @@ namespace WCS.Service.Works.Station
     /// BOPP巷道分配
     /// </summary>
     [WorkTitle(typeof(BOPPHandler), "BOPP巷道分配")]
-    public class BOPP巷道分配 : Work<IStation520>
+    public class BOPP巷道分配 : DeviceWork<Device<IStation520, IStation521, IStation523>>
     {
-        protected override void Do(IStation520 obj)
+        protected override void Do(Device<IStation520, IStation521, IStation523> obj)
         {
         }
 
@@ -43,9 +42,9 @@ namespace WCS.Service.Works.Station
     /// 涂布入库旋转台二次分配巷道
     /// </summary>
     [WorkTitle(typeof(BOPPHandler), "BOPP入库旋转台二次分配巷道")]
-    public class BOPP入库旋转台二次分配巷道 : Work<IStation520>
+    public class BOPP入库旋转台二次分配巷道 : DeviceWork<Device<IStation520, IStation521, IStation523>>
     {
-        protected override void Do(IStation520 obj)
+        protected override void Do(Device<IStation520, IStation521, IStation523> obj)
         {
         }
 

+ 8 - 8
Projects/永冠OPP/WCS.Service/Works/Station/一楼入库.cs

@@ -7,35 +7,35 @@ using WCS.Service.Handlers;
 namespace WCS.Service.Works.Station
 {
     [WorkTitle(typeof(ProductHandler), "扫码入库")]
-    internal class 扫码入库 : Work<IStation520>
+    internal class 扫码入库 : DeviceWork<Device<IStation520, IStation521, IStation523>>
     {
         protected override bool SelectDevice(WCS_DEVICE dev)
         {
             return dev.CODE == "G1028";
         }
 
-        protected override void Do(IStation520 obj)
+        protected override void Do(Device<IStation520, IStation521, IStation523> obj)
         {
         }
     }
 
     [WorkTitle(typeof(ProductHandler), "一楼分配巷道")]
-    internal class 巷道分配 : Work<IStation520>
+    internal class 巷道分配 : DeviceWork<Device<IStation520, IStation521, IStation523>>
     {
         protected override bool SelectDevice(WCS_DEVICE dev)
         {
             return dev.CODE == "G1030";
         }
 
-        protected override void Do(IStation520 obj)
+        protected override void Do(Device<IStation520, IStation521, IStation523> obj)
         {
         }
     }
 
     //[WorkTitle(typeof(ProductHandler), "一楼入库旋转台二次分配巷道")]
-    internal class 一楼入库旋转台二次分配巷道 : Work<IStation520>
+    internal class 一楼入库旋转台二次分配巷道 : DeviceWork<Device<IStation520, IStation521, IStation523>>
     {
-        protected override void Do(IStation520 obj)
+        protected override void Do(Device<IStation520, IStation521, IStation523> obj)
         {
         }
 
@@ -48,9 +48,9 @@ namespace WCS.Service.Works.Station
     }
 
     [WorkTitle(typeof(ProductHandler), "一楼RGV放货结束分配目标地址")]
-    internal class 一楼RGV放货结束分配目标地址 : Work<IStation520>
+    internal class 一楼RGV放货结束分配目标地址 : DeviceWork<Device<IStation520, IStation521, IStation523>>
     {
-        protected override void Do(IStation520 obj)
+        protected override void Do(Device<IStation520, IStation521, IStation523> obj)
         {
         }
 

+ 6 - 6
Projects/永冠OPP/WCS.Service/Works/Station/一楼出库.cs

@@ -7,9 +7,9 @@ using WCS.Service.Handlers;
 namespace WCS.Service.Works.Station
 {
     [WorkTitle(typeof(ProductHandler), "一楼出库堆垛机放货完成后分配下一个地址")]
-    public class 一楼出库 : Work<IStation520>
+    public class 一楼出库 : DeviceWork<Device<IStation520, IStation521, IStation523>>
     {
-        protected override void Do(IStation520 obj)
+        protected override void Do(Device<IStation520, IStation521, IStation523> obj)
         {
         }
 
@@ -23,9 +23,9 @@ namespace WCS.Service.Works.Station
     }
 
     [WorkTitle(typeof(ProductHandler), "月台出货口完成任务")]
-    public class 月台完成任务 : Work<IStation520>
+    public class 月台完成任务 : DeviceWork<Device<IStation520, IStation521, IStation523>>
     {
-        protected override void Do(IStation520 obj)
+        protected override void Do(Device<IStation520, IStation521, IStation523> obj)
         {
         }
 
@@ -38,9 +38,9 @@ namespace WCS.Service.Works.Station
     }
 
     [WorkTitle(typeof(ProductHandler), "转圈交互点分配目标地址")]
-    public class 转圈交互点分配目标地址 : Work<IStation520>
+    public class 转圈交互点分配目标地址 : DeviceWork<Device<IStation520, IStation521, IStation523>>
     {
-        protected override void Do(IStation520 obj)
+        protected override void Do(Device<IStation520, IStation521, IStation523> obj)
         {
         }
 

+ 9 - 21
Projects/永冠OPP/WCS.Service/Works/Station/涂布入库.cs

@@ -1,16 +1,8 @@
-using DBHelper;
-using Microsoft.EntityFrameworkCore;
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
+using System.Collections.Generic;
 using WCS.Core;
 using WCS.Entity;
 using WCS.Entity.Protocol;
-using WCS.Entity.Protocol.SRM;
-using WCS.Service.Extensions;
 using WCS.Service.Handlers;
-using WCS.Service.Helpers;
 
 namespace WCS.Service.Works.Station
 {
@@ -18,11 +10,10 @@ namespace WCS.Service.Works.Station
     /// 涂布入库AGV交互
     /// </summary>
     [WorkTitle(typeof(CoatingHandler), "涂布入库AGV交互")]
-    public class 涂布入库AGV交互 : Work<IStation520>
+    public class 涂布入库AGV交互 : DeviceWork<Device<IStation520, IStation521, IStation523>>
     {
-        protected override void Do(IStation520 obj)
+        protected override void Do(Device<IStation520, IStation521, IStation523> obj)
         {
-          
         }
 
         protected override bool SelectDevice(WCS_DEVICE dev)
@@ -35,11 +26,10 @@ namespace WCS.Service.Works.Station
     /// 涂布扫码入库
     /// </summary>
     [WorkTitle(typeof(CoatingHandler), "涂布入库")]
-    public class 涂布扫码入库 : Work<IStation520>
+    public class 涂布扫码入库 : DeviceWork<Device<IStation520, IStation521, IStation523>>
     {
-        protected override void Do(IStation520 obj)
+        protected override void Do(Device<IStation520, IStation521, IStation523> obj)
         {
-          
         }
 
         protected override bool SelectDevice(WCS_DEVICE dev)
@@ -52,11 +42,10 @@ namespace WCS.Service.Works.Station
     /// 涂布入库分配巷道
     /// </summary>
     [WorkTitle(typeof(CoatingHandler), "涂布入库分配巷道")]
-    public class 涂布入库分配巷道 : Work<IStation520>
+    public class 涂布入库分配巷道 : DeviceWork<Device<IStation520, IStation521, IStation523>>
     {
-        protected override void Do(IStation520 obj)
+        protected override void Do(Device<IStation520, IStation521, IStation523> obj)
         {
-           
         }
 
         protected override bool SelectDevice(WCS_DEVICE dev)
@@ -69,11 +58,10 @@ namespace WCS.Service.Works.Station
     /// 涂布入库旋转台二次分配巷道
     /// </summary>
     [WorkTitle(typeof(CoatingHandler), "涂布入库旋转台二次分配巷道")]
-    public class 涂布入库旋转台二次分配巷道 : Work<IStation520>
+    public class 涂布入库旋转台二次分配巷道 : DeviceWork<Device<IStation520, IStation521, IStation523>>
     {
-        protected override void Do(IStation520 obj)
+        protected override void Do(Device<IStation520, IStation521, IStation523> obj)
         {
-            
         }
 
         protected override bool SelectDevice(WCS_DEVICE dev)

+ 10 - 10
Projects/永冠OPP/WCS.Service/Works/Station/涂布出库.cs

@@ -11,9 +11,9 @@ namespace WCS.Service.Works.Station
     /// 涂布堆垛机放货分配目标地址
     /// </summary>
     [WorkTitle(typeof(CoatingHandler), "涂布堆垛机放货分配目标地址")]
-    public class 涂布堆垛机放货分配目标地址 : Work<IStation520>
+    public class 涂布堆垛机放货分配目标地址 : DeviceWork<Device<IStation520, IStation521, IStation523>>
     {
-        protected override void Do(IStation520 obj)
+        protected override void Do(Device<IStation520, IStation521, IStation523> obj)
         {
         }
 
@@ -29,9 +29,9 @@ namespace WCS.Service.Works.Station
     /// 涂布出库分配出库口
     /// </summary>
     [WorkTitle(typeof(CoatingHandler), "涂布出库分配出库口")]
-    public class 涂布出库分配出库口 : Work<IStation520>
+    public class 涂布出库分配出库口 : DeviceWork<Device<IStation520, IStation521, IStation523>>
     {
-        protected override void Do(IStation520 obj)
+        protected override void Do(Device<IStation520, IStation521, IStation523> obj)
         {
         }
 
@@ -47,9 +47,9 @@ namespace WCS.Service.Works.Station
     /// 涂布出库分配AGV取货点
     /// </summary>
     [WorkTitle(typeof(CoatingHandler), "涂布出库分配AGV取货点")]
-    public class 涂布出库分配AGV取货点 : Work<IStation520>
+    public class 涂布出库分配AGV取货点 : DeviceWork<Device<IStation520, IStation521, IStation523>>
     {
-        protected override void Do(IStation520 obj)
+        protected override void Do(Device<IStation520, IStation521, IStation523> obj)
         {
         }
 
@@ -63,9 +63,9 @@ namespace WCS.Service.Works.Station
     /// 涂布出库返回任务长度
     /// </summary>
     [WorkTitle(typeof(CoatingHandler), "涂布出库返回任务长度")]
-    public class 涂布出库返回任务长度 : Work<IStation520>
+    public class 涂布出库返回任务长度 : DeviceWork<Device<IStation520, IStation521, IStation523>>
     {
-        protected override void Do(IStation520 obj)
+        protected override void Do(Device<IStation520, IStation521, IStation523> obj)
         {
         }
 
@@ -79,9 +79,9 @@ namespace WCS.Service.Works.Station
     /// 涂布叫料
     /// </summary>
     [WorkTitle(typeof(CoatingHandler), "涂布叫料")]
-    public class 涂布叫料 : Work<IStation520>
+    public class 涂布叫料 : DeviceWork<Device<IStation520, IStation521, IStation523>>
     {
-        protected override void Do(IStation520 obj)
+        protected override void Do(Device<IStation520, IStation521, IStation523> obj)
         {
         }
 

+ 1 - 1
Virtual_PLC/PlcData.cs

@@ -114,7 +114,7 @@ namespace Virtual_PLC
         /// <summary>
         /// DB
         /// </summary>
-        public string DB { get; set; }
+        public int DB { get; set; }
 
         /// <summary>
         /// 总长度