using SqlSugar; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace LanShengModel { [SugarTable("LS_DeviceData")] public class DeviceData { /// /// 编号 /// [SugarColumn(IsPrimaryKey = true, Length = 50)] public string? Id { get; set; } /// /// 设备状态 /// [SugarColumn(Length = 50, IsNullable = true)] public string? Status { get; set; } /// /// 故障代码 /// [SugarColumn(Length = 20, IsNullable = true)] public string? ErrCode { get; set; } /// /// 故障信息 /// [SugarColumn(Length = 200, IsNullable = true)] public string? ErrMsg { get; set; } /// /// 当前DTU的软件版本号 /// [SugarColumn(IsNullable = true)] public int? Version { get; set; } /// /// 启动指示 (0未启动, 1已启动) /// [SugarColumn(IsNullable = true)] public int? Data2_B7 { get; set; } /// /// 电锁/IC卡 (0断开,1闭合) /// [SugarColumn(IsNullable = true)] public int? Data2_B6 { get; set; } /// /// 笼内急停 (0断开,1闭合) /// [SugarColumn(IsNullable = true)] public int? Data2_B5 { get; set; } /// /// 笼顶急停 (0断开,1闭合) /// [SugarColumn(IsNullable = true)] public int? Data2_B4 { get; set; } /// /// 防坠器限位 (0断开,1闭合) /// [SugarColumn(IsNullable = true)] public int? Data2_B3 { get; set; } /// /// 防冲顶限位 (0断开,1闭合) /// [SugarColumn(IsNullable = true)] public int? Data2_B2 { get; set; } /// /// 备用限位 (0断开,1闭合) /// [SugarColumn(IsNullable = true)] public int? Data2_B1 { get; set; } /// /// GPS限位 (0断开,1闭合) /// [SugarColumn(IsNullable = true)] public int? Data2_B0 { get; set; } /// /// 进料门限位 (0断开,1闭合) /// [SugarColumn(IsNullable = true)] public int? Data3_B7 { get; set; } /// /// 出料门限位 (0断开,1闭合) /// [SugarColumn(IsNullable = true)] public int? Data3_B6 { get; set; } /// /// 天窗门限位 (0断开,1闭合) /// [SugarColumn(IsNullable = true)] public int? Data3_B5 { get; set; } /// /// 上限位 (0断开,1闭合) /// [SugarColumn(IsNullable = true)] public int? Data3_B4 { get; set; } /// /// 下限位 (0断开,1闭合) /// [SugarColumn(IsNullable = true)] public int? Data3_B3 { get; set; } /// /// 上减速限位 (0断开,1闭合) /// [SugarColumn(IsNullable = true)] public int? Data3_B2 { get; set; } /// /// 下减速限位 (0断开,1闭合) /// [SugarColumn(IsNullable = true)] public int? Data3_B1 { get; set; } /// /// 抱闸状态 (0:动作 1:未动作) /// [SugarColumn(IsNullable = true)] public int? Data3_B0 { get; set; } /// /// 一体机驱动故障 /// [SugarColumn(IsNullable = true)] public int? Data4 { get; set; } /// /// 一体机逻辑故障 /// [SugarColumn(IsNullable = true)] public int? Data5 { get; set; } /// /// 一体机电梯载重 /// [SugarColumn(IsNullable = true)] public decimal? Data6 { get; set; } // /// 一体机运行频率 /// [SugarColumn(IsNullable = true)] public int? Data7 { get; set; } /// /// 一体机输入电压 /// [SugarColumn(IsNullable = true)] public int? Data8 { get; set; } /// /// 一体机输出电流 /// [SugarColumn(IsNullable = true)] public int? Data10 { get; set; } /// /// 一体机当前楼层 /// [SugarColumn(Length = 5, IsNullable = true)] public int? Data11 { get; set; } /// /// 一体机目标楼层 /// [SugarColumn(Length = 5, IsNullable = true)] public int? Data12 { get; set; } /// /// 信道号 /// [SugarColumn(IsNullable = true)] public int? Data13 { get; set; } /// /// 进料门接触器 (0:断开 1:吸合) /// [SugarColumn(IsNullable = true)] public int? Data13_B7 { get; set; } /// /// 出料门接触器 (0:断开 1:吸合) /// [SugarColumn(IsNullable = true)] public int? Data13_B6 { get; set; } /// /// 一体机操作模式(1:智能模式2:笼顶操作3防坠测试) /// [SugarColumn(IsNullable = true)] public int? Data14_B6 { get; set; } /// /// 一体机上升输入(0断开,1闭合) /// [SugarColumn(IsNullable = true)] public int? Data14_B5 { get; set; } /// /// 一体机下降输入(0断开,1闭合) /// [SugarColumn(IsNullable = true)] public int? Data14_B4 { get; set; } /// /// 一体机高速输入(0断开,1闭合) /// [SugarColumn(IsNullable = true)] public int? Data14_B3 { get; set; } /// /// 一体机上升输出(0断开,1闭合) /// [SugarColumn(IsNullable = true)] public int? Data14_B2 { get; set; } /// /// 一体机下降输出(0断开,1闭合) /// [SugarColumn(IsNullable = true)] public int? Data14_B1 { get; set; } /// /// 一体机高速输出(0断开,1闭合) /// [SugarColumn(IsNullable = true)] public int? Data14_B0 { get; set; } /// /// 一体机运行状态(1:上升2:下降3:停机) /// [SugarColumn(IsNullable = true)] public int? Data15_B6 { get; set; } /// /// 门机运行状态(1:上升2:下降3:停机) /// [SugarColumn(IsNullable = true)] public int? Data15_B4 { get; set; } /// /// 进料门上限位 (0断开,1闭合) /// [SugarColumn(IsNullable = true)] public int? Data15_B3 { get; set; } /// /// 进料门下限位 (0断开,1闭合) /// [SugarColumn(IsNullable = true)] public int? Data15_B2 { get; set; } /// /// 出料门上限位(0断开,1闭合) /// [SugarColumn(IsNullable = true)] public int? Data15_B1 { get; set; } /// /// 出料门下限位(0断开,1闭合) /// [SugarColumn(IsNullable = true)] public int? Data15_B0 { get; set; } /// /// 一体机通讯(0异常,1正常) /// [SugarColumn(IsNullable = true)] public int? Data16_B7 { get; set; } /// /// 门机通讯(0异常,1正常) /// [SugarColumn(IsNullable = true)] public int? Data16_B6 { get; set; } /// /// 左右笼通讯(0异常,1正常) /// [SugarColumn(IsNullable = true)] public int? Data16_B5 { get; set; } /// /// 人数摄像头通讯(0异常,1正常) /// [SugarColumn(IsNullable = true)] public int? Data16_B4 { get; set; } /// /// 手动选择 (0:无1进料门2出料门 /// [SugarColumn(IsNullable = true)] public int? Data16_B2 { get; set; } /// /// 进料门光幕(0断开,1闭合) /// [SugarColumn(IsNullable = true)] public int? Data16_B1 { get; set; } /// /// 出料门光幕(0断开,1闭合) /// [SugarColumn(IsNullable = true)] public int? Data16_B0 { get; set; } /// /// 门机故障代码 /// [SugarColumn(IsNullable = true)] public int? Data17 { get; set; } /// /// 门机控制(0:自动 1:手动 ) /// [SugarColumn(IsNullable = true)] public int? Data18 { get; set; } /// /// 手动模式(0:点动 1:开关到位) /// [SugarColumn(IsNullable = true)] public int? Data19 { get; set; } /// /// 检修开关(0:正常 1:检修) /// [SugarColumn(IsNullable = true)] public int? Data20 { get; set; } /// /// 吊笼内人数 /// [SugarColumn(IsNullable = true)] public int? Data21 { get; set; } /// /// 语音码 /// [SugarColumn(IsNullable = true)] public int? Data22 { get; set; } /// /// 自动平层开关(0:关闭 1:开启) /// [SugarColumn(IsNullable = true)] public int? Data23 { get; set; } /// /// 已学楼层数 /// [SugarColumn(IsNullable = true)] public int? Data24 { get; set; } /// /// 密码第一位 /// [SugarColumn(IsNullable = true)] public int? Data25_B4 { get; set; } /// /// 密码第二位 /// [SugarColumn(IsNullable = true)] public int? Data25_B0 { get; set; } /// /// 密码第三位 /// [SugarColumn(IsNullable = true)] public int? Data26_B4 { get; set; } /// /// 密码第四位 /// [SugarColumn(IsNullable = true)] public int? Data26_B0 { get; set; } /// /// 限速 (0:不限速1:限速) /// [SugarColumn(IsNullable = true)] public int? Data27_B7 { get; set; } /// /// 锁机 (0:不锁机1:锁机) /// [SugarColumn(IsNullable = true)] public int? Data27_B6 { get; set; } /// /// 故障复位 (0:不复位1:复位) /// [SugarColumn(IsNullable = true)] public int? Data27_B5 { get; set; } /// /// 超载清零 (0:不清零1:清零) /// [SugarColumn(IsNullable = true)] public int? Data27_B4 { get; set; } /// /// 载波修改 (0:不修改1:修改载波) /// [SugarColumn(IsNullable = true)] public int? Data27_B3 { get; set; } /// /// 预留 /// [SugarColumn(IsNullable = true)] public int? Data27_B2 { get; set; } /// /// 预留 /// [SugarColumn(IsNullable = true)] public int? Data27_B1 { get; set; } /// /// 修改完成标志(0:未完成1:完成) /// [SugarColumn(IsNullable = true)] public int? Data27_B0 { get; set; } /// /// 协议版本号,1 施工梯 2通用机 3塔机4揽胜升降机 /// [SugarColumn(IsNullable = true)] public int? AgreementVersion { get; set; } /// /// 上传数据的间隔时间(每隔n秒),0XFFFF表示关闭定时上传 /// [SugarColumn(IsNullable = true)] public int? DataTick { get; set; } /// /// 全部为ASCII码字符;需要记录下来,上下线后都能显示,上线后如和上一次不一致需做个图标标识出来 /// [SugarColumn(Length = 50, IsNullable = true)] public string? ICCID { get; set; } /// /// 外召盒GPS编号 /// [SugarColumn(Length = 50, IsNullable = true)] public string? WZGPS { get; set; } /// /// 东经 /// [SugarColumn(IsNullable = true)] public string? Longitude { get; set; } /// /// 北纬 /// [SugarColumn(IsNullable = true)] public string? Latitude { get; set; } /// /// 连接字符串长度 /// [SugarColumn(IsNullable = true)] public int? ConnectStrLength { get; set; } /// /// 连接字符串 /// [SugarColumn(Length = 200, IsNullable = true)] public string? ConnectString { get; set; } /// /// 更新时间 /// [SugarColumn(IsNullable = true)] public DateTime? UpdateDate { get; set; } [SugarColumn(IsNullable = true)] public DateTime? OfflineDate { get; set; } /// /// 修改标志,1:外围控制板执行修改;0:外围控制板不执行修改 /// [SugarColumn(IsNullable = true)] public int? UpdateTag { get; set; } /// /// IP是否修改,0:不修改,1:修改 /// [SugarColumn(IsNullable = true)] public int? IPSFXG { get; set; } /// /// 运行次数 /// [SugarColumn(IsNullable = true,IsOnlyIgnoreInsert = true,DefaultValue = "0")] public int? RunCount { get; set; } /// /// 更新版本号 /// [SugarColumn(IsNullable = true)] public int? UVersion { get; set; } /// /// FTP地址长度 /// [SugarColumn(IsNullable = true)] public int? FtpLength { get; set; } /// /// FTP地址 /// [SugarColumn(IsNullable = true)] public string? FtpUrl { get; set; } /// /// 用户密码长度 /// [SugarColumn(IsNullable = true)] public int? UserLength { get; set; } /// /// 用户密码 /// [SugarColumn(IsNullable = true)] public string? UserPwd { get; set; } /// /// Bin地址长度 /// [SugarColumn(IsNullable = true)] public int? BinLength { get; set; } /// /// Bin地址 /// [SugarColumn(IsNullable = true)] public string? BinUrl { get; set; } /// /// Bin文件大小 /// [SugarColumn(IsNullable = true)] public int? BinSize { get; set; } /// /// 更新时间范围 /// [SugarColumn(IsNullable = true)] public int? UpdateSpan { get; set; } /// /// 外召主机通讯 /// [SugarColumn(IsNullable = true)] public int? Data16_B5_N { get; set; } /// /// 进料门上光电(0断开,1闭合) /// [SugarColumn(IsNullable = true)] public int? Data19_B7 { get; set; } /// /// 出料门上光电(0断开,1闭合) /// [SugarColumn(IsNullable = true)] public int? Data19_B6 { get; set; } /// /// 上行通道检测限位(0断开,1闭合) /// [SugarColumn(IsNullable = true)] public int? Data19_B5 { get; set; } /// /// 下行通道检测限位(0断开,1闭合) /// [SugarColumn(IsNullable = true)] public int? Data19_B4 { get; set; } /// /// 预留1限位(0断开,1闭合) /// [SugarColumn(IsNullable = true)] public int? Data19_B3 { get; set; } /// /// 预留2限位(0断开,1闭合) /// [SugarColumn(IsNullable = true)] public int? Data19_B2 { get; set; } /// /// 预留3限位(0断开,1闭合) /// [SugarColumn(IsNullable = true)] public int? Data19_B1 { get; set; } /// /// 左右笼设置 0:左笼 1:右笼 /// [SugarColumn(IsNullable = true)] public int? Data28_B7 { get; set; } /// /// 中间B1楼层开关 0:无B1层 1:有B1层 /// [SugarColumn(IsNullable = true)] public int? Data28_B6 { get; set; } /// /// 中途位置丢失功能 0:不动作 1:自动到1楼 /// [SugarColumn(IsNullable = true)] public int? Data28_B5 { get; set; } /// /// 中途位置丢失自动到1楼高速开关 0:不使能高速 1:使能笼顶高速 /// [SugarColumn(IsNullable = true)] public int? Data28_B4 { get; set; } /// /// 自动下降开关 0:关闭 1:开启 /// [SugarColumn(IsNullable = true)] public int? Data28_B3 { get; set; } /// /// 满载直驶人数限制开关 0:关闭 1:开启 /// [SugarColumn(IsNullable = true)] public int? Data28_B2 { get; set; } /// /// 满载直驶重量限制开关 0:关闭 1:开启 /// [SugarColumn(IsNullable = true)] public int? Data28_B1 { get; set; } /// /// 货运模式开关 0:关闭 1:开启 /// [SugarColumn(IsNullable = true)] public int? Data28_B0 { get; set; } /// /// 预留 /// [SugarColumn(IsNullable = true)] public int? Data29_B7 { get; set; } /// /// 进料门光幕屏蔽 0:不屏蔽 1:屏蔽 /// [SugarColumn(IsNullable = true)] public int? Data29_B6 { get; set; } /// /// 出料门光幕屏蔽 0:不屏蔽 1:屏蔽 /// [SugarColumn(IsNullable = true)] public int? Data29_B5 { get; set; } /// /// 上行通道检测屏蔽 0:不屏蔽 1:屏蔽 /// [SugarColumn(IsNullable = true)] public int? Data29_B4 { get; set; } /// /// 下行通道检测屏蔽 0:不屏蔽 1:屏蔽 /// [SugarColumn(IsNullable = true)] public int? Data29_B3 { get; set; } /// /// 楼栋号 /// [SugarColumn(IsNullable = true)] public int? Data30 { get; set; } /// /// USR207模块信道 /// [SugarColumn(IsNullable = true)] public int? Data31 { get; set; } /// /// USR207模块目标地址 /// [SugarColumn(IsNullable = true)] public int? Data32_33 { get; set; } /// /// USR207模块速率 /// [SugarColumn(IsNullable = true)] public int? Data34 { get; set; } /// /// USR207模块前向纠错 /// [SugarColumn(IsNullable = true)] public int? Data35 { get; set; } /// /// 关门后运行等待时间 /// [SugarColumn(IsNullable = true)] public int? Data36 { get; set; } /// /// 停机后运行等待时间 /// [SugarColumn(IsNullable = true)] public int? Data37 { get; set; } /// /// 一体机开门超时时间 /// [SugarColumn(IsNullable = true)] public int? Data38_39 { get; set; } /// /// 吊笼内限制人数 /// [SugarColumn(IsNullable = true)] public int? Data40 { get; set; } /// /// 自动下降楼层 /// [SugarColumn(IsNullable = true)] public int? Data41 { get; set; } /// /// 自动下降等待时间 /// [SugarColumn(IsNullable = true)] public int? Data42_43 { get; set; } /// /// 满载直驶人数限制值 /// [SugarColumn(IsNullable = true)] public int? Data44 { get; set; } /// /// 满载直驶重量限制值 /// [SugarColumn(IsNullable = true)] public int? Data45_46 { get; set; } /// /// 自动关门延时时间 /// [SugarColumn(IsNullable = true)] public int? Data47_48 { get; set; } /// /// 延时按键延时时间 /// [SugarColumn(IsNullable = true)] public int? Data49_50 { get; set; } /// /// 进料门开门总时间 /// [SugarColumn(IsNullable = true)] public int? Data51_52 { get; set; } /// /// 进料门关门总时间 /// [SugarColumn(IsNullable = true)] public int? Data53_54 { get; set; } /// /// 出料门开门总时间 /// [SugarColumn(IsNullable = true)] public int? Data55_56 { get; set; } /// /// 出料门关门总时间 /// [SugarColumn(IsNullable = true)] public int? Data57_58 { get; set; } /// /// 进料门开门高速时间 /// [SugarColumn(IsNullable = true)] public int? Data59_60 { get; set; } /// /// 进料门关门高速时间 /// [SugarColumn(IsNullable = true)] public int? Data61_62 { get; set; } /// /// 出料门开门高速时间 /// [SugarColumn(IsNullable = true)] public int? Data63_64 { get; set; } /// /// 出料门关门高速时间 /// [SugarColumn(IsNullable = true)] public int? Data65_66 { get; set; } /// /// B1层有效 /// [SugarColumn(IsNullable = true)] public int? Data67_B7 { get; set; } /// /// 01层有效 /// [SugarColumn(IsNullable = true)] public int? Data67_B6 { get; set; } /// /// 02层有效 /// [SugarColumn(IsNullable = true)] public int? Data67_B5 { get; set; } /// /// 03层有效 /// [SugarColumn(IsNullable = true)] public int? Data67_B4 { get; set; } /// /// 04层有效 /// [SugarColumn(IsNullable = true)] public int? Data67_B3 { get; set; } /// /// 05层有效 /// [SugarColumn(IsNullable = true)] public int? Data67_B2 { get; set; } /// /// 06层有效 /// [SugarColumn(IsNullable = true)] public int? Data67_B1 { get; set; } /// /// 07层有效 /// [SugarColumn(IsNullable = true)] public int? Data67_B0 { get; set; } /// /// 08层有效 /// [SugarColumn(IsNullable = true)] public int? Data68_B7 { get; set; } /// /// 09层有效 /// [SugarColumn(IsNullable = true)] public int? Data68_B6 { get; set; } /// /// 10层有效 /// [SugarColumn(IsNullable = true)] public int? Data68_B5 { get; set; } /// /// 11层有效 /// [SugarColumn(IsNullable = true)] public int? Data68_B4 { get; set; } /// /// 12层有效 /// [SugarColumn(IsNullable = true)] public int? Data68_B3 { get; set; } /// /// 13层有效 /// [SugarColumn(IsNullable = true)] public int? Data68_B2 { get; set; } /// /// 14层有效 /// [SugarColumn(IsNullable = true)] public int? Data68_B1 { get; set; } /// /// 15层有效 /// [SugarColumn(IsNullable = true)] public int? Data68_B0 { get; set; } /// /// 16层有效 /// [SugarColumn(IsNullable = true)] public int? Data69_B7 { get; set; } /// /// 17层有效 /// [SugarColumn(IsNullable = true)] public int? Data69_B6 { get; set; } /// /// 18层有效 /// [SugarColumn(IsNullable = true)] public int? Data69_B5 { get; set; } /// /// 19层有效 /// [SugarColumn(IsNullable = true)] public int? Data69_B4 { get; set; } /// /// 20层有效 /// [SugarColumn(IsNullable = true)] public int? Data69_B3 { get; set; } /// /// 21层有效 /// [SugarColumn(IsNullable = true)] public int? Data69_B2 { get; set; } /// /// 22层有效 /// [SugarColumn(IsNullable = true)] public int? Data69_B1 { get; set; } /// /// 23层有效 /// [SugarColumn(IsNullable = true)] public int? Data69_B0 { get; set; } /// /// 24层有效 /// [SugarColumn(IsNullable = true)] public int? Data70_B7 { get; set; } /// /// 25层有效 /// [SugarColumn(IsNullable = true)] public int? Data70_B6 { get; set; } /// /// 26层有效 /// [SugarColumn(IsNullable = true)] public int? Data70_B5 { get; set; } /// /// 27层有效 /// [SugarColumn(IsNullable = true)] public int? Data70_B4 { get; set; } /// /// 28层有效 /// [SugarColumn(IsNullable = true)] public int? Data70_B3 { get; set; } /// /// 29层有效 /// [SugarColumn(IsNullable = true)] public int? Data70_B2 { get; set; } /// /// 30层有效 /// [SugarColumn(IsNullable = true)] public int? Data70_B1 { get; set; } /// /// 31层有效 /// [SugarColumn(IsNullable = true)] public int? Data70_B0 { get; set; } /// /// 32层有效 /// [SugarColumn(IsNullable = true)] public int? Data71_B7 { get; set; } /// /// 33层有效 /// [SugarColumn(IsNullable = true)] public int? Data71_B6 { get; set; } /// /// 34层有效 /// [SugarColumn(IsNullable = true)] public int? Data71_B5 { get; set; } /// /// 35层有效 /// [SugarColumn(IsNullable = true)] public int? Data71_B4 { get; set; } /// /// 36层有效 /// [SugarColumn(IsNullable = true)] public int? Data71_B3 { get; set; } /// /// 37层有效 /// [SugarColumn(IsNullable = true)] public int? Data71_B2 { get; set; } /// /// 38层有效 /// [SugarColumn(IsNullable = true)] public int? Data71_B1 { get; set; } /// /// 39层有效 /// [SugarColumn(IsNullable = true)] public int? Data71_B0 { get; set; } /// /// 40层有效 /// [SugarColumn(IsNullable = true)] public int? Data72_B7 { get; set; } /// /// 41层有效 /// [SugarColumn(IsNullable = true)] public int? Data72_B6 { get; set; } /// /// 42层有效 /// [SugarColumn(IsNullable = true)] public int? Data72_B5 { get; set; } /// /// 43层有效 /// [SugarColumn(IsNullable = true)] public int? Data72_B4 { get; set; } /// /// 恢复出厂设置 /// [SugarColumn(IsIgnore = true)] public int? Data8_B7_1104 { get; set; } /// /// 左笼配电箱急停按钮(0断开,1闭合) /// [SugarColumn(IsNullable = true)] public int? Data2_B7_2103 { get; set; } /// /// 右笼配电箱急停按钮(0断开,1闭合) /// [SugarColumn(IsNullable = true)] public int? Data2_B6_2103 { get; set; } #region 业务字段 [SugarColumn(IsIgnore = true)] public string? MsgType { get; set; } [SugarColumn(IsIgnore = true)] public DeviceData? WZ { get; set; } #endregion public static string[] GetNotNullColumns(IEnumerable datas) { var Result = new List(); var Type = typeof(DeviceData); foreach (var Propety in Type.GetProperties()) { if (datas.Any(x => Propety.GetValue(x) != null)) { Result.Add(Propety.Name); } } return Result.ToArray(); } } }