林豪 左 2 年之前
父节点
当前提交
40a43a5b75

+ 1 - 17
WCS.Entity.Protocol/Station/WCS_Station520.cs

@@ -6,7 +6,7 @@ namespace WCS.Entity.Protocol.Station
     ///  520
     /// </summary>
     [DataContract]
-    public class WCS_Station520 :  IStation523
+    public class WCS_Station520 : IStation520
     {
         /// <inheritdoc/>
         [DataMember(Order = 0)]
@@ -31,21 +31,5 @@ namespace WCS.Entity.Protocol.Station
         /// <inheritdoc/>
         [DataMember(Order = 5)]
         public short VoucherNo { get; set; }
-
-        /// <inheritdoc/>
-        [DataMember(Order = 6)]
-        public AlarmEunm Alarm { get; set; }
-
-        /// <inheritdoc/>
-        [DataMember(Order = 7)]
-        public short RES { get; set; }
-
-        /// <inheritdoc/>
-        [DataMember(Order = 8)]
-        public StatusEunm Status { get; set; }
-
-        /// <inheritdoc/>
-        [DataMember(Order = 9)]
-        public float RunTime { get; set; }
     }
 }

+ 5 - 5
WCS.Entity.Protocol/Station/WCS_Station523.cs

@@ -6,22 +6,22 @@ namespace WCS.Entity.Protocol.Station
     ///  523
     /// </summary>
     [DataContract]
-    public class WCS_Station523 :  IStation91
+    public class WCS_Station523 : IStation523
     {
         /// <inheritdoc/>
         [DataMember(Order = 0)]
-        public ShapeAlarmEunm ShapeAlarm { get; set; }
+        public AlarmEunm Alarm { get; set; }
 
         /// <inheritdoc/>
         [DataMember(Order = 1)]
-        public float Weight { get; set; }
+        public short RES { get; set; }
 
         /// <inheritdoc/>
         [DataMember(Order = 2)]
-        public float Length { get; set; }
+        public StatusEunm Status { get; set; }
 
         /// <inheritdoc/>
         [DataMember(Order = 3)]
-        public float Width { get; set; }
+        public float RunTime { get; set; }
     }
 }

+ 2 - 2
WCS.WorkEngineering/Systems/GetDeviceSystem.cs

@@ -22,7 +22,7 @@ namespace WCS.WorkEngineering.Systems
 
         private List<BCR> Bcrs;
 
-        private List<Device<IStation91>> Device91;
+        private List<Device<IStation523>> Device91;
 
         /// <summary>
         ///  构造函数
@@ -32,7 +32,7 @@ namespace WCS.WorkEngineering.Systems
             Convs = Device.All.Where(v => v.HasProtocol<IStation523>()).Select(v => new Station(v, this.World)).ToList();
             Srms = Device.All.Where(v => v.HasProtocol<ISRM520>()).Select(v => new SRM(v, this.World)).ToList();
             Bcrs = Device.All.Where(v => v.HasProtocol<IBCR81>()).Select(v => new BCR(v, this.World)).ToList();
-            Device91 = Device.All.Where(v => v.HasProtocol<IStation91>()).Select(v => new Device<IStation91>(v, this.World)).ToList();
+            Device91 = Device.All.Where(v => v.HasProtocol<IStation523>()).Select(v => new Device<IStation523>(v, this.World)).ToList();
         }
 
         protected override object Do(string info)

+ 1 - 1
WCS.WorkEngineering/Systems/一楼入库工位处理系统.cs

@@ -52,7 +52,7 @@ namespace WCS.WorkEngineering.Systems
                 if (task.Status != Entity.TaskStatus.AGVExecution) throw new KnownException($"任务:{task.ID}状态不是AGV执行中,请检查异常原因", LogLevelEnum.High);
 
                 //获取称重
-                var dev91 = Device.All.Where(v => v.Code == obj.Entity.Code).Select(v => new Device<IStation91>(v, this.World)).FirstOrDefault();
+                var dev91 = Device.All.Where(v => v.Code == obj.Entity.Code).Select(v => new Device<IStation523>(v, this.World)).FirstOrDefault();
                 task.Weight = dev91.Data.Weight;
                 WmsApi.WcsUploadInfo(task.ID, (decimal)task.Weight, task.BarCode);
 

+ 1 - 1
WCS.WorkEngineering/Systems/二楼入库工位处理系统.cs

@@ -64,7 +64,7 @@ namespace WCS.WorkEngineering.Systems
                if (obj.Entity.Code == "1025")
                {
                    //获取称重
-                   var dev91 = Device.All.Where(v => v.Code == obj.Entity.Code).Select(v => new Device<IStation91>(v, this.World)).FirstOrDefault();
+                   var dev91 = Device.All.Where(v => v.Code == obj.Entity.Code).Select(v => new Device<IStation523>(v, this.World)).FirstOrDefault();
                    task.Weight = dev91.Data.Weight;
                    WmsApi.WcsUploadInfo(task.ID, (decimal)task.Weight, task.BarCode);
                }

+ 1 - 1
WCS.WorkEngineering/WorkStart.cs

@@ -83,7 +83,7 @@ namespace WCS.WorkEngineering
                     var conv = Device.All.FirstOrDefault(x => x.Code == item.DeviceNo[i].ToString());
                     conv.AddFlag(DeviceFlags.外检);
                     int pos = i * 14;
-                    conv.AddProtocol<IStation91>(pos, 91, item.IP);
+                    conv.AddProtocol<IStation523>(pos, 91, item.IP);
                 }
             }