Bläddra i källkod

初始化 协议实体库和业务项目

林豪 左 2 år sedan
förälder
incheckning
85c3fc776b

+ 76 - 0
WCS.Entity.Protocol/Station/IStation520.cs

@@ -0,0 +1,76 @@
+using System.ComponentModel;
+
+namespace WCS.Entity.Protocol.Station
+{
+    /// <summary>
+    /// DB520
+    /// </summary>
+    public interface IStation520 : IProtocol
+    {
+        /// <summary>
+        ///  任务号
+        /// </summary>
+        [Description("任务号")]
+        int TaskNumber { get; set; }
+
+        /// <summary>
+        /// 起始地址
+        /// </summary>
+        [Description("起始地址")]
+        short GoodsStart { get; set; }
+
+        /// <summary>
+        /// 目标地址
+        /// </summary>
+        [Description("目标地址")]
+        short GoodsEnd { get; set; }
+
+        /// <summary>
+        /// 运行模式
+        /// </summary>
+        [Description("任务类型")]
+        short Mode { get; set; }
+
+        /// <summary>
+        /// AGV放货请求
+        /// </summary>
+        [Description("AGV放货请求")]
+        bool AGV_PUT_ASK { get; set; }
+
+        /// <summary>
+        /// AGV放货运行
+        /// </summary>
+        [Description("AGV放货运行")]
+        bool AGV_PUT_RUN { get; set; }
+
+        /// <summary>
+        /// AGV放货完成
+        /// </summary>
+        [Description("AGV放货完成")]
+        bool AGV_PUT_OK { get; set; }
+
+        /// <summary>
+        /// AGV取货请求
+        /// </summary>
+        [Description("AGV取货请求")]
+        bool AGV_GET_ASK { get; set; }
+
+        /// <summary>
+        /// AGV取货运行
+        /// </summary>
+        [Description("AGV取货运行")]
+        bool AGV_GET_RUN { get; set; }
+
+        /// <summary>
+        /// AGV取货完成
+        /// </summary>
+        [Description("AGV取货完成")]
+        bool AGV_GET_OK { get; set; }
+
+        /// <summary>
+        /// 凭证号 每次累加
+        /// </summary>
+        [Description("凭证号")]
+        short VoucherNo { get; set; }
+    }
+}

+ 52 - 0
WCS.Entity.Protocol/Station/IStation521.cs

@@ -0,0 +1,52 @@
+using System.ComponentModel;
+
+namespace WCS.Entity.Protocol.Station
+{
+    /// <summary>
+    /// 输送机交互信号 读
+    /// </summary>
+    public interface IStation521 : IProtocol
+    {
+        /// <summary>
+        ///  任务号
+        /// </summary>
+        [Description("任务号")]
+        int TaskNumber { get; set; }
+
+        /// <summary>
+        /// 起始地址
+        /// </summary>
+        [Description("起始地址")]
+        short GoodsStart { get; set; }
+
+        /// <summary>
+        /// 目标地址
+        /// </summary>
+        [Description("目标地址")]
+        short GoodsEnd { get; set; }
+
+        /// <summary>
+        /// 凭证号 每次累加
+        /// </summary>
+        [Description("凭证号")]
+        short VoucherNo { get; set; }
+
+        /// <summary>
+        /// 请求
+        /// </summary>
+        [Description("请求")]
+        IstationRequest Request { get; set; }
+
+        /// <summary>
+        /// 运行模式
+        /// </summary>
+        [Description("运行模式")]
+        IstationAutoStatus AutoStatus { get; set; }
+
+        /// <summary>
+        /// 状态
+        /// </summary>
+        [Description("状态")]
+        IstationStatus Status { get; set; }
+    }
+}

+ 16 - 0
WCS.Entity.Protocol/Station/IStation523.cs

@@ -0,0 +1,16 @@
+using System.ComponentModel;
+
+namespace WCS.Entity.Protocol.Station
+{
+    /// <summary>
+    /// 输送机状态读取协议
+    /// </summary>
+    public interface IStation523 : IProtocol
+    {
+        /// <summary>
+        /// 警报
+        /// </summary>
+        [Description("警报")]
+        IstationFault Alarm { get; set; }
+    }
+}

+ 54 - 0
WCS.Entity.Protocol/Station/WCS_Station520.cs

