diff --git a/src/JiShe.CollectBus.Application.Contracts/BaseResultDto.cs b/src/JiShe.CollectBus.Application.Contracts/BaseResultDto.cs index 55c0339..72915a5 100644 --- a/src/JiShe.CollectBus.Application.Contracts/BaseResultDto.cs +++ b/src/JiShe.CollectBus.Application.Contracts/BaseResultDto.cs @@ -29,4 +29,23 @@ public class BaseResultDto where T : class /// The data. /// public T Data { get; set; } +} + +public class BaseResultDto +{ + /// + /// Gets or sets a value indicating whether this is status. + /// + /// + /// true if status; otherwise, false. + /// + public bool Status { get; set; } + + /// + /// Gets or sets the MSG. + /// + /// + /// The MSG. + /// + public string Msg { get; set; } } \ No newline at end of file diff --git a/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/AddConrOnlineRecordInput.cs b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/AddConrOnlineRecordInput.cs new file mode 100644 index 0000000..e6659a5 --- /dev/null +++ b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/AddConrOnlineRecordInput.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JiShe.CollectBus.EnergySystem.Dto +{ + /// + /// 更新集中器在线记录 + /// + public class AddConrOnlineRecordInput + { + /// + /// 区域编号 + /// + public string AreaCode { get; set; } + + /// + /// 区域地址 + /// + public string Address { get; set; } + + /// + /// 是否在线 + /// + public bool State { get; set; } + + /// + /// 在/离线时间 + /// + public DateTime LastTime { get; set; } + } +} diff --git a/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/AdjustMeterTimingInput.cs b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/AdjustMeterTimingInput.cs new file mode 100644 index 0000000..e2c9aba --- /dev/null +++ b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/AdjustMeterTimingInput.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JiShe.CollectBus.EnergySystem.Dto +{ + /// + /// 校准电表时间 + /// + public class AdjustMeterTimingInput:BaseInput + { + /// + /// 波特率 + /// + public int BaudRate { get; set; } + + /// + /// 端口号 + /// + public int Port { get; set; } + + /// + /// 电表地址 + /// + public string MeterAddress { get; set; } + + /// + /// 电表密码 + /// + public string Password { get; set; } + } +} diff --git a/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/AmmeterArchivesDownInput.cs b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/AmmeterArchivesDownInput.cs new file mode 100644 index 0000000..78be984 --- /dev/null +++ b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/AmmeterArchivesDownInput.cs @@ -0,0 +1,113 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Scriban.Syntax; + +namespace JiShe.CollectBus.EnergySystem.Dto +{ + /// + /// 电表档案下发输入 + /// + public class AmmeterArchivesDownInput:BaseInput + { + /// + /// 采集编码 + /// + public string ItemCode { get; set; } + + /// + /// 电表:1 + /// + public int MeterType { get; set; } + + public AmmeterArchivesDownDetailsInput Details { get; set; } + } + + public class AmmeterArchivesDownDetailsInput + { + public int SetDeviceCount { get; set; } + + public List Data { get; set; } + + } + + public class AmmeterArchivesDownDetailsDataInput + { + /// + /// 电表ID + /// + public string AmmeterId { get; set; } + + /// + /// 电能表/交流采样装置序号 + /// + public int SerialNumber { get; set; } + + /// + /// 所属测量点号 + /// + public int Pn { get; set; } + + /// + /// 波特率 + /// + public int Rate { get; set; } + + /// + /// 端口号 + /// + public int Port { get; set; } + + /// + /// 规约 + /// + public string AgreementType { get; set; } + + /// + /// 电表地址 + /// + public string Addrress { get; set; } + + /// + /// 电表密码 + /// + public int Password { get; set; } + + /// + /// 单费率:1, 复费率:4 + /// + public int RatesCount { get; set; } + + /// + /// 电能示值整数位个数 + /// + public int IntegerCount { get; set; } + + /// + /// 电能示值小数位个数 + /// + public int DecimalCount { get; set; } + + /// + /// 集中器地址 + /// + public string GatherAddress { get; set; } + + /// + /// 用户大类号 + /// + public string UserBigNumber { get; set; } + + /// + /// 用户小类号 + /// + public string UserSmallNumber { get; set; } + + /// + /// 电表:1 + /// + public int MeterType { get; set; } + } +} diff --git a/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/AmmeterArchivesDownOutput.cs b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/AmmeterArchivesDownOutput.cs new file mode 100644 index 0000000..4ef9470 --- /dev/null +++ b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/AmmeterArchivesDownOutput.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JiShe.CollectBus.EnergySystem.Dto +{ + /// + /// 电表档案下发输出 + /// + public class AmmeterArchivesDownOutput + { + /// + /// true: 成功,false:失败 + /// + public bool ValidData { get; set; } + /// + /// 备注(业务系统未使用) + /// + public string Remark { get; set; } + } +} diff --git a/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/AmmeterArchivesMatchInput.cs b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/AmmeterArchivesMatchInput.cs new file mode 100644 index 0000000..d04c1a4 --- /dev/null +++ b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/AmmeterArchivesMatchInput.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JiShe.CollectBus.EnergySystem.Dto +{ + /// + /// 电表档案一键匹配输入 + /// + public class AmmeterArchivesMatchInput + { + public string AreaCode { get; set; } + + public string Address { get; set; } + + public string GatherCode { get; set; } + + public AmmeterArchivesMatchDetailsInput Details { get; set; } + } + + public class AmmeterArchivesMatchDetailsInput + { + public List Data { get; set; } + } + + public class AmmeterArchivesMatchDetailsDataInput + { + /// + /// 波特率 + /// + public int BaudRate { get; set; } + + /// + /// 端口号 + /// + public int Port { get; set; } + + /// + /// 电表地址 + /// + public string MeterAddress { get; set; } + } +} diff --git a/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/AutoReportCollectionItemsSetInput.cs b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/AutoReportCollectionItemsSetInput.cs new file mode 100644 index 0000000..d0a5651 --- /dev/null +++ b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/AutoReportCollectionItemsSetInput.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JiShe.CollectBus.EnergySystem.Dto +{ + /// + /// 设置自动上报采集项输入 + /// + public class AutoReportCollectionItemsSetInput + { + public List Codes { get; set; } + + public int MeterType { get; set; } + + public string GatherCode { get; set; } + + public AutoReportCollectionItemsSetDetailsInput Details { get; set; } + } + + public class AutoReportCollectionItemsSetCodeInput + { + public string AreaCode { get; set; } + + public string Address { get; set; } + } + + public class AutoReportCollectionItemsSetDetailsInput + { + public int Cycle { get; set; } + + public int Unit { get; set; } + + public DateTime BaseTime { get; set; } + + public int CurveRatio { get; set; } + + public int Pn { get; set; } + + public List Details { get; set; } + + } + + public class AutoReportCollectionItemsSetDetailsPnFnInput + { + public int Pn { get; set; } + + public int Fn { get; set; } + } + +} diff --git a/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/AutoReportSetInput.cs b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/AutoReportSetInput.cs new file mode 100644 index 0000000..d76e6e9 --- /dev/null +++ b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/AutoReportSetInput.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JiShe.CollectBus.EnergySystem.Dto +{ + /// + /// 设置自动上报输入 + /// + public class AutoReportSetInput + { + public List Codes { get; set; } + + public int MeterType { get; set; } + + public string GatherCode { get; set; } + + public AutoReportSetDetailsInput Details { get; set; } + } + + public class AutoReportSetCodeInput + { + public string AreaCode { get; set; } + + public string Address { get; set; } + } + + public class AutoReportSetDetailsInput + { + /// + /// 是否开启自动上报 + /// + public bool IsOpen { get; set; } + + /// + /// 任务号 + /// + public int Pn { get; set; } + + } + +} diff --git a/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/BaseInput.cs b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/BaseInput.cs new file mode 100644 index 0000000..4fb593a --- /dev/null +++ b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/BaseInput.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JiShe.CollectBus.EnergySystem.Dto +{ + public class BaseInput + { + /// + /// 集中器区位码 + /// + public string AreaCode { get; set; } + + /// + /// 集中器地址 + /// + public string Address { get; set; } + + /// + /// 采集端端口号 + /// + public string GatherCode { get; set; } + + } +} diff --git a/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/BatchReadVersionInput.cs b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/BatchReadVersionInput.cs new file mode 100644 index 0000000..c8c655e --- /dev/null +++ b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/BatchReadVersionInput.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JiShe.CollectBus.EnergySystem.Dto +{ + /// + /// 批量抄读版本输入 + /// + public class BatchReadVersionInput + { + public List Data {get; set; } + + public string GatherCode { get; set; } + } + + public class BatchReadVersionDataInput + { + public string AreaCode { get; set; } + + public string Address { get; set; } + } +} diff --git a/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/BatchReadVersionOutput.cs b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/BatchReadVersionOutput.cs new file mode 100644 index 0000000..98b910d --- /dev/null +++ b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/BatchReadVersionOutput.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JiShe.CollectBus.EnergySystem.Dto +{ + public class BatchReadVersionOutput + { + public BatchReadVersionReamrkOutput Remark { get; set; } + } + + public class BatchReadVersionReamrkOutput + { + public string AreaCode { get; set; } + + public string Address { get; set; } + + /// + /// 厂商代号 + /// + public string MakerNo { get; set; } + + /// + /// 设备编号 + /// + public string DeviceNo { get; set; } + + /// + /// 终端软件版本号 + /// + public string SoftwareVersion { get; set; } + + /// + /// 终端软件发布日期:日月年 如 20240123 + /// + public string SoftwareReleaseDate { get; set; } + + /// + /// 添加时间 如:20240123 + /// + public string AddDate { get; set; } + + /// + /// 集中器ID + /// + public int FocusID { get; set; } + } +} diff --git a/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/CallTimeTestingInput.cs b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/CallTimeTestingInput.cs new file mode 100644 index 0000000..46bce79 --- /dev/null +++ b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/CallTimeTestingInput.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JiShe.CollectBus.EnergySystem.Dto +{ + /// + /// 召测时间 + /// + public class CallTimeTestingInput:BaseInput + { + /// + /// 采集编码 + /// + public string ItemCode { get;set; } + + /// + /// 集中器地址 + /// + public string FocusID { get; set; } + + /// + /// 电表:1 + /// + public string MeterType { get; set; } + } +} diff --git a/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/CommunicationParametersSetInput.cs b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/CommunicationParametersSetInput.cs new file mode 100644 index 0000000..47e9527 --- /dev/null +++ b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/CommunicationParametersSetInput.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JiShe.CollectBus.EnergySystem.Dto +{ + /// + /// 通讯参数设置 + /// + public class CommunicationParametersSetInput:BaseInput + { + /// + /// 采集编码 + /// + public string ItemCode { get; set; } + + /// + /// 集中器ID + /// + public string FocusID { get; set; } + + /// + /// 电表:1 + /// + public string MeterType { get; set; } + + public CommunicationParametersSetDataInput Data { get; set; } + } + + public class CommunicationParametersSetDataInput + { + /// + /// 主站IP和端口 如 119.23.59.186:10976 + /// + public string MasterIPandPort { get; set; } + + /// + /// 备用IP和端口 + /// + public string BackupIPandPort { get; set; } + + /// + /// APN 如 CMNET + /// + public string APN { get; set; } + } +} diff --git a/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/QueryAutoReportOpenStatusInput.cs b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/QueryAutoReportOpenStatusInput.cs new file mode 100644 index 0000000..bbb10ac --- /dev/null +++ b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/QueryAutoReportOpenStatusInput.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JiShe.CollectBus.EnergySystem.Dto +{ + /// + /// 查询自动上报开启状态输入 + /// + public class QueryAutoReportOpenStatusInput:BaseInput + { + /// + /// 电表:1 + /// + public string MeterType { get; set; } + + public QueryAutoReportOpenStatusDetailInput Detail { get; set; } + + } + + public class QueryAutoReportOpenStatusDetailInput + { + /// + /// 任务号 + /// + public int Pn { get; set; } + } +} diff --git a/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/QueryRecordLogInput.cs b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/QueryRecordLogInput.cs new file mode 100644 index 0000000..7972589 --- /dev/null +++ b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/QueryRecordLogInput.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JiShe.CollectBus.EnergySystem.Dto +{ + /// + /// 查询采集日志输入 + /// + public class QueryRecordLogInput + { + /// + /// 集中器编号 + /// + public string FocusCode { get; set; } + + /// + /// 电表地址 + /// + public string MeterAddress { get; set; } + + /// + /// 采集频率(5、15) + /// + public int TimeDensity { get; set; } + + /// + /// 采集编码 + /// + public string ItemCode { get; set; } + + public DateTime StartTime { get; set; } + + public DateTime EndTime { get; set; } + } +} diff --git a/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/QueryRecordLogOutput.cs b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/QueryRecordLogOutput.cs new file mode 100644 index 0000000..38e88a9 --- /dev/null +++ b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/QueryRecordLogOutput.cs @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JiShe.CollectBus.EnergySystem.Dto +{ + public class QueryRecordLogOutput + { + } + + public class QueryRecordLogRemarkOutput + { + /// + /// 集中器编号 + /// + public string FocusCode { get; set; } + + /// + /// 电表ID + /// + public int MeterId { get; set; } + + /// + /// 电表地址 + /// + public string MeterAddress { get; set; } + + /// + /// 1, --电表 + /// + public int MeterType { get; set; } + + /// + /// 时间跨度 + /// + public int TimeSpan { get; set; } + + /// + /// 采集编码 + /// + public string ItemCode { get; set; } + + /// + /// 发送报文 + /// + public string IssueData { get; set; } + + /// + /// 接收报文 + /// + public string ReceiveData { get; set; } + + /// + /// 0手动采集,1自动采集 + /// + public int IsUpload { get; set; } + + /// + /// 0正常数据,1超时数据 + /// + public int IsTimeout { get; set; } + + /// + /// 是否为补抄 + /// + public bool IsRepair { get; set; } + + public DateTime AddTime { get; set; } + + /// + /// 过期字段 年月日时 + /// + public DateTime ExpireTime { get; set; } + + /// + /// 异常错误信息 + /// + public string Remark { get; set; } + } + + +} diff --git a/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/ReadMeterNumInput.cs b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/ReadMeterNumInput.cs new file mode 100644 index 0000000..eeec331 --- /dev/null +++ b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/ReadMeterNumInput.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JiShe.CollectBus.EnergySystem.Dto +{ + /// + /// 读取表号 + /// + public class ReadMeterNumInput:BaseInput + { + /// + /// 采集编码 + /// + public string ItemCode { get; set; } + + /// + /// 集中器地址 + /// + public string FocusID { get; set; } + + /// + /// 电表:1 + /// + public string MeterType { get; set; } + + /// + /// 计量点号 如"1,2,3,4" + /// + public string Data { get; set; } + } +} diff --git a/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/ReadMeterNumOutput.cs b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/ReadMeterNumOutput.cs new file mode 100644 index 0000000..4477365 --- /dev/null +++ b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/ReadMeterNumOutput.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JiShe.CollectBus.EnergySystem.Dto +{ + /// + /// 读取表号输出 + /// + public class ReadMeterNumOutput + { + public List Remark { get; set; } + } + + public class ReadMeterNumRemarkOutput + { + public string ComNum { get; set; } + + public string BerComPass { get; set; } + + public string RuleType { get; set; } + + /// + /// 波特率 + /// + public int BaudRate { get; set; } + + /// + /// 集中器地址 + /// + public string CollectorAddress { get; set; } + + /// + /// 端口 + /// + public int Port { get; set; } + } +} diff --git a/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/ReadTimeInput.cs b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/ReadTimeInput.cs new file mode 100644 index 0000000..06192cd --- /dev/null +++ b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/ReadTimeInput.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JiShe.CollectBus.EnergySystem.Dto +{ + /// + /// 读取时段输入 + /// + public class ReadTimeInput: BaseInput + { + public int AmmeterId { get; set; } + + public string AmmeterAddress { get; set; } + + /// + /// 电表:1 + /// + public int MeterType { get; set; } + + } +} diff --git a/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/ReadTimeOutput.cs b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/ReadTimeOutput.cs new file mode 100644 index 0000000..a8ceb6e --- /dev/null +++ b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/ReadTimeOutput.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JiShe.CollectBus.EnergySystem.Dto +{ + /// + /// 读取时段输出 + /// + public class ReadTimeOutput + { + /// + /// 电表ID + /// + public int AmmeterID { get; set; } + + /// + /// J (尖),F (峰),P (平),G (谷) + /// + public string RateType { get; set; } + + /// + /// 起始时间(如尖时段起始时间 HH:mm) + /// + public string StartTime { get; set; } + + /// + /// 结束时间(如尖时段结束时间 HH:mm) + /// + public string EndTime { get; set; } + + /// + /// 月份 格式 1,2,3,4,5,6,7,8,9,10,11,12 + /// + public string RateMonth { get; set; } + + /// + /// 状态 0:有效 -1:删除 + /// + public int State { get; set; } + + /// + /// 时段类型 用数字表示 一时段用1 二时段用2 + /// + public int TimesType { get; set; } + } +} diff --git a/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/ReadingInput.cs b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/ReadingInput.cs new file mode 100644 index 0000000..07c9c42 --- /dev/null +++ b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/ReadingInput.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JiShe.CollectBus.EnergySystem.Dto +{ + /// + /// 抄读输入 + /// + public class ReadingInput:BaseInput + { + /// + /// 电表ID + /// + public string AmmeterId { get; set; } + + /// + ///采集编码 {"0C_129", "0C_131"}, 采集编码.0C_129:正向有功;C_131:反向有功 + /// + public string ItemCodes { get; set; } + + /// + /// 集中器ID + /// + public int Point { get; set; } + + /// + /// 冻结密度,-1:采集项本身无密度位,0:无,1:15分钟,2:30分钟,3:60分钟,245:5分钟,255:1分钟 + /// + public int Density { get; set; } + + /// + /// 电表:1 + /// + public int MeterType { get; set; } + + /// + /// 数据时标起始时间:当前时间减1天 + /// + public DateTime DataTime { get; set; } + } +} diff --git a/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/ReadingOutput.cs b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/ReadingOutput.cs new file mode 100644 index 0000000..a984c26 --- /dev/null +++ b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/ReadingOutput.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JiShe.CollectBus.EnergySystem.Dto +{ + public class ReadingOutput + { + /// + /// true:成功,false:失败 + /// + public bool ValidData { get; set; } + + /// + ///0C_129_1 数据类型 总示值 + /// + public string DataType { get; set; } + + /// + /// 示值 + /// + public decimal ReadValue { get; set; } + } +} diff --git a/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/TerminalRestartInput.cs b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/TerminalRestartInput.cs new file mode 100644 index 0000000..eb4cef3 --- /dev/null +++ b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/TerminalRestartInput.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JiShe.CollectBus.EnergySystem.Dto +{ + /// + /// 终端重启 + /// + public class TerminalRestartInput:BaseInput + { + /// + /// 采集编码 + /// + public string ItemCode { get; set; } + + /// + /// 集中器地址 + /// + public string FocusID { get; set; } + + /// + /// 电表:1 + /// + public string MeterType { get; set; } + } +} diff --git a/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/TimeAdjustInput.cs b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/TimeAdjustInput.cs new file mode 100644 index 0000000..7115fde --- /dev/null +++ b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/TimeAdjustInput.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JiShe.CollectBus.EnergySystem.Dto +{ + /// + /// 时间校准 + /// + public class TimeAdjustInput : BaseInput + { + /// + /// 采集编码 + /// + public string ItemCode { get; set; } + + /// + /// 集中器地址 + /// + public string FocusID { get; set; } + + /// + /// 电表:1 + /// + public string MeterType { get; set; } + } +} diff --git a/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/TimeSetInput.cs b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/TimeSetInput.cs new file mode 100644 index 0000000..56da498 --- /dev/null +++ b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/TimeSetInput.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JiShe.CollectBus.EnergySystem.Dto +{ + /// + /// 时段设置输入 + /// + public class TimeSetInput + { + /// + /// 集中器号 + /// + public string FocusCode { get; set; } + + /// + /// 电表地址 + /// + public string MeterAddress { get; set; } + + /// + /// 电表ID + /// + public int MeterID { get; set; } + + /// + /// 采集端端口号 + /// + public string GatherCode { get; set; } + + public List Data { get; set; } + } + + public class TimeSetDataInput + { + /// + /// 1,2,3 + /// + public string Month { get; set; } + + public List Data { get; set; } + } + + public class TimeSetDataDataInput + { + + public string Rate { get; set; } + + public List Times { get; set; } + } + + public class TimeSetDataDataTimeInput + { + + public string StartTime { get; set; } + + public string EndTime { get; set; } + } +} diff --git a/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/TimeSetOutput.cs b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/TimeSetOutput.cs new file mode 100644 index 0000000..39ba9fe --- /dev/null +++ b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/TimeSetOutput.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JiShe.CollectBus.EnergySystem.Dto +{ + public class TimeSetOutput + { + } +} diff --git a/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/ValveControlInput.cs b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/ValveControlInput.cs index d056764..01a229d 100644 --- a/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/ValveControlInput.cs +++ b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/Dto/ValveControlInput.cs @@ -9,16 +9,8 @@ namespace JiShe.CollectBus.EnergySystem.Dto /// /// 阀控输入 /// - public class ValveControlInput + public class ValveControlInput:BaseInput { - /// - /// 集中器区位码 - /// - public string AreaCode { get; set; } - /// - /// 集中器地址 - /// - public string Address { get; set; } /// /// 表号 /// @@ -27,14 +19,12 @@ namespace JiShe.CollectBus.EnergySystem.Dto /// 0 合闸,开阀, 1 断开、跳闸,关阀 /// public int TripState { get; set; } + /// - /// 采集端端口号 - /// - public string GatherCode { get; set; } - /// - /// 表:1,水表:2,燃气表:3,热能表:4 水表流量计:5,燃气表流量计:6,特殊电表:7 + /// 电表:1,水表:2,燃气表:3,热能表:4 水表流量计:5,燃气表流量计:6,特殊电表:7 /// public int MeterType { get; set; } + } } diff --git a/src/JiShe.CollectBus.Application.Contracts/EnergySystem/IEnergySystemAppService.cs b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/IEnergySystemAppService.cs index e9be20a..c9f737e 100644 --- a/src/JiShe.CollectBus.Application.Contracts/EnergySystem/IEnergySystemAppService.cs +++ b/src/JiShe.CollectBus.Application.Contracts/EnergySystem/IEnergySystemAppService.cs @@ -12,4 +12,116 @@ public interface IEnergySystemAppService : IApplicationService /// The input. /// Task> ValveControl(ValveControlInput input); + + /// + /// 批量抄读时段 + /// + /// + /// + Task> ReadTime(ReadTimeInput input); + + /// + /// 电表档案下发 + /// + /// + /// + Task> AmmeterArchivesDown(AmmeterArchivesDownInput input); + + /// + /// 电表档案一键匹配 + /// + /// + /// + Task AmmeterArchivesMatch(AmmeterArchivesMatchInput input); + + /// + /// 通讯参数设置 + /// + /// + /// + Task CommunicationParametersSet(CommunicationParametersSetInput input); + + /// + /// 召测时间 + /// + /// + /// + Task CallTimeTesting(CallTimeTestingInput input); + + /// + /// 时间校准 + /// + /// + /// + Task TimeAdjust(TimeAdjustInput input); + + /// + /// 重启终端 + /// + /// + /// + Task TerminalRestart(TerminalRestartInput input); + + /// + /// 读取表号 + /// + /// + /// + Task> ReadMeterNum(ReadMeterNumInput input); + + /// + /// 抄读 + /// + /// + /// + Task> Reading(ReadingInput input); + + /// + /// 设置时间段 + /// + /// + /// + Task TimeSet(TimeSetInput input); + + /// + /// 设置自动上报采集项 + /// + /// + /// + Task AutoReportCollectionItemsSet(AutoReportCollectionItemsSetInput input); + + /// + /// 设置自动上报 + /// + /// + /// + Task AutoReportSet(AutoReportSetInput input); + + /// + /// 查询自动上报开启状态 + /// + /// + /// + Task QueryAutoReportOpenStatus(QueryAutoReportOpenStatusInput input); + + /// + /// 批量抄读版本 + /// + /// + /// + Task> BatchReadVersion(BatchReadVersionInput input); + + /// + /// 查询采集日志 + /// + /// + /// + Task> QueryRecordLog(QueryRecordLogInput input); + + /// + /// 校准电表时间 + /// + /// + /// + Task AdjustMeterTiming(AdjustMeterTimingInput input); } \ No newline at end of file diff --git a/src/JiShe.CollectBus.Application/EnergySystem/EnergySystemAppService.cs b/src/JiShe.CollectBus.Application/EnergySystem/EnergySystemAppService.cs new file mode 100644 index 0000000..cd68a1a --- /dev/null +++ b/src/JiShe.CollectBus.Application/EnergySystem/EnergySystemAppService.cs @@ -0,0 +1,97 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using JiShe.CollectBus.EnergySystem.Dto; + +namespace JiShe.CollectBus.EnergySystem +{ + public class EnergySystemAppService: CollectBusAppService,IEnergySystemAppService + { + public Task> ValveControl(ValveControlInput input) + { + throw new NotImplementedException(); + } + + public Task> ReadTime(ReadTimeInput input) + { + throw new NotImplementedException(); + } + + public Task> AmmeterArchivesDown(AmmeterArchivesDownInput input) + { + throw new NotImplementedException(); + } + + public Task AmmeterArchivesMatch(AmmeterArchivesMatchInput input) + { + throw new NotImplementedException(); + } + + public Task CommunicationParametersSet(CommunicationParametersSetInput input) + { + throw new NotImplementedException(); + } + + public Task CallTimeTesting(CallTimeTestingInput input) + { + throw new NotImplementedException(); + } + + public Task TimeAdjust(TimeAdjustInput input) + { + throw new NotImplementedException(); + } + + public Task TerminalRestart(TerminalRestartInput input) + { + throw new NotImplementedException(); + } + + public Task> ReadMeterNum(ReadMeterNumInput input) + { + throw new NotImplementedException(); + } + + public Task> Reading(ReadingInput input) + { + throw new NotImplementedException(); + } + + public Task TimeSet(TimeSetInput input) + { + throw new NotImplementedException(); + } + + public Task AutoReportCollectionItemsSet(AutoReportCollectionItemsSetInput input) + { + throw new NotImplementedException(); + } + + public Task AutoReportSet(AutoReportSetInput input) + { + throw new NotImplementedException(); + } + + public Task QueryAutoReportOpenStatus(QueryAutoReportOpenStatusInput input) + { + throw new NotImplementedException(); + } + + public Task> BatchReadVersion(BatchReadVersionInput input) + { + throw new NotImplementedException(); + } + + public Task> QueryRecordLog(QueryRecordLogInput input) + { + throw new NotImplementedException(); + } + + public Task AdjustMeterTiming(AdjustMeterTimingInput input) + { + throw new NotImplementedException(); + } + } +} diff --git a/src/JiShe.CollectBus.Application/Subscribers/SubscriberAppService.cs b/src/JiShe.CollectBus.Application/Subscribers/SubscriberAppService.cs index cea6c1b..d5cc55e 100644 --- a/src/JiShe.CollectBus.Application/Subscribers/SubscriberAppService.cs +++ b/src/JiShe.CollectBus.Application/Subscribers/SubscriberAppService.cs @@ -77,6 +77,7 @@ namespace JiShe.CollectBus.Subscribers if (device!=null) { await _tcpService.SendAsync(device.ClientId, issuedEventMessage.Message); + } }