林豪 左 2 năm trước cách đây
mục cha
commit
da88ec158a

+ 16 - 0
WCS.Entity.Protocol/BCR/IBCR80.cs

@@ -0,0 +1,16 @@
+using System.ComponentModel.DataAnnotations;
+
+namespace WCS.Entity.Protocol.BCR
+{
+    /// <summary>
+    /// 扫码头协议80
+    /// </summary>
+    public interface IBCR80 : IProtocol
+    {
+        /// <summary>
+        /// 内容
+        /// </summary>
+        [StringLength(130)]
+        string Content { get; set; }
+    }
+}

+ 16 - 0
WCS.Entity.Protocol/BCR/IBCR81.cs

@@ -0,0 +1,16 @@
+using System.ComponentModel.DataAnnotations;
+
+namespace WCS.Entity.Protocol.BCR
+{
+    /// <summary>
+    /// 扫码头协议81
+    /// </summary>
+    public interface IBCR81 : IProtocol
+    {
+        /// <summary>
+        /// 内容
+        /// </summary>
+        [StringLength(130)]
+        string Content { get; set; }
+    }
+}

+ 20 - 0
WCS.Entity.Protocol/BCR/WCS_BCR80.cs

@@ -0,0 +1,20 @@
+using SqlSugar;
+using System.Runtime.Serialization;
+
+namespace WCS.Entity.Protocol.BCR
+{
+    /// <summary>
+    /// 读码器读取协议
+    /// </summary>
+    [SugarTable(nameof(WCS_BCR80), "读码器读取协议")]
+    [DataContract]
+    public class WCS_BCR80 : WCS_PROTOCOLDATA, IBCR80
+    {
+        /// <summary>
+        /// 内容
+        /// </summary>
+        [SugarColumn(ColumnDescription = "内容", Length = 130)]
+        [DataMember(Order = 0)]
+        public string Content { get; set; }
+    }
+}

+ 20 - 0
WCS.Entity.Protocol/BCR/WCS_BCR81.cs

@@ -0,0 +1,20 @@
+using SqlSugar;
+using System.Runtime.Serialization;
+
+namespace WCS.Entity.Protocol.BCR
+{
+    /// <summary>
+    /// 读码器写入协议81
+    /// </summary>
+    [SugarTable(nameof(WCS_BCR80), "读码器读取协议")]
+    [DataContract]
+    public class WCS_BCR81 : WCS_PROTOCOLDATA, IBCR80
+    {
+        /// <summary>
+        /// 内容
+        /// </summary>
+        [SugarColumn(ColumnDescription = "内容", Length = 130)]
+        [DataMember(Order = 0)]
+        public string Content { get; set; }
+    }
+}

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

@@ -0,0 +1,46 @@
+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("任务类型")]
+        ModeEunm Mode { get; set; }
+
+        /// <summary>
+        /// 指令类型
+        /// </summary>
+        [Description("指令类型")]
+        CmdTypeEnum CmdType { 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("运行模式")]
+        ModeEunm Mode { get; set; }
+
+        /// <summary>
+        /// 指令回复
+        /// </summary>
+        [Description("指令回复")]
+        CmdReplyEnum CmdType { get; set; }
+
+        /// <summary>
+        /// 凭证号 每次累加
+        /// </summary>
+        [Description("凭证号")]
+        short VoucherNo { get; set; }
+
+        /// <summary>
+        /// 请求
+        /// </summary>
+        [Description("请求")]
+        short Request { get; set; }
+    }
+}

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

@@ -0,0 +1,35 @@
+using System.ComponentModel;
+
+namespace WCS.Entity.Protocol.Station
+{
+    /// <summary>
+    /// 输送机状态读取协议
+    /// </summary>
+    public interface IStation522 : IProtocol
+    {
+        /// <summary>
+        /// 警报
+        /// </summary>
+        [Description("警报")]
+        AlarmEunm Alarm { get; set; }
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        [Description("备用")]
+        short RES { get; set; }
+
+        /// <summary>
+        /// 状态
+        /// </summary>
+        [Description("状态")]
+        StatusEunm Status { get; set; }
+
+        /// <summary>
+        /// 运行时间
+        /// </summary>
+        [Description("运行时间")]
+        [IgnoreChanging]
+        float RunTime { get; set; }
+    }
+}

