using System; using FreeSql.DataAnnotations; namespace JiShe.CollectBus.EnergySystems.Entities { public class TB_AmmeterInfo { /// /// 电表信息 /// public int ID { get; set; } /// /// 电表编号、电表型号 /// public string Code { get; set; } /// /// 区域信息外键 /// public int AreaID { get; set; } /// /// 区域名 /// [Column(IsIgnore = true)] public string AreaName { get; set; } /// /// 电表别名 /// public string Name { get; set; } /// /// 电表类别 (1单相、2三相三线、3三相四线) /// public int TypeName { get; set; } /// /// 电表安装地址 /// public string Location { get; set; } /// /// 电表安装时间 /// public DateTime? InstallTime { get; set; } /// /// 电表密码 /// public string Password { get; set; } /// /// 电表通信地址 /// public string Address { get; set; } /// /// 采集器地址 /// public string CollectorAddress { get; set; } /// /// 电压变比 /// 电压互感器(PT) /// public double TimesV { get; set; } /// /// 电流变比 /// 电流互感器(CT) /// public double TimesA { get; set; } /// /// 是否总表 /// public int IsSum { get; set; } /// /// 总表ID /// public int ParentID { get; set; } /// /// Explain /// public string Explain { get; set; } /// /// AddDate /// public DateTime AddDate { get; set; } /// /// State表状态: (对应枚举 MeterStateEnum) /// 0新装(未下发),1运行(档案下发成功时设置状态值1), 2暂停, 100销表(销表后是否重新启用); /// 特定State: -1 已删除 /// public int State { get; set; } /// /// 费率类型,单、多 (SingleRate :单费率(单相表1),多费率(其他0) ,与TypeName字段无关) /// SingleRate ? "单" : "复" /// [SingleRate] --0 复费率 false , 1 单费率 true (与PayPlanID保持一致) ///对应 TB_PayPlan.Type: 1复费率,2单费率 /// public bool SingleRate { get; set; } /// /// 0 未下发 (false), 1 已下发 (true) /// public bool IsSend { get; set; } /// /// 创建人ID /// public int CreateUserID { get; set; } /// /// 波特率 default(2400) /// public int Baudrate { get; set; } /// /// 规约 -电表default(30) /// public int? Protocol { get; set; } /// /// 一个集中器下的[MeteringCode]必须唯一。 /// public int MeteringCode { get; set; } /// /// MeteringPort 端口就几个可以枚举。 /// public int MeteringPort { get; set; } /// /// 对应[TB_PayPlan] /// public int PayPlanID { get; set; } public int ProjectID { get; set; } public int FocusID { get; set; } /// /// 集中器名称(扩展字段) /// [Column(IsIgnore = true)] public string FocusName { get; set; } /// /// 跳合闸状态字段: 0 合闸,1 跳闸 /// 电表:TripState (0 合闸-通电, 1 断开、跳闸); /// public int TripState { get; set; } /// /// 最近阀控时间 /// public DateTime? TripTime { get; set; } /// /// 排序字段 /// public int Sort { get; set; } /// /// 电子表0 , /// 机械表1(德力西机械电表-Code) /// (原有数据都默认:电子电表) /// [Column(IsIgnore = true)] public int MeterKind { get; set; } /// /// 采集方案ID /// [Column(IsIgnore = true)] public int GatherPlanID { get; set; } /// /// 采集项 /// public string ReadClass { get; set; } /// /// 修改日期 /// public DateTime? EditDate { get; set; } /// /// 修改用ID /// public int? EditUserID { get; set; } /// /// 删除时间 /// public DateTime? RemoveDate { get; set; } /// /// 删除用户ID /// public int? RemoveUserID { get; set; } /// /// 掉电状态 (未上电=1,上电掉电中=2) /// public int? PowerDownStatus { get; set; } /// /// 电流规格 /// public string CurrentSpec { get; set; } /// /// 电压规格 /// public string VoltageSpec { get; set; } /// /// 通讯状态 1:在线 0:离线 /// public int LineState { get; set; } /// /// 特殊表 1:是 0:否 /// public int Special { get; set; } /* /// /// 采集项总数 /// public int GatherTotal { get; set; } /// /// 采集项 /// public string GatherDataTypes { get; set; } */ /// /// 复费率类型(四费率=4,八费率=8) /// public int? MultipleRateType { get; set; } } public class VMAmmeterInfo : TB_AmmeterInfo { public decimal? Rate { get; set; } public decimal? Rate1 { get; set; } public decimal? Rate2 { get; set; } public decimal? Rate3 { get; set; } public decimal? Rate4 { get; set; } public decimal? Rate5 { get; set; } public decimal? Rate6 { get; set; } } }