修改代码

This commit is contained in:
陈益 2025-04-23 23:42:35 +08:00
parent 310ae97a6b
commit 57021e2b9c
4 changed files with 15 additions and 9 deletions

View File

@ -373,12 +373,9 @@ namespace JiShe.CollectBus.Protocol.Contracts.Abstracts
/// 组装透明转发报文
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="entity"></param>
/// <param name="entity">设备数据实体</param>
/// <returns></returns>
public virtual List<string> GenerateAFN10HContent<T>(T entity)
{
throw new Exception();
}
public abstract Task<List<string>> GenerateAFN10HContent<T>(T entity) where T : class;
}
}

View File

@ -22,7 +22,7 @@ namespace JiShe.CollectBus.Protocol.Contracts.Interfaces
/// 组装透明转发报文
/// </summary>
/// <returns></returns>
List<string> GenerateAFN10HContent<T>(T entity);
Task<List<string>> GenerateAFN10HContent<T>(T entity) where T : class;
//Task LoginAsync(MessageReceivedLogin messageReceived);

View File

@ -262,7 +262,16 @@ namespace JiShe.CollectBus.Protocol
/// <summary>
/// 组装透明转发报文
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="entity">设备数据实体</param>
/// <returns></returns>
public override async Task<List<string>> GenerateAFN10HContent<T>(T entity) where T : class
{
return await Task.FromResult(new List<string>());
}
#region

View File

@ -952,13 +952,13 @@ namespace JiShe.CollectBus.ScheduledMeterReading
}
else
{
_logger.LogWarning($"{nameof(WatermeterCreatePublishTaskAction)} 集中器{watermeter.FocusAddress}的表{watermeter.Name}采集项{tempItem}无效编码。");
_logger.LogWarning($"{nameof(WatermeterCreatePublishTaskAction)} 集中器{watermeter.FocusAddress}的表{watermeter.Name}采集项{tempItem}无效编码。");
continue;
}
if (builderResponse == null || builderResponse.Data.Length <= 0)
{
_logger.LogWarning($"{nameof(WatermeterCreatePublishTaskAction)} 集中器{watermeter.FocusAddress}的表{watermeter.Name}采集项{tempItem}未能正确获取报文。");
_logger.LogWarning($"{nameof(WatermeterCreatePublishTaskAction)} 集中器{watermeter.FocusAddress}的表{watermeter.Name}采集项{tempItem}未能正确获取报文。");
continue;
}