+ 31 - 0
WCS.Entity.Protocol/Station/IStation91.cs

@@ -0,0 +1,31 @@
+namespace WCS.Entity.Protocol.Station
+{
+    /// <summary>
+    /// 外检读取信息
+    /// </summary>
+    public interface IStation91 : IProtocol
+    {
+        /// <summary>
+        /// 外形检测故障
+        /// </summary>
+        ShapeAlarmEunm ShapeAlarm { get; set; }
+
+        /// <summary>
+        /// 重量
+        /// </summary>
+        [IgnoreChanging]
+        float Weight { get; set; }
+
+        /// <summary>
+        /// 长度
+        /// </summary>
+        [IgnoreChanging]
+        float Length { get; set; }
+
+        /// <summary>
+        /// 高度
+        /// </summary>
+        [IgnoreChanging]
+        float Width { get; set; }
+    }
+}

+ 381 - 0
WCS.Entity.Protocol/Station/StationEunm.cs

@@ -0,0 +1,381 @@
+using System;
+
+namespace WCS.Entity.Protocol.Station
+{
+    /// <summary>
+    /// 指令类型
+    /// </summary>
+    [Flags]
+    public enum CmdTypeEnum : ushort
+    {
+        /// <summary>
+        /// AGV放货请求
+        /// </summary>
+        AGV_PUT_ASK = 1 << 0,
+
+        /// <summary>
+        /// AGV放货运行
+        /// </summary>
+        AGV_PUT_RUN = 1 << 1,
+
+        /// <summary>
+        /// AGV放货完成
+        /// </summary>
+        AGV_PUT_OK = 1 << 2,
+
+        /// <summary>
+        /// AGV取货请求
+        /// </summary>
+        AGV_GET_ASK = 1 << 3,
+
+        /// <summary>
+        /// AGV取货运行
+        /// </summary>
+        AGV_GET_RUN = 1 << 4,
+
+        /// <summary>
+        /// AGV取货完成
+        /// </summary>
+        AGV_GET_OK = 1 << 5,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        RES1 = 1 << 6,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        RES2 = 1 << 7,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        RES3 = 1 << 8,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        RES4 = 1 << 9,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        RES5 = 1 << 10,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        RES6 = 1 << 11,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        RES7 = 1 << 12,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        RES8 = 1 << 13,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        RES9 = 1 << 14,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        RES10 = 1 << 15,
+    }
+
+    /// <summary>
+    /// 指令回复
+    /// </summary>
+    [Flags]
+    public enum CmdReplyEnum : ushort
+    {
+        /// <summary>
+        /// CONV允许接货
+        /// </summary>
+        CONV_PUT_ALLOW = 1 << 0,
+
+        /// <summary>
+        /// CONV接货完成
+        /// </summary>
+        CONV_PUT_ACK = 1 << 1,
+
+        /// <summary>
+        /// CONV运行取货
+        /// </summary>
+        CONV_GET_ALLOW = 1 << 2,
+
+        /// <summary>
+        /// CONV取货完成确认
+        /// </summary>
+        CONV_GET_ACK = 1 << 3,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        RES11 = 1 << 4,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        RES12 = 1 << 5,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        RES1 = 1 << 6,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        RES2 = 1 << 7,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        RES3 = 1 << 8,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        RES4 = 1 << 9,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        RES5 = 1 << 10,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        RES6 = 1 << 11,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        RES7 = 1 << 12,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        RES8 = 1 << 13,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        RES9 = 1 << 14,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        RES10 = 1 << 15,
+    }
+
+    /// <summary>
+    /// 输送机模式
+    /// </summary>
+    public enum ModeEunm : short
+    {
+        /// <summary>
+        /// 自动
+        /// </summary>
+        Automatic = 1,
+
+        /// <summary>
+        /// 手动
+        /// </summary>
+        Manual = 2,
+
+        /// <summary>
+        /// 维修
+        /// </summary>
+        Repair = 3,
+    }
+
+    /// <summary>
+    /// 输送机警报
+    /// </summary>
+    [Flags]
+    public enum AlarmEunm
+    {
+    }
+
+    /// <summary>
+    /// 输送机状态
+    /// </summary>
+    [Flags]
+    public enum StatusEunm : ulong
+    {
+        /// <summary>
+        /// 自动
+        /// </summary>
+        Auto = 1 << 0,
+
+        /// <summary>
+        /// 选中状态位
+        /// </summary>
+        Choice_Bit = 1 << 1,
+
+        /// <summary>
+        /// 任务有货
+        /// </summary>
+        OT_Status = 1 << 2,
+
+        /// <summary>
+        /// 光电有货
+        /// </summary>
+        PH_Status = 1 << 3,
+
+        /// <summary>
+        /// 运行状态位
+        /// </summary>
+        Run = 1 << 4,
+
+        /// <summary>
+        /// 正转
+        /// </summary>
+        Fwd_1 = 1 << 5,
+
+        /// <summary>
+        /// 反转
+        /// </summary>
+        Rev_1 = 1 << 6,
+
+        /// <summary>
+        /// 上升/右转/伸出(顶升移栽升降、拆码盘机升降、提升机升降、拆码盘机拨叉伸出)
+        /// </summary>
+        Up_Right_Front_2 = 1 << 7,
+
+        /// <summary>
+        /// 下降/左转/缩回(顶升移栽升降、拆码盘机升降、提升机升降、拆码盘机拨叉缩回)
+        /// </summary>
+        Down_Left_Back_2 = 1 << 8,
+
+        /// <summary>
+        /// 高位(顶升移栽升降、拆码盘机升降、提升机升降)
+        /// </summary>
+        High_Station_2 = 1 << 9,
+
+        /// <summary>
+        /// 中位(拆码盘机升降)
+        /// </summary>
+        Mid_Station_2 = 1 << 10,
+
+        /// <summary>
+        /// 低位(顶升移栽升降、拆码盘机升降、提升机升降)
+        /// </summary>
+        Low_Station_2 = 1 << 11,
+
+        /// <summary>
+        /// 前位(拆码盘机拨叉伸出)
+        /// </summary>
+        Front_Station_2 = 1 << 12,
+
+        /// <summary>
+        /// 后位(拆码盘机拨叉缩回)
+        /// </summary>
+        Back_Station_2 = 1 << 13,
+
+        /// <summary>
+        /// 手动入库
+        /// </summary>
+        ManualStorage = 1 << 14,
+
+        /// <summary>
+        /// 上位机未分配任务
+        /// </summary>
+        UnassignedTask = 1 << 15,
+    }
+
+    /// <summary>
+    /// 外形故障
+    /// </summary>
+    [Flags]
+    public enum ShapeAlarmEunm : ushort
+    {
+        /// <summary>
+        /// 外形/条码等货物故障
+        /// </summary>
+        Goods_Err = 1 >> 0,
+
+        /// <summary>
+        /// 前超长故障
+        /// </summary>
+        F_Outside = 1 >> 1,
+
+        /// <summary>
+        /// 后超长故障
+        /// </summary>
+        B_Outside = 1 >> 2,
+
+        /// <summary>
+        /// 左超宽故障
+        /// </summary>
+        L_Outside = 1 >> 3,
+
+        /// <summary>
+        /// 右超宽故障
+        /// </summary>
+        R_Outside = 1 >> 4,
+
+        /// <summary>
+        /// 超高故障
+        /// </summary>
+        H_Outside = 1 >> 5,
+
+        /// <summary>
+        /// 条码读取失败
+        /// </summary>
+        BCR_Noread = 1 >> 6,
+
+        /// <summary>
+        /// 超重
+        /// </summary>
+        Overload = 1 >> 7,
+
+        /// <summary>
+        /// 货物严重外检故障
+        /// </summary>
+        Goods_Err_1 = 1 >> 8,
+
+        /// <summary>
+        /// 二维条码未读出
+        /// </summary>
+        BCR_Noread_1 = 1 >> 9,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        RES1 = 1 >> 10,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        RES2 = 1 >> 11,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        RES3 = 1 >> 12,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        RES4 = 1 >> 13,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        RES5 = 1 >> 14,
+
+        /// <summary>
+        /// 备用
+        /// </summary>
+        RES6 = 1 >> 15,
+    }
+}

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

