2025-04-18 17:46:24 +08:00
|
|
|
|
using FreeSql.DataAnnotations;
|
|
|
|
|
|
using JiShe.CollectBus.Common.Enums;
|
2025-04-15 16:48:35 +08:00
|
|
|
|
using JiShe.CollectBus.Common.Models;
|
2025-03-12 14:57:42 +08:00
|
|
|
|
using System;
|
2025-03-12 09:58:37 +08:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
2025-03-14 14:28:04 +08:00
|
|
|
|
namespace JiShe.CollectBus.IotSystems.Watermeter
|
2025-03-12 09:58:37 +08:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
2025-03-12 14:57:42 +08:00
|
|
|
|
/// 水表信息
|
2025-03-12 09:58:37 +08:00
|
|
|
|
/// </summary>
|
2025-04-15 16:48:35 +08:00
|
|
|
|
public class WatermeterInfo: DeviceCacheBasicModel
|
2025-04-18 17:46:24 +08:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 关系映射标识,用于ZSet的Member字段和Set的Value字段,具体值可以根据不同业务场景进行定义
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Column(IsIgnore = true)]
|
|
|
|
|
|
public override string MemberId => $"{FocusId}:{MeterId}";
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// ZSet排序索引分数值,具体值可以根据不同业务场景进行定义,例如时间戳
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Column(IsIgnore = true)]
|
|
|
|
|
|
public override long ScoreValue => ((long)FocusId << 32) | (uint)DateTime.Now.Ticks;
|
|
|
|
|
|
|
2025-03-12 09:58:37 +08:00
|
|
|
|
/// <summary>
|
2025-03-12 14:57:42 +08:00
|
|
|
|
/// 水表名称
|
2025-03-12 09:58:37 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string Name { get; set; }
|
2025-03-12 14:57:42 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 表密码
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string Password { get; set; }
|
2025-03-12 09:58:37 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 一个集中器下的[MeteringCode]必须唯一。 PN
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public int MeteringCode { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 波特率 default(2400)
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public int Baudrate { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// MeteringPort 端口就几个可以枚举。
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public int MeteringPort { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2025-03-12 14:57:42 +08:00
|
|
|
|
/// 水表通信地址 (当protocol=32时,Address为14位字符;否则12位字符)
|
2025-03-12 09:58:37 +08:00
|
|
|
|
/// </summary>
|
2025-03-12 14:57:42 +08:00
|
|
|
|
public string MeterAddress { get; set; }
|
2025-03-12 09:58:37 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2025-03-12 14:57:42 +08:00
|
|
|
|
/// 水表类别 (水表类型改成“公称口径”)
|
2025-03-12 09:58:37 +08:00
|
|
|
|
/// </summary>
|
2025-03-12 14:57:42 +08:00
|
|
|
|
public string TypeName { get; set; }
|
2025-03-12 09:58:37 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2025-03-12 14:57:42 +08:00
|
|
|
|
/// 规约 -电表default(30) 1:97协议,30:07协议,32:CJ/T 188—2018协议
|
2025-03-12 09:58:37 +08:00
|
|
|
|
/// </summary>
|
2025-03-12 14:57:42 +08:00
|
|
|
|
public int? Protocol { get; set; }
|
2025-03-12 09:58:37 +08:00
|
|
|
|
|
|
|
|
|
|
|
2025-03-12 14:57:42 +08:00
|
|
|
|
public string Code { get; set; }
|
2025-03-12 09:58:37 +08:00
|
|
|
|
/// <summary>
|
2025-03-12 14:57:42 +08:00
|
|
|
|
/// 通讯方案:
|
|
|
|
|
|
/// NB-IOT常德水表、NB-IOT泽联电表、GPRS华立水表、
|
|
|
|
|
|
/// RS-485、无线、载波
|
2025-03-12 09:58:37 +08:00
|
|
|
|
/// </summary>
|
2025-03-12 14:57:42 +08:00
|
|
|
|
public string LinkType { get; set; }
|
2025-03-12 09:58:37 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2025-03-12 14:57:42 +08:00
|
|
|
|
/// HaveValve: 是否带阀 (0 不带阀, 1 带阀)
|
|
|
|
|
|
/// 注意:NULL表示未设置
|
2025-03-12 09:58:37 +08:00
|
|
|
|
/// </summary>
|
2025-03-12 14:57:42 +08:00
|
|
|
|
public int? HaveValve { get; set; }
|
2025-03-12 09:58:37 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2025-03-12 14:57:42 +08:00
|
|
|
|
/// 设备类型: 水表\气表、流量计
|
2025-03-12 09:58:37 +08:00
|
|
|
|
/// </summary>
|
2025-03-12 14:57:42 +08:00
|
|
|
|
public string MeterTypeName { get; set; }
|
2025-03-12 09:58:37 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2025-03-12 14:57:42 +08:00
|
|
|
|
/// 表计类型
|
|
|
|
|
|
//// 电表= 1,水表= 2,燃气表= 3,热能表= 4,水表流量计=5,燃气表流量计=6,特殊电表=7
|
2025-03-12 09:58:37 +08:00
|
|
|
|
/// </summary>
|
2025-03-12 14:57:42 +08:00
|
|
|
|
public MeterTypeEnum MeterType { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 设备品牌;
|
|
|
|
|
|
/// (当 MeterType = 水表, 如 威铭、捷先 等)
|
|
|
|
|
|
/// (当 MeterType = 流量计, 如 西恩超声波流量计、西恩电磁流量计、涡街流量计 等)
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string MeterBrand { get; set; }
|
2025-03-12 09:58:37 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2025-03-12 14:57:42 +08:00
|
|
|
|
/// 倍率
|
2025-03-12 09:58:37 +08:00
|
|
|
|
/// </summary>
|
2025-03-12 14:57:42 +08:00
|
|
|
|
public decimal TimesRate { get; set; }
|
2025-03-12 09:58:37 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2025-03-12 14:57:42 +08:00
|
|
|
|
/// 集中器地址
|
2025-03-12 09:58:37 +08:00
|
|
|
|
/// </summary>
|
2025-03-12 14:57:42 +08:00
|
|
|
|
public string Address { get; set; }
|
2025-03-12 09:58:37 +08:00
|
|
|
|
|
2025-03-12 14:57:42 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 网关地址
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string GateAddress { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 集中器区域
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string AreaCode { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 通讯状态
|
|
|
|
|
|
/// 水表:TripState (0 合闸-开阀, 1 关阀);开阀关阀
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public int TripState { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 是否自动采集
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public int AutomaticReport { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// State表状态:
|
|
|
|
|
|
/// 0新装(未下发),1运行(档案下发成功时设置状态值1), 2暂停, 100销表(销表后是否重新启用)
|
|
|
|
|
|
/// 特定:State -1 已删除
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public int State { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 采集时间间隔(分钟,如15)
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public int TimeDensity { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 采集器编号
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string GatherCode { get; set; }
|
|
|
|
|
|
|
2025-03-12 09:58:37 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 项目ID
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public int ProjectID { get; set; }
|
2025-03-12 14:57:42 +08:00
|
|
|
|
|
2025-03-12 09:58:37 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 是否异常集中器 0:正常,1异常
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public int AbnormalState { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2025-03-12 14:57:42 +08:00
|
|
|
|
/// 集中器最后在线时间
|
2025-03-12 09:58:37 +08:00
|
|
|
|
/// </summary>
|
2025-03-12 14:57:42 +08:00
|
|
|
|
public DateTime LastTime { get; set; }
|
2025-03-12 09:58:37 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|