@@ -0,0 +1,54 @@
+using System.ComponentModel;
+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
+    {
+        /// <summary>
+        /// 任务号
+        /// </summary>
+        [SugarColumn(ColumnDescription = "任务号")]
+        [Description("任务号")]
+        [DataMember(Order = 0)]
+        public int TaskNumber { get; set; }
+
+        /// <summary>
+        /// 起始地址
+        /// </summary>
+        [SugarColumn(ColumnDescription = "起始地址")]
+        [Description("起始地址")]
+        [DataMember(Order = 1)]
+        public short GoodsStart { get; set; }
+
+        /// <summary>
+        /// 目标地址
+        /// </summary>
+        [SugarColumn(ColumnDescription = "目标地址")]
+        [Description("目标地址")]
+        [DataMember(Order = 2)]
+        public short GoodsEnd { get; set; }
+
+        /// <summary>
+        /// 任务类型
+        /// </summary>
+        [SugarColumn(ColumnDescription = "任务类型")]
+        [Description("任务类型")]
+        [DataMember(Order = 3)]
+        public IstationTaskType TaskType { get; set; }
+
+        /// <summary>
+        /// 凭证号
+        /// </summary>
+        [SugarColumn(ColumnDescription = "凭证号")]
+        [Description("凭证号")]
+        [DataMember(Order = 4)]
+        public short VoucherNo { get; set; }
+    }
+}

+ 67 - 0
WCS.Entity.Protocol/Station/WCS_Station521.cs

@@ -0,0 +1,67 @@
+using SqlSugar;
+using System.ComponentModel;
+using System.Runtime.Serialization;
+
+namespace WCS.Entity.Protocol.Station
+{
+    [SugarTable(nameof(WCS_Station521), "输送机交互信号 读记录表")]
+    [DataContract]
+    public class WCS_Station521 : WCS_PROTOCOLDATA, IStation521
+    {
+        /// <summary>
+        /// 任务号
+        /// </summary>
+        [SugarColumn(ColumnDescription = "任务号")]
+        [Description("任务号")]
+        [DataMember(Order = 0)]
+        public int TaskNumber { get; set; }
+
+        /// <summary>
+        /// 起始地址
+        /// </summary>
+        [SugarColumn(ColumnDescription = "起始地址")]
+        [Description("起始地址")]
+        [DataMember(Order = 1)]
+        public short GoodsStart { get; set; }
+
+        /// <summary>
+        /// 目标地址
+        /// </summary>
+        [SugarColumn(ColumnDescription = "目标地址")]
+        [Description("目标地址")]
+        [DataMember(Order = 2)]
+        public short GoodsEnd { get; set; }
+
+        /// <summary>
+        /// 凭证号
+        /// </summary>
+        [SugarColumn(ColumnDescription = "凭证号")]
+        [Description("凭证号")]
+        [DataMember(Order = 3)]
+        public short VoucherNo { get; set; }
+
+        /// <summary>
+        /// 请求
+        /// </summary>
+        [SugarColumn(ColumnDescription = "请求")]
+        [Description("请求")]
+        [DataMember(Order = 4)]
+        public IstationRequest Request { get; set; }
+
+        /// <summary>
+        /// 运行模式
+        /// </summary>
+        [SugarColumn(ColumnDescription = "运行模式")]
+        [Description("运行模式")]
+        [DataMember(Order = 5)]
+        public IstationAutoStatus AutoStatus { get; set; }
+
+        /// <summary>
+        /// 状态
+        /// </summary>
+        [SugarColumn(ColumnDescription = "状态")]
+        [Description("状态")]
+        [DataMember(Order = 6)]
+        public IstationStatus Status { get; set; }
+    }
+}

+ 20 - 0
WCS.Entity.Protocol/Station/WCS_Station523.cs

@@ -0,0 +1,20 @@
+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
+    {
+        /// <summary>
+        /// 警报
+        /// </summary>
+        [SugarColumn(ColumnDescription = "警报")]
+        [DataMember(Order = 0)]
+        public IstationFault Alarm { get; set; }
+    }
+}

+ 4 - 0
WCS.Entity.Protocol/WCS.Entity.Protocol.csproj

@@ -5,4 +5,8 @@
     <Nullable>enable</Nullable>
   </PropertyGroup>
 
+  <ItemGroup>
+    <PackageReference Include="WCS.Entity" Version="1.0.0.1" />
+  </ItemGroup>
+
 </Project>

+ 4 - 0
WCS.WorkEngineering/WCS.WorkEngineering.csproj

@@ -6,4 +6,8 @@
     <Nullable>enable</Nullable>
   </PropertyGroup>
 
+  <ItemGroup>
+    <PackageReference Include="WCS.Core" Version="1.0.0.1" />
+  </ItemGroup>
+
 </Project>

+ 32 - 0
WCS.WorkEngineering/worlds/MainWorld.cs

@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WCS.Core;
+
+namespace WCS.WorkEngineering.worlds
+{
+    /// <summary>
+    /// 主世界,所有的系统(交互点)默认在该世界下执行。
+    /// 如有系统需独立,请自行增加
+    /// </summary>
+    public class MainWorld : World
+    {
+        /// <summary>
+        /// 构造函数
+        /// </summary>
+        public MainWorld()
+        {
+            Interval = 300;
+        }
+
+        /// <summary>
+        /// 更新后执行
+        /// </summary>
+        protected override void AfterUpdate()
+        {
+            //var objs = GetSystem<CollectConvDataSys>().Objects;
+        }
+    }
+}