@@ -0,0 +1,62 @@
+using SqlSugar;
+using System.ComponentModel;
+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 ModeEunm Mode { get; set; }
+
+        /// <summary>
+        /// 指令类型
+        /// </summary>
+        [SugarColumn(ColumnDescription = "指令类型")]
+        [Description("指令类型")]
+        [DataMember(Order = 4)]
+        public CmdTypeEnum CmdType { get; set; }
+
+        /// <summary>
+        /// 凭证号
+        /// </summary>
+        [SugarColumn(ColumnDescription = "凭证号")]
+        [Description("凭证号")]
+        [DataMember(Order = 5)]
+        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 ModeEunm Mode { get; set; }
+
+        /// <summary>
+        /// 指令回复
+        /// </summary>
+        [SugarColumn(ColumnDescription = "指令回复")]
+        [Description("指令回复")]
+        [DataMember(Order = 4)]
+        public CmdReplyEnum CmdType { get; set; }
+
+        /// <summary>
+        /// 凭证号
+        /// </summary>
+        [SugarColumn(ColumnDescription = "凭证号")]
+        [Description("凭证号")]
+        [DataMember(Order = 5)]
+        public short VoucherNo { get; set; }
+
+        /// <summary>
+        /// 请求
+        /// </summary>
+        [SugarColumn(ColumnDescription = "请求")]
+        [Description("请求")]
+        [DataMember(Order = 6)]
+        short IStation521.Request { get; set; }
+    }
+}

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

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

