林豪 左 2 년 전
부모
커밋
c6bc3372e7

+ 2 - 0
分拣库/WCS.Entity.Protocol/Station/IStation91.cs

@@ -27,5 +27,7 @@
         /// </summary>
         [IgnoreChanging]
         float Width { get; set; }
+
+
     }
 }

+ 28 - 0
分拣库/WCS.WorkEngineering/Systems/MainLineScanCode.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WCS.Core;
+using WCS.Entity.Protocol.Station;
+
+namespace WCS.WorkEngineering.Systems
+{
+
+    public class MainLineScanCode : DeviceSystem<Device<IStation520, IStation521, IStation522>>
+    {
+        protected override bool ParallelDo => throw new NotImplementedException();
+
+        protected override bool SaveLogsToFile => throw new NotImplementedException();
+
+        public override void Do(Device<IStation520, IStation521, IStation522> obj)
+        {
+            throw new NotImplementedException();
+        }
+
+        public override bool Select(Device dev)
+        {
+            return new int[] { 1701, 2101,1717, 2117}.Contains(int.Parse(dev.Code));
+        }
+    }
+}

+ 42 - 0
分拣库/WCS.WorkEngineering/Systems/SrmSystems.cs

@@ -0,0 +1,42 @@
+using System.ComponentModel;
+using WCS.Core;
+using WCS.Entity.Protocol.Station;
+using WCS.WorkEngineering.Worlds;
+
+namespace WCS.WorkEngineering.Systems
+{
+    /// <summary>
+    /// 堆垛机系统
+    /// </summary>
+    [BelongTo(typeof(MainWorld))]
+    [Description("堆垛机系统")]
+    public class SrmSystems : DeviceSystem<Device<IStation520, IStation521, IStation522>>
+    {
+        //TODO:堆垛机相关信息未完善等待完善之后再处理
+
+        /// <summary>
+        /// 取货点设备集合
+        /// </summary>
+        private List<Device<IStation520, IStation521, IStation522>> PickUpDevices;
+
+        public SrmSystems()
+        {
+            PickUpDevices = World.Devices.Where(v => v.Code is "1601" or "1603" or "1605" or "1611" or "1613" or "1615" or "2527" or "2528" or "2727" or "")
+                                         .Select(v => new Device<IStation520, IStation521, IStation522>(v)).ToList();
+        }
+
+        protected override bool ParallelDo => true;
+
+        protected override bool SaveLogsToFile => true;
+
+        public override void Do(Device<IStation520, IStation521, IStation522> obj)
+        {
+            throw new NotImplementedException();
+        }
+
+        public override bool Select(Device dev)
+        {
+            throw new NotImplementedException();
+        }
+    }
+}

+ 2 - 2
分拣库/WCS.WorkEngineering/WebApi/Controllers/AgvController.cs

@@ -21,9 +21,9 @@ namespace WCS.WorkEngineering.WebApi.Controllers
         /// <param name="reqDto"></param>
         /// <returns></returns>
         [HttpPost]
-        public agvCallbackResponse agvCallback(agvCallbackRequest reqDto)
+        public AgvCallbackResponse agvCallback(AgvCallbackRequest reqDto)
         {
-            var res = new agvCallbackResponse() { code = "0", message = "成功" };
+            var res = new AgvCallbackResponse() { code = "0", message = "成功" };
 
             return res;
         }

+ 22 - 6
分拣库/WCS.WorkEngineering/WebApi/Models/agvCallbackRequest.cs

@@ -1,91 +1,107 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace WCS.WorkEngineering.WebApi.Models
+namespace WCS.WorkEngineering.WebApi.Models
 {
-    public class agvCallbackRequest
+    public class AgvCallbackRequest
     {
         /// <summary>
         /// 请求编号,每个请求都要一个唯一编号, 同一个请求重复提交, 使用同一编号
         /// </summary>
         public string reqCode { get; set; }
+
         /// <summary>
         /// 请求时间戳,格式: “yyyy-MM-dd HH:mm:ss”
         /// </summary>
         public string reqTime { get; set; }
+
         /// <summary>
         /// 地码 X 坐标(mm):任务完成时有值
         /// </summary>
         public decimal cooX { get; set; }
+
         /// <summary>
         /// 地码 Y 坐标(mm):任务完成时有值
         /// </summary>
         public decimal cooY { get; set; }
+
         /// <summary>
         /// 当前位置编号
         /// </summary>
         public string currentPositionCode { get; set; }
+
         /// <summary>
         /// 自定义字段
         /// </summary>
         public string data { get; set; }
+
         /// <summary>
         /// 地图编号
         /// </summary>
         public string mapCode { get; set; }
+
         /// <summary>
         /// 地码编号:任务完成时有值
         /// </summary>
         public string mapDataCode { get; set; }
+
         /// <summary>
         /// 仓位编号:叉车与CTU任务时有值
         /// </summary>
         public string stgBinCode { get; set; }
+
         /// <summary>
         /// 方法名, 可使用任务类型做为方法名
         /// </summary>
         public string method { get; set; }
+
         /// <summary>
         /// 货架编号:背货架时有值
         /// </summary>
         public string podCode { get; set; }
+
         /// <summary>
         /// “180”,”0”,”90”,”-90” 分别对应地图的”左”,”右”,”上”,”下”:任务完成时有值
         /// </summary>
         public string podDir { get; set; }
+
         /// <summary>
         /// 物料编号
         /// </summary>
         public string materialLot { get; set; }
+
         /// <summary>
         /// AGV编号(同 agvCode )
         /// </summary>
         public string robotCode { get; set; }
+
         /// <summary>
         /// 当前任务单号
         /// </summary>
         public string taskCode { get; set; }
+
         /// <summary>
         /// 工作位
         /// </summary>
         public string wbCode { get; set; }
+
         /// <summary>
         /// 容器编号
         /// </summary>
         public string ctnrCode { get; set; }
+
         /// <summary>
         /// 容器类型
         /// </summary>
         public string ctnrType { get; set; }
+
         /// <summary>
         /// 巷道编号
         /// </summary>
         public string roadWayCode { get; set; }
+
         /// <summary>
         /// 巷道内顺序号巷道尾是0,到巷道头依次递增1
         /// </summary>
         public string seq { get; set; }
+
         /// <summary>
         /// 设备编号
         /// </summary>

+ 1 - 1
分拣库/WCS.WorkEngineering/WebApi/Models/agvCallbackResponse.cs

@@ -4,7 +4,7 @@ using System.Text;
 
 namespace WCS.WorkEngineering.WebApi.Models
 {
-    public class agvCallbackResponse
+    public class AgvCallbackResponse
     {
         /// <summary>
         /// 返回码

+ 15 - 0
分拣库/WCS.WorkEngineering/Worlds/SortingMainLineWorld.cs

@@ -0,0 +1,15 @@
+using WCS.Core;
+
+namespace WCS.WorkEngineering.Worlds
+{
+    /// <summary>
+    /// 分拣主线
+    /// </summary>
+    public class SortingMainLineWorld : World
+    {
+        public SortingMainLineWorld()
+        {
+            Interval = 100;
+        }
+    }
+}