+ 41 - 0
WCS.Entity.Protocol/Station/WCS_Station91.cs

@@ -0,0 +1,41 @@
+using SqlSugar;
+using System.Runtime.Serialization;
+
+namespace WCS.Entity.Protocol.Station
+{
+    /// <summary>
+    /// 外检读取数据
+    /// </summary>
+    [SugarTable(nameof(WCS_Station91), "外检读取数据")]
+    [DataContract]
+    public class WCS_Station91 : WCS_PROTOCOLDATA, IStation91
+    {
+        /// <summary>
+        /// 外检故障
+        /// </summary>
+        [SugarColumn(ColumnDescription = "外检故障")]
+        [DataMember(Order = 0)]
+        public ShapeAlarmEunm ShapeAlarm { get; set; }
+
+        /// <summary>
+        /// 重量
+        /// </summary>
+        [SugarColumn(ColumnDescription = "重量")]
+        [DataMember(Order = 1)]
+        public float Weight { get; set; }
+
+        /// <summary>
+        /// 长度
+        /// </summary>
+        [SugarColumn(ColumnDescription = "长度")]
+        [DataMember(Order = 2)]
+        public float Length { get; set; }
+
+        /// <summary>
+        /// 宽度
+        /// </summary>
+        [SugarColumn(ColumnDescription = "宽度")]
+        [DataMember(Order = 3)]
+        public float Width { get; set; }
+    }
+}

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

@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+  <PropertyGroup>
+    <TargetFramework>netstandard2.1</TargetFramework>
+    <Nullable>enable</Nullable>
+    <GenerateDocumentationFile>True</GenerateDocumentationFile>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <PackageReference Include="WCS.Entity" Version="1.0.0.9" />
+  </ItemGroup>
+
+</Project>

+ 16 - 0
WCS.WorkEngineering/Extensions/DeviceExtension.cs

@@ -0,0 +1,16 @@
+using WCS.Core;
+using WCS.Entity.Protocol.Station;
+
+namespace WCS.WorkEngineering.Extensions
+{
+    /// <summary>
+    ///  设备扩展
+    /// </summary>
+    public static class DeviceExtension
+    {
+        public static bool IsConv(this Device source)
+        {
+            return source.HasProtocol(typeof(IStation521)) || source.HasProtocol(typeof(IStation520)) || source.HasProtocol(typeof(IStation522));
+        }
+    }
+}

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

@@ -0,0 +1,18 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+  <PropertyGroup>
+    <TargetFramework>net7.0</TargetFramework>
+    <ImplicitUsings>enable</ImplicitUsings>
+    <Nullable>enable</Nullable>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.5" />
+    <PackageReference Include="ServiceCenter" Version="1.0.0.12" />
+  </ItemGroup>
+
+  <ItemGroup>
+    <ProjectReference Include="..\WCS.Entity.Protocol\WCS.Entity.Protocol.csproj" />
+  </ItemGroup>
+
+</Project>

+ 50 - 0
WCS.WorkEngineering/WebApi/Startup.cs

@@ -0,0 +1,50 @@
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
+
+namespace WCS.WorkEngineering.WebApi
+{
+    public class Startup
+    {
+        public Startup(IConfiguration configuration)
+        {
+            Configuration = configuration;
+        }
+
+        public IConfiguration Configuration { get; }
+
+        // This method gets called by the runtime. Use this method to add services to the container.
+        public void ConfigureServices(IServiceCollection services)
+        {
+            services.AddControllers();
+            //services.AddSwaggerGen(c =>
+            //{
+            //    c.SwaggerDoc("v1", new OpenApiInfo { Title = "WCSAPI", Version = "v1" });
+            //});
+        }
+
+        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
+        public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
+        {
+            if (env.IsDevelopment())
+            {
+                app.UseDeveloperExceptionPage();
+                //app.UseSwagger();
+                //app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "WebApplication1 v1"));
+            }
+
+            app.UseHttpsRedirection();
+
+            app.UseRouting();
+
+            app.UseAuthorization();
+
+            app.UseEndpoints(endpoints =>
+            {
+                endpoints.MapControllers();
+            });
+        }
+    }
+}

+ 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;
+        }
+    }
+}

+ 11 - 5
ZT_FJK_1C.sln

@@ -3,7 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio Version 17
 VisualStudioVersion = 17.5.33530.505
 MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "111111111", "111111111\111111111.csproj", "{8F42F113-091F-4240-9025-BA7EB00D5B44}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WCS.Entity.Protocol", "WCS.Entity.Protocol\WCS.Entity.Protocol.csproj", "{6899C4E5-1816-4011-BDF6-2897BC02EB16}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WCS.WorkEngineering", "WCS.WorkEngineering\WCS.WorkEngineering.csproj", "{0C718E56-5EC6-4C35-B8CE-FA3F9A0BF4D1}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -11,10 +13,14 @@ Global
 		Release|Any CPU = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{8F42F113-091F-4240-9025-BA7EB00D5B44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{8F42F113-091F-4240-9025-BA7EB00D5B44}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{8F42F113-091F-4240-9025-BA7EB00D5B44}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{8F42F113-091F-4240-9025-BA7EB00D5B44}.Release|Any CPU.Build.0 = Release|Any CPU
+		{6899C4E5-1816-4011-BDF6-2897BC02EB16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{6899C4E5-1816-4011-BDF6-2897BC02EB16}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{6899C4E5-1816-4011-BDF6-2897BC02EB16}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{6899C4E5-1816-4011-BDF6-2897BC02EB16}.Release|Any CPU.Build.0 = Release|Any CPU
+		{0C718E56-5EC6-4C35-B8CE-FA3F9A0BF4D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{0C718E56-5EC6-4C35-B8CE-FA3F9A0BF4D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{0C718E56-5EC6-4C35-B8CE-FA3F9A0BF4D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{0C718E56-5EC6-4C35-B8CE-FA3F9A0BF4D1}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE