暂存
This commit is contained in:
parent
3b2e1c6e9c
commit
e0b055c612
@ -1,6 +1,6 @@
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using JiShe.CollectBus.Common.Models;
|
using JiShe.CollectBus.Common.Models;
|
||||||
using JiShe.CollectBus.MessageReceiveds;
|
using JiShe.CollectBus.IotSystems.MessageReceiveds;
|
||||||
using Volo.Abp.Application.Services;
|
using Volo.Abp.Application.Services;
|
||||||
|
|
||||||
namespace JiShe.CollectBus.Subscribers
|
namespace JiShe.CollectBus.Subscribers
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
using JiShe.CollectBus.Ammeters;
|
using JiShe.CollectBus.Ammeters;
|
||||||
using JiShe.CollectBus.Watermeter;
|
using JiShe.CollectBus.IotSystems.Watermeter;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@ -15,8 +15,6 @@ namespace JiShe.CollectBus.Workers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IScheduledMeterReadingService : IApplicationService
|
public interface IScheduledMeterReadingService : IApplicationService
|
||||||
{
|
{
|
||||||
|
|
||||||
#region 电表采集处理
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取电表信息
|
/// 获取电表信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -31,28 +29,6 @@ namespace JiShe.CollectBus.Workers
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task InitAmmeterCacheData(string gatherCode = "");
|
Task InitAmmeterCacheData(string gatherCode = "");
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 1分钟采集电表数据
|
|
||||||
/// </summary>
|
|
||||||
/// <returns></returns>
|
|
||||||
Task AmmeterScheduledMeterOneMinuteReading();
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 5分钟采集电表数据
|
|
||||||
/// </summary>
|
|
||||||
/// <returns></returns>
|
|
||||||
Task AmmeterScheduledMeterFiveMinuteReading();
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 15分钟采集电表数据
|
|
||||||
/// </summary>
|
|
||||||
/// <returns></returns>
|
|
||||||
Task AmmeterScheduledMeterFifteenMinuteReading();
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
#region 水表采集处理
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取水表信息
|
/// 获取水表信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -68,24 +44,21 @@ namespace JiShe.CollectBus.Workers
|
|||||||
Task InitWatermeterCacheData(string gatherCode = "");
|
Task InitWatermeterCacheData(string gatherCode = "");
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 1分钟采集水表数据
|
/// 1分钟采集电表数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task WatermeterScheduledMeterOneMinuteReading();
|
Task ScheduledMeterOneMinuteReading();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 5分钟采集水表数据
|
/// 5分钟采集电表数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task WatermeterScheduledMeterFiveMinuteReading();
|
Task ScheduledMeterFiveMinuteReading();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 15分钟采集水表数据
|
/// 15分钟采集电表数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task WatermeterScheduledMeterFifteenMinuteReading();
|
Task ScheduledMeterFifteenMinuteReading();
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using JiShe.CollectBus.Common.Enums;
|
using JiShe.CollectBus.Common.Enums;
|
||||||
using JiShe.CollectBus.MessageIssueds;
|
using JiShe.CollectBus.IotSystems.MessageIssueds;
|
||||||
using JiShe.CollectBus.MessageReceiveds;
|
using JiShe.CollectBus.IotSystems.MessageReceiveds;
|
||||||
using MassTransit;
|
using MassTransit;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using TouchSocket.Sockets;
|
using TouchSocket.Sockets;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using JiShe.CollectBus.MessageIssueds;
|
using JiShe.CollectBus.IotSystems.MessageIssueds;
|
||||||
using MassTransit;
|
using MassTransit;
|
||||||
|
|
||||||
namespace JiShe.CollectBus.Consumers
|
namespace JiShe.CollectBus.Consumers
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using JiShe.CollectBus.MessageReceiveds;
|
using JiShe.CollectBus.IotSystems.MessageReceiveds;
|
||||||
using JiShe.CollectBus.Protocol.Contracts.Interfaces;
|
using JiShe.CollectBus.Protocol.Contracts.Interfaces;
|
||||||
using MassTransit;
|
using MassTransit;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using JiShe.CollectBus.MessageReceiveds;
|
using JiShe.CollectBus.IotSystems.MessageReceiveds;
|
||||||
using MassTransit;
|
using MassTransit;
|
||||||
|
|
||||||
namespace JiShe.CollectBus.Consumers
|
namespace JiShe.CollectBus.Consumers
|
||||||
|
|||||||
@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using JiShe.CollectBus.Common.Models;
|
using JiShe.CollectBus.Common.Models;
|
||||||
using JiShe.CollectBus.MessageReceiveds;
|
using JiShe.CollectBus.IotSystems.MessageReceiveds;
|
||||||
using JiShe.CollectBus.Protocol.Contracts.Interfaces;
|
using JiShe.CollectBus.Protocol.Contracts.Interfaces;
|
||||||
using MassTransit;
|
using MassTransit;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|||||||
@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using JiShe.CollectBus.Common.Models;
|
using JiShe.CollectBus.Common.Models;
|
||||||
using JiShe.CollectBus.MessageReceiveds;
|
using JiShe.CollectBus.IotSystems.MessageReceiveds;
|
||||||
using JiShe.CollectBus.Protocol.Contracts.Interfaces;
|
using JiShe.CollectBus.Protocol.Contracts.Interfaces;
|
||||||
using MassTransit;
|
using MassTransit;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|||||||
@ -12,9 +12,9 @@ using JiShe.CollectBus.Common.Extensions;
|
|||||||
using JiShe.CollectBus.Common.Models;
|
using JiShe.CollectBus.Common.Models;
|
||||||
using JiShe.CollectBus.EnergySystem.Dto;
|
using JiShe.CollectBus.EnergySystem.Dto;
|
||||||
using JiShe.CollectBus.FreeSql;
|
using JiShe.CollectBus.FreeSql;
|
||||||
using JiShe.CollectBus.PrepayModel;
|
using JiShe.CollectBus.IotSystems.PrepayModel;
|
||||||
|
using JiShe.CollectBus.IotSystems.Records;
|
||||||
using JiShe.CollectBus.Protocol.Contracts;
|
using JiShe.CollectBus.Protocol.Contracts;
|
||||||
using JiShe.CollectBus.Records;
|
|
||||||
using MassTransit;
|
using MassTransit;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|||||||
@ -4,10 +4,10 @@ using DotNetCore.CAP;
|
|||||||
using JiShe.CollectBus.Ammeters;
|
using JiShe.CollectBus.Ammeters;
|
||||||
using JiShe.CollectBus.Common.Enums;
|
using JiShe.CollectBus.Common.Enums;
|
||||||
using JiShe.CollectBus.Common.Extensions;
|
using JiShe.CollectBus.Common.Extensions;
|
||||||
using JiShe.CollectBus.Devices;
|
|
||||||
using JiShe.CollectBus.Enums;
|
using JiShe.CollectBus.Enums;
|
||||||
using JiShe.CollectBus.Interceptors;
|
using JiShe.CollectBus.Interceptors;
|
||||||
using JiShe.CollectBus.MessageReceiveds;
|
using JiShe.CollectBus.IotSystems.Devices;
|
||||||
|
using JiShe.CollectBus.IotSystems.MessageReceiveds;
|
||||||
using JiShe.CollectBus.Protocol.Contracts;
|
using JiShe.CollectBus.Protocol.Contracts;
|
||||||
using MassTransit;
|
using MassTransit;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using JiShe.CollectBus.FreeSql;
|
using JiShe.CollectBus.FreeSql;
|
||||||
using JiShe.CollectBus.PrepayModel;
|
using JiShe.CollectBus.IotSystems.PrepayModel;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
|
||||||
namespace JiShe.CollectBus.Samples;
|
namespace JiShe.CollectBus.Samples;
|
||||||
|
|||||||
@ -3,8 +3,8 @@ using System.Threading.Tasks;
|
|||||||
using DotNetCore.CAP;
|
using DotNetCore.CAP;
|
||||||
using JiShe.CollectBus.Common.Enums;
|
using JiShe.CollectBus.Common.Enums;
|
||||||
using JiShe.CollectBus.Common.Models;
|
using JiShe.CollectBus.Common.Models;
|
||||||
using JiShe.CollectBus.Devices;
|
using JiShe.CollectBus.IotSystems.Devices;
|
||||||
using JiShe.CollectBus.MessageReceiveds;
|
using JiShe.CollectBus.IotSystems.MessageReceiveds;
|
||||||
using JiShe.CollectBus.Protocol.Contracts;
|
using JiShe.CollectBus.Protocol.Contracts;
|
||||||
using JiShe.CollectBus.Protocol.Contracts.Interfaces;
|
using JiShe.CollectBus.Protocol.Contracts.Interfaces;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
using DotNetCore.CAP;
|
using FreeRedis;
|
||||||
using FreeRedis;
|
|
||||||
using JiShe.CollectBus.Ammeters;
|
using JiShe.CollectBus.Ammeters;
|
||||||
using JiShe.CollectBus.Common.Consts;
|
using JiShe.CollectBus.Common.Consts;
|
||||||
using JiShe.CollectBus.Common.Helpers;
|
using JiShe.CollectBus.IotSystems.Watermeter;
|
||||||
using JiShe.CollectBus.Watermeter;
|
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@ -21,10 +19,8 @@ namespace JiShe.CollectBus.Workers
|
|||||||
public abstract class BasicScheduledMeterReadingService : CollectBusAppService, IScheduledMeterReadingService
|
public abstract class BasicScheduledMeterReadingService : CollectBusAppService, IScheduledMeterReadingService
|
||||||
{
|
{
|
||||||
private readonly ILogger<BasicScheduledMeterReadingService> _logger;
|
private readonly ILogger<BasicScheduledMeterReadingService> _logger;
|
||||||
private readonly ICapPublisher _capBus;
|
public BasicScheduledMeterReadingService(ILogger<BasicScheduledMeterReadingService> logger)
|
||||||
public BasicScheduledMeterReadingService(ILogger<BasicScheduledMeterReadingService> logger, ICapPublisher capBus)
|
|
||||||
{
|
{
|
||||||
_capBus = capBus;
|
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,21 +90,48 @@ namespace JiShe.CollectBus.Workers
|
|||||||
//获取缓存中的电表信息
|
//获取缓存中的电表信息
|
||||||
var redisKeyList = $"{string.Format(FreeRedisConst.CacheAmmeterInfoKey, SystemTypeConst.Energy, 1)}*";
|
var redisKeyList = $"{string.Format(FreeRedisConst.CacheAmmeterInfoKey, SystemTypeConst.Energy, 1)}*";
|
||||||
var oneMinutekeyList = await FreeRedisProvider.FreeRedis.KeysAsync(redisKeyList);
|
var oneMinutekeyList = await FreeRedisProvider.FreeRedis.KeysAsync(redisKeyList);
|
||||||
if (oneMinutekeyList == null || oneMinutekeyList.Length <= 0)
|
if (oneMinutekeyList == null || oneMinutekeyList.Length <=0)
|
||||||
{
|
{
|
||||||
_logger.LogError($"{nameof(AmmeterScheduledMeterOneMinuteReading)} 1分钟采集电表数据处理时没有获取到缓存信息,-101");
|
_logger.LogError($"{nameof(WatermeterScheduledMeterOneMinuteReading)} 1分钟采集电表数据处理时没有获取到缓存信息,-102");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//通过lua脚本一次性获取所有缓存内容
|
||||||
|
var luaScript = @"
|
||||||
|
local results = {}
|
||||||
|
for i, key in ipairs(KEYS) do
|
||||||
|
local data = redis.call('HGETALL', key)
|
||||||
|
results[i] = {key, data}
|
||||||
|
end
|
||||||
|
return results";
|
||||||
|
var oneMinuteAmmerterResult = FreeRedisProvider.FreeRedis.Eval(luaScript, oneMinutekeyList); // 传递 KEYS
|
||||||
|
if (oneMinuteAmmerterResult == null)
|
||||||
|
{
|
||||||
|
_logger.LogError($"{nameof(WatermeterScheduledMeterOneMinuteReading)} 1分钟采集电表数据处理时没有获取到缓存信息,-102");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 解析结果(结果为嵌套数组)
|
// 解析结果(结果为嵌套数组)
|
||||||
List<AmmeterInfo> meterInfos = await GetMeterCacheData<AmmeterInfo>(oneMinutekeyList);
|
var parsedResults = new Dictionary<string, Dictionary<string, string>>();
|
||||||
if (meterInfos == null || meterInfos.Count <= 0)
|
if (oneMinuteAmmerterResult is object[] arr)
|
||||||
{
|
{
|
||||||
_logger.LogError($"{nameof(AmmeterScheduledMeterOneMinuteReading)} 1分钟采集电表数据处理时没有获取到缓存信息,-102");
|
foreach (object[] item in arr)
|
||||||
return;
|
{
|
||||||
|
string key = (string)item[0];
|
||||||
|
object[] fieldsAndValues = (object[])item[1];
|
||||||
|
|
||||||
|
var dict = new Dictionary<string, string>();
|
||||||
|
for (int i = 0; i < fieldsAndValues.Length; i += 2)
|
||||||
|
{
|
||||||
|
string field = (string)fieldsAndValues[i];
|
||||||
|
string value = (string)fieldsAndValues[i + 1];
|
||||||
|
dict[field] = value;
|
||||||
|
}
|
||||||
|
parsedResults[key] = dict;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_logger.LogInformation($"{nameof(AmmeterScheduledMeterOneMinuteReading)} 1分钟采集电表数据处理完成");
|
_logger.LogInformation($"{nameof(WatermeterScheduledMeterOneMinuteReading)} 1分钟采集电表数据处理完成");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,52 +139,18 @@ namespace JiShe.CollectBus.Workers
|
|||||||
/// 5分钟采集电表数据
|
/// 5分钟采集电表数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public virtual async Task AmmeterScheduledMeterFiveMinuteReading()
|
public virtual Task AmmeterScheduledMeterFiveMinuteReading()
|
||||||
{
|
{
|
||||||
//获取缓存中的电表信息
|
throw new NotImplementedException($"{nameof(AmmeterScheduledMeterFiveMinuteReading)}请根据不同系统类型进行实现");
|
||||||
var redisKeyList = $"{string.Format(FreeRedisConst.CacheAmmeterInfoKey, SystemTypeConst.Energy, 5)}*";
|
|
||||||
var oneMinutekeyList = await FreeRedisProvider.FreeRedis.KeysAsync(redisKeyList);
|
|
||||||
if (oneMinutekeyList == null || oneMinutekeyList.Length <= 0)
|
|
||||||
{
|
|
||||||
_logger.LogError($"{nameof(AmmeterScheduledMeterFiveMinuteReading)} 5分钟采集电表数据处理时没有获取到缓存信息,-101");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 解析结果(结果为嵌套数组)
|
|
||||||
List<AmmeterInfo> meterInfos = await GetMeterCacheData<AmmeterInfo>(oneMinutekeyList);
|
|
||||||
if (meterInfos == null || meterInfos.Count <= 0)
|
|
||||||
{
|
|
||||||
_logger.LogError($"{nameof(AmmeterScheduledMeterFiveMinuteReading)} 5分钟采集电表数据处理时没有获取到缓存信息,-102");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
_logger.LogInformation($"{nameof(AmmeterScheduledMeterFiveMinuteReading)} 5分钟采集电表数据处理完成");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 15分钟采集电表数据
|
/// 15分钟采集电表数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public virtual async Task AmmeterScheduledMeterFifteenMinuteReading()
|
public virtual Task AmmeterScheduledMeterFifteenMinuteReading()
|
||||||
{
|
{
|
||||||
//获取缓存中的电表信息
|
throw new NotImplementedException($"{nameof(AmmeterScheduledMeterFifteenMinuteReading)}请根据不同系统类型进行实现");
|
||||||
var redisKeyList = $"{string.Format(FreeRedisConst.CacheAmmeterInfoKey, SystemTypeConst.Energy, 15)}*";
|
|
||||||
var oneMinutekeyList = await FreeRedisProvider.FreeRedis.KeysAsync(redisKeyList);
|
|
||||||
if (oneMinutekeyList == null || oneMinutekeyList.Length <= 0)
|
|
||||||
{
|
|
||||||
_logger.LogError($"{nameof(AmmeterScheduledMeterFifteenMinuteReading)} 15分钟采集电表数据处理时没有获取到缓存信息,-101");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 解析结果(结果为嵌套数组)
|
|
||||||
List<AmmeterInfo> meterInfos = await GetMeterCacheData<AmmeterInfo>(oneMinutekeyList);
|
|
||||||
if (meterInfos == null || meterInfos.Count <= 0)
|
|
||||||
{
|
|
||||||
_logger.LogError($"{nameof(AmmeterScheduledMeterFifteenMinuteReading)} 15分钟采集电表数据处理时没有获取到缓存信息,-102");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
_logger.LogInformation($"{nameof(AmmeterScheduledMeterFifteenMinuteReading)} 15分钟采集电表数据处理完成");
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -222,22 +211,9 @@ namespace JiShe.CollectBus.Workers
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public virtual async Task WatermeterScheduledMeterOneMinuteReading()
|
public virtual async Task WatermeterScheduledMeterOneMinuteReading()
|
||||||
{
|
{
|
||||||
//获取缓存中的水表信息
|
//获取缓存中的电表信息
|
||||||
var redisKeyList = $"{string.Format(FreeRedisConst.CacheWatermeterInfoKey, SystemTypeConst.Energy, 1)}*";
|
var redisKeyList = $"{string.Format(FreeRedisConst.CacheAmmeterInfoKey, SystemTypeConst.Energy, 1)}*";
|
||||||
var oneMinutekeyList = await FreeRedisProvider.FreeRedis.KeysAsync(redisKeyList);
|
var oneMinuteList = await FreeRedisProvider.FreeRedis.KeysAsync(redisKeyList);
|
||||||
if (oneMinutekeyList == null || oneMinutekeyList.Length <= 0)
|
|
||||||
{
|
|
||||||
_logger.LogError($"{nameof(WatermeterScheduledMeterOneMinuteReading)} 1分钟采集水表据处理时没有获取到缓存信息,-101");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 解析结果(结果为嵌套数组)
|
|
||||||
List<WatermeterInfo> meterInfos = await GetMeterCacheData<WatermeterInfo>(oneMinutekeyList);
|
|
||||||
if (meterInfos == null || meterInfos.Count <= 0)
|
|
||||||
{
|
|
||||||
_logger.LogError($"{nameof(WatermeterScheduledMeterOneMinuteReading)} 1分钟采集水表数据处理时没有获取到缓存信息,-102");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
_logger.LogInformation($"{nameof(WatermeterScheduledMeterOneMinuteReading)} 1分钟采集水表数据处理完成");
|
_logger.LogInformation($"{nameof(WatermeterScheduledMeterOneMinuteReading)} 1分钟采集水表数据处理完成");
|
||||||
}
|
}
|
||||||
@ -246,113 +222,21 @@ namespace JiShe.CollectBus.Workers
|
|||||||
/// 5分钟采集电表数据
|
/// 5分钟采集电表数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public virtual async Task WatermeterScheduledMeterFiveMinuteReading()
|
public virtual Task WatermeterScheduledMeterFiveMinuteReading()
|
||||||
{
|
{
|
||||||
|
|
||||||
//获取缓存中的水表信息
|
throw new NotImplementedException($"{nameof(WatermeterScheduledMeterFiveMinuteReading)}请根据不同系统类型进行实现");
|
||||||
var redisKeyList = $"{string.Format(FreeRedisConst.CacheWatermeterInfoKey, SystemTypeConst.Energy, 5)}*";
|
|
||||||
var oneMinutekeyList = await FreeRedisProvider.FreeRedis.KeysAsync(redisKeyList);
|
|
||||||
if (oneMinutekeyList == null || oneMinutekeyList.Length <= 0)
|
|
||||||
{
|
|
||||||
_logger.LogError($"{nameof(WatermeterScheduledMeterFiveMinuteReading)} 5分钟采集水表据处理时没有获取到缓存信息,-101");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 解析结果(结果为嵌套数组)
|
|
||||||
List<WatermeterInfo> meterInfos = await GetMeterCacheData<WatermeterInfo>(oneMinutekeyList);
|
|
||||||
if (meterInfos == null || meterInfos.Count <= 0)
|
|
||||||
{
|
|
||||||
_logger.LogError($"{nameof(WatermeterScheduledMeterFiveMinuteReading)} 5分钟采集水表数据处理时没有获取到缓存信息,-102");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
_logger.LogInformation($"{nameof(WatermeterScheduledMeterFiveMinuteReading)} 5分钟采集水表数据处理完成");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 15分钟采集电表数据
|
/// 15分钟采集电表数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public virtual async Task WatermeterScheduledMeterFifteenMinuteReading()
|
public virtual Task WatermeterScheduledMeterFifteenMinuteReading()
|
||||||
{
|
{
|
||||||
//获取缓存中的水表信息
|
throw new NotImplementedException($"{nameof(WatermeterScheduledMeterFifteenMinuteReading)}请根据不同系统类型进行实现");
|
||||||
var redisKeyList = $"{string.Format(FreeRedisConst.CacheWatermeterInfoKey, SystemTypeConst.Energy, 15)}*";
|
|
||||||
var oneMinutekeyList = await FreeRedisProvider.FreeRedis.KeysAsync(redisKeyList);
|
|
||||||
if (oneMinutekeyList == null || oneMinutekeyList.Length <= 0)
|
|
||||||
{
|
|
||||||
_logger.LogError($"{nameof(WatermeterScheduledMeterFifteenMinuteReading)} 15分钟采集水表据处理时没有获取到缓存信息,-101");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 解析结果(结果为嵌套数组)
|
|
||||||
List<WatermeterInfo> meterInfos = await GetMeterCacheData<WatermeterInfo>(oneMinutekeyList);
|
|
||||||
if (meterInfos == null || meterInfos.Count <= 0)
|
|
||||||
{
|
|
||||||
_logger.LogError($"{nameof(WatermeterScheduledMeterFifteenMinuteReading)} 15分钟采集水表数据处理时没有获取到缓存信息,-102");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
_logger.LogInformation($"{nameof(WatermeterScheduledMeterFifteenMinuteReading)} 15分钟采集水表数据处理完成");
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
#region 公共处理方法
|
|
||||||
/// <summary>
|
|
||||||
/// 批量获取缓存的表计信息
|
|
||||||
/// </summary>
|
|
||||||
/// <typeparam name="T"></typeparam>
|
|
||||||
/// <param name="redisKeys"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
private async Task<List<T>> GetMeterCacheData<T>(string[] redisKeys)
|
|
||||||
{
|
|
||||||
//通过lua脚本一次性获取所有缓存内容
|
|
||||||
var luaScript = @"
|
|
||||||
local results = {}
|
|
||||||
for i, key in ipairs(KEYS) do
|
|
||||||
local data = redis.call('HGETALL', key)
|
|
||||||
results[i] = {key, data}
|
|
||||||
end
|
|
||||||
return results";
|
|
||||||
var oneMinuteAmmerterResult = await FreeRedisProvider.FreeRedis.EvalAsync(luaScript, redisKeys); //传递 KEYS
|
|
||||||
if (oneMinuteAmmerterResult == null)
|
|
||||||
{
|
|
||||||
_logger.LogError($"{nameof(WatermeterScheduledMeterOneMinuteReading)} 1分钟采集电表数据处理时没有获取到缓存信息,-102");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 解析结果(结果为嵌套数组)
|
|
||||||
List<T> meterInfos = new List<T>();
|
|
||||||
if (oneMinuteAmmerterResult is object[] arr)
|
|
||||||
{
|
|
||||||
foreach (object[] item in arr)
|
|
||||||
{
|
|
||||||
string key = (string)item[0];
|
|
||||||
object[] fieldsAndValues = (object[])item[1];
|
|
||||||
|
|
||||||
for (int i = 0; i < fieldsAndValues.Length; i += 2)
|
|
||||||
{
|
|
||||||
string field = (string)fieldsAndValues[i];
|
|
||||||
string valueStr = (string)fieldsAndValues[i + 1];
|
|
||||||
T value = default;
|
|
||||||
if (!string.IsNullOrWhiteSpace(valueStr))
|
|
||||||
{
|
|
||||||
value = valueStr.Deserialize<T>()!;
|
|
||||||
}
|
|
||||||
if (value != null)
|
|
||||||
{
|
|
||||||
meterInfos.Add(value);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_logger.LogInformation($"{nameof(WatermeterScheduledMeterOneMinuteReading)} 1分钟采集电表{key}数据{field}处理异常");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return meterInfos;
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,10 +2,9 @@
|
|||||||
using FreeRedis;
|
using FreeRedis;
|
||||||
using JiShe.CollectBus.Ammeters;
|
using JiShe.CollectBus.Ammeters;
|
||||||
using JiShe.CollectBus.Common.Consts;
|
using JiShe.CollectBus.Common.Consts;
|
||||||
using JiShe.CollectBus.Devices;
|
|
||||||
using JiShe.CollectBus.FreeRedisProvider;
|
using JiShe.CollectBus.FreeRedisProvider;
|
||||||
using JiShe.CollectBus.FreeSql;
|
using JiShe.CollectBus.FreeSql;
|
||||||
using JiShe.CollectBus.Watermeter;
|
using JiShe.CollectBus.IotSystems.Watermeter;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|||||||
@ -4,7 +4,7 @@ using DeviceDetectorNET.Parser.Device;
|
|||||||
using DotNetCore.CAP;
|
using DotNetCore.CAP;
|
||||||
using JiShe.CollectBus.Common.Enums;
|
using JiShe.CollectBus.Common.Enums;
|
||||||
using JiShe.CollectBus.Common.Models;
|
using JiShe.CollectBus.Common.Models;
|
||||||
using JiShe.CollectBus.Devices;
|
using JiShe.CollectBus.IotSystems.Devices;
|
||||||
using JiShe.CollectBus.MessageReceiveds;
|
using JiShe.CollectBus.MessageReceiveds;
|
||||||
using JiShe.CollectBus.Protocol.Contracts;
|
using JiShe.CollectBus.Protocol.Contracts;
|
||||||
using JiShe.CollectBus.Protocol.Contracts.Interfaces;
|
using JiShe.CollectBus.Protocol.Contracts.Interfaces;
|
||||||
|
|||||||
@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace JiShe.CollectBus.EnergySystems.TableViews
|
||||||
|
{
|
||||||
|
public class V_FocusAmmeter
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
|||||||
using JiShe.CollectBus.Enums;
|
using JiShe.CollectBus.Enums;
|
||||||
using Volo.Abp.Domain.Entities;
|
using Volo.Abp.Domain.Entities;
|
||||||
|
|
||||||
namespace JiShe.CollectBus.Devices
|
namespace JiShe.CollectBus.IotSystems.Devices
|
||||||
{
|
{
|
||||||
public class Device : AggregateRoot<Guid>
|
public class Device : AggregateRoot<Guid>
|
||||||
{
|
{
|
||||||
@ -5,7 +5,7 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using JiShe.CollectBus.Common.Enums;
|
using JiShe.CollectBus.Common.Enums;
|
||||||
|
|
||||||
namespace JiShe.CollectBus.MessageIssueds
|
namespace JiShe.CollectBus.IotSystems.MessageIssueds
|
||||||
{
|
{
|
||||||
public class MessageIssued
|
public class MessageIssued
|
||||||
{
|
{
|
||||||
@ -1,4 +1,4 @@
|
|||||||
namespace JiShe.CollectBus.MessageReceiveds
|
namespace JiShe.CollectBus.IotSystems.MessageReceiveds
|
||||||
{
|
{
|
||||||
public interface IReceived
|
public interface IReceived
|
||||||
{
|
{
|
||||||
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using Volo.Abp.Domain.Entities;
|
using Volo.Abp.Domain.Entities;
|
||||||
|
|
||||||
namespace JiShe.CollectBus.MessageReceiveds
|
namespace JiShe.CollectBus.IotSystems.MessageReceiveds
|
||||||
{
|
{
|
||||||
public class MessageReceived: AggregateRoot<Guid>,IReceived
|
public class MessageReceived: AggregateRoot<Guid>,IReceived
|
||||||
{
|
{
|
||||||
@ -0,0 +1,129 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace JiShe.CollectBus.IotSystems.PrepayModel
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 预付费电表视图模型
|
||||||
|
/// </summary>
|
||||||
|
public partial class Vi_BaseAmmeterInfo
|
||||||
|
{
|
||||||
|
public int ID { get; set; }
|
||||||
|
public string BarCode { get; set; }
|
||||||
|
public string Address { get; set; }
|
||||||
|
public string BaudRate { get; set; }
|
||||||
|
public string Password { get; set; }
|
||||||
|
public string Explan { get; set; }
|
||||||
|
public DateTime AddTime { get; set; }
|
||||||
|
public bool State { get; set; }
|
||||||
|
public int TB_EquipmentTypeID { get; set; }
|
||||||
|
public int BaseID { get; set; }
|
||||||
|
public string Code { get; set; }
|
||||||
|
public int? MeterCode { get; set; }
|
||||||
|
public int? PortNumber { get; set; }
|
||||||
|
public int CT { get; set; }
|
||||||
|
public bool SoftTripsLock { get; set; }
|
||||||
|
public bool HardwareTripsLock { get; set; }
|
||||||
|
public bool ValveState { get; set; }
|
||||||
|
public bool ArchivesState { get; set; }
|
||||||
|
public int? SortNumber { get; set; }
|
||||||
|
public decimal Balance { get; set; }
|
||||||
|
public bool IsAlarm { get; set; }
|
||||||
|
public string sysExplan { get; set; }
|
||||||
|
public DateTime sysAddTime { get; set; }
|
||||||
|
public bool sysState { get; set; }
|
||||||
|
public int? TB_sysConcentratorID { get; set; }
|
||||||
|
public int? TB_sysChargingSchemeID { get; set; }
|
||||||
|
public int? TB_sysChargingSchemeID1 { get; set; }
|
||||||
|
public int TB_CustomerID { get; set; }
|
||||||
|
public int? TB_sysAlarmPlanID { get; set; }
|
||||||
|
public int? TB_sysCollectorID { get; set; }
|
||||||
|
public int? TB_sysRoomID { get; set; }
|
||||||
|
public string SpecialNoCode { get; set; }
|
||||||
|
public decimal? RatedCurrent { get; set; }
|
||||||
|
public int? TripDelayTime { get; set; }
|
||||||
|
public int? ClosingTime { get; set; }
|
||||||
|
public int? Remainder { get; set; }
|
||||||
|
public decimal? RatedPower { get; set; }
|
||||||
|
public bool? ParentAmmState { get; set; }
|
||||||
|
public int? ParentAmmID { get; set; }
|
||||||
|
public DateTime? LastUpdateTime { get; set; }
|
||||||
|
public bool? IsAuthentication { get; set; }
|
||||||
|
public bool? IsShowBalance { get; set; }
|
||||||
|
public string Number { get; set; }
|
||||||
|
public DateTime? LastAuthTime { get; set; }
|
||||||
|
public bool? IsAuthenticationFunction { get; set; }
|
||||||
|
public bool? IsShowBalanceFunction { get; set; }
|
||||||
|
public int TB_ProtocolID { get; set; }
|
||||||
|
public string Operator { get; set; }
|
||||||
|
public bool? IsTimingPowerSetting { get; set; }
|
||||||
|
public string CommSchemeCode { get; set; }
|
||||||
|
public string RoomAllName { get; set; }
|
||||||
|
public bool? IsLadderPrice { get; set; }
|
||||||
|
public int? LadderNum { get; set; }
|
||||||
|
public decimal? RoomBalance { get; set; }
|
||||||
|
public decimal? OtherBalance { get; set; }
|
||||||
|
public int? LastValveEventType { get; set; }
|
||||||
|
public decimal? ReadKwh4 { get; set; }
|
||||||
|
public decimal? ReadKwh3 { get; set; }
|
||||||
|
public decimal? ReadKwh2 { get; set; }
|
||||||
|
public decimal? ReadKwh1 { get; set; }
|
||||||
|
public decimal? ReadKwh { get; set; }
|
||||||
|
public DateTime? LastEventTime { get; set; }
|
||||||
|
public DateTime? LastReadTime { get; set; }
|
||||||
|
public string RoomNumber { get; set; }
|
||||||
|
public string EquipmentName { get; set; }
|
||||||
|
public int? EquipmentId { get; set; }
|
||||||
|
public bool? IsMalignantLoad { get; set; }
|
||||||
|
public string BrandName { get; set; }
|
||||||
|
public decimal? MalignantPower { get; set; }
|
||||||
|
public bool? MalignantPowerState { get; set; }
|
||||||
|
public bool? RatedPowerState { get; set; }
|
||||||
|
public string SolveStatus { get; set; }
|
||||||
|
public int? PowerDownStatus { get; set; }
|
||||||
|
public DateTime? SolveStatusTime { get; set; }
|
||||||
|
public decimal DisableKwh { get; set; }
|
||||||
|
public int? IsDeliver { get; set; }
|
||||||
|
public int? HandleUser { get; set; }
|
||||||
|
public string HandleUserName { get; set; }
|
||||||
|
public string Solutions { get; set; }
|
||||||
|
public decimal DisableKwh1 { get; set; }
|
||||||
|
public decimal DisableKwh2 { get; set; }
|
||||||
|
public decimal DisableKwh3 { get; set; }
|
||||||
|
public decimal DisableKwh4 { get; set; }
|
||||||
|
public bool DelaySwitchOff { get; set; }
|
||||||
|
public string MeterSolveStatus { get; set; }
|
||||||
|
public DateTime? DeliverTime { get; set; }
|
||||||
|
public bool EnableState { get; set; }
|
||||||
|
public string DxNbiotDeviceId { get; set; }
|
||||||
|
public int MeterStatus { get; set; }
|
||||||
|
public string AllowTripTime { get; set; }
|
||||||
|
public int? LastCostMilliSecond { get; set; }
|
||||||
|
public string DxNbiotIMEI { get; set; }
|
||||||
|
public decimal? ReadKwh5 { get; set; }
|
||||||
|
public decimal? ReadKwh6 { get; set; }
|
||||||
|
public decimal? ReadKwh7 { get; set; }
|
||||||
|
public decimal? ReadKwh8 { get; set; }
|
||||||
|
public decimal? DisableKwh5 { get; set; }
|
||||||
|
public decimal? DisableKwh6 { get; set; }
|
||||||
|
public decimal? DisableKwh7 { get; set; }
|
||||||
|
public decimal? DisableKwh8 { get; set; }
|
||||||
|
public bool? IsLadder { get; set; }
|
||||||
|
public int? TimeSpanSetNum { get; set; }
|
||||||
|
public string ExecutePeriod { get; set; }
|
||||||
|
public string FreqInterval { get; set; }
|
||||||
|
public int? Tb_sysUseValueAlarmID { get; set; }
|
||||||
|
public bool? IsMaxDemandKwh { get; set; }
|
||||||
|
public DateTime? OnLineTime { get; set; }
|
||||||
|
public int? OperatorId { get; set; }
|
||||||
|
public int PowerCT { get; set; }
|
||||||
|
public string CommunicationsModule { get; set; }
|
||||||
|
public bool? CanBlueTooth { get; set; }
|
||||||
|
public bool? CanRemote { get; set; }
|
||||||
|
public bool? IsDownPrice { get; set; }
|
||||||
|
public int? BuyCount { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -2,7 +2,7 @@
|
|||||||
using JiShe.CollectBus.Interfaces;
|
using JiShe.CollectBus.Interfaces;
|
||||||
using Volo.Abp.Domain.Entities;
|
using Volo.Abp.Domain.Entities;
|
||||||
|
|
||||||
namespace JiShe.CollectBus.Protocols
|
namespace JiShe.CollectBus.IotSystems.Protocols
|
||||||
{
|
{
|
||||||
public class ProtocolInfo : AggregateRoot<Guid>, IProtocolInfo
|
public class ProtocolInfo : AggregateRoot<Guid>, IProtocolInfo
|
||||||
{
|
{
|
||||||
@ -5,7 +5,7 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Volo.Abp.Domain.Entities;
|
using Volo.Abp.Domain.Entities;
|
||||||
|
|
||||||
namespace JiShe.CollectBus.Records
|
namespace JiShe.CollectBus.IotSystems.Records
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 集中器在线记录
|
/// 集中器在线记录
|
||||||
@ -5,7 +5,7 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Volo.Abp.Domain.Entities;
|
using Volo.Abp.Domain.Entities;
|
||||||
|
|
||||||
namespace JiShe.CollectBus.Records
|
namespace JiShe.CollectBus.IotSystems.Records
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 信号强度
|
/// 信号强度
|
||||||
@ -6,7 +6,7 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Volo.Abp.Domain.Entities;
|
using Volo.Abp.Domain.Entities;
|
||||||
|
|
||||||
namespace JiShe.CollectBus.Records
|
namespace JiShe.CollectBus.IotSystems.Records
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 集中器上下线、心跳记录
|
/// 集中器上下线、心跳记录
|
||||||
@ -5,7 +5,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace JiShe.CollectBus.Watermeter
|
namespace JiShe.CollectBus.IotSystems.Watermeter
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 水表信息
|
/// 水表信息
|
||||||
@ -8,6 +8,12 @@
|
|||||||
<RootNamespace>JiShe.CollectBus</RootNamespace>
|
<RootNamespace>JiShe.CollectBus</RootNamespace>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Remove="PrepaymentSystems\新文件夹\**" />
|
||||||
|
<EmbeddedResource Remove="PrepaymentSystems\新文件夹\**" />
|
||||||
|
<None Remove="PrepaymentSystems\新文件夹\**" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Remove="FodyWeavers.xml" />
|
<None Remove="FodyWeavers.xml" />
|
||||||
<None Remove="FodyWeavers.xsd" />
|
<None Remove="FodyWeavers.xsd" />
|
||||||
@ -27,7 +33,9 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Loggers\" />
|
<Folder Include="EnergySystems\Entitys\" />
|
||||||
|
<Folder Include="PrepaymentSystems\Entitys\" />
|
||||||
|
<Folder Include="PrepaymentSystems\TableViews\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@ -1,129 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace JiShe.CollectBus.PrepayModel
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 预付费电表视图模型
|
|
||||||
/// </summary>
|
|
||||||
public partial class Vi_BaseAmmeterInfo
|
|
||||||
{
|
|
||||||
public int ID { get; set; }
|
|
||||||
public string BarCode { get; set; }
|
|
||||||
public string Address { get; set; }
|
|
||||||
public string BaudRate { get; set; }
|
|
||||||
public string Password { get; set; }
|
|
||||||
public string Explan { get; set; }
|
|
||||||
public System.DateTime AddTime { get; set; }
|
|
||||||
public bool State { get; set; }
|
|
||||||
public int TB_EquipmentTypeID { get; set; }
|
|
||||||
public int BaseID { get; set; }
|
|
||||||
public string Code { get; set; }
|
|
||||||
public Nullable<int> MeterCode { get; set; }
|
|
||||||
public Nullable<int> PortNumber { get; set; }
|
|
||||||
public int CT { get; set; }
|
|
||||||
public bool SoftTripsLock { get; set; }
|
|
||||||
public bool HardwareTripsLock { get; set; }
|
|
||||||
public bool ValveState { get; set; }
|
|
||||||
public bool ArchivesState { get; set; }
|
|
||||||
public Nullable<int> SortNumber { get; set; }
|
|
||||||
public decimal Balance { get; set; }
|
|
||||||
public bool IsAlarm { get; set; }
|
|
||||||
public string sysExplan { get; set; }
|
|
||||||
public System.DateTime sysAddTime { get; set; }
|
|
||||||
public bool sysState { get; set; }
|
|
||||||
public Nullable<int> TB_sysConcentratorID { get; set; }
|
|
||||||
public Nullable<int> TB_sysChargingSchemeID { get; set; }
|
|
||||||
public Nullable<int> TB_sysChargingSchemeID1 { get; set; }
|
|
||||||
public int TB_CustomerID { get; set; }
|
|
||||||
public Nullable<int> TB_sysAlarmPlanID { get; set; }
|
|
||||||
public Nullable<int> TB_sysCollectorID { get; set; }
|
|
||||||
public Nullable<int> TB_sysRoomID { get; set; }
|
|
||||||
public string SpecialNoCode { get; set; }
|
|
||||||
public Nullable<decimal> RatedCurrent { get; set; }
|
|
||||||
public Nullable<int> TripDelayTime { get; set; }
|
|
||||||
public Nullable<int> ClosingTime { get; set; }
|
|
||||||
public Nullable<int> Remainder { get; set; }
|
|
||||||
public Nullable<decimal> RatedPower { get; set; }
|
|
||||||
public Nullable<bool> ParentAmmState { get; set; }
|
|
||||||
public Nullable<int> ParentAmmID { get; set; }
|
|
||||||
public Nullable<System.DateTime> LastUpdateTime { get; set; }
|
|
||||||
public Nullable<bool> IsAuthentication { get; set; }
|
|
||||||
public Nullable<bool> IsShowBalance { get; set; }
|
|
||||||
public string Number { get; set; }
|
|
||||||
public Nullable<System.DateTime> LastAuthTime { get; set; }
|
|
||||||
public Nullable<bool> IsAuthenticationFunction { get; set; }
|
|
||||||
public Nullable<bool> IsShowBalanceFunction { get; set; }
|
|
||||||
public int TB_ProtocolID { get; set; }
|
|
||||||
public string Operator { get; set; }
|
|
||||||
public Nullable<bool> IsTimingPowerSetting { get; set; }
|
|
||||||
public string CommSchemeCode { get; set; }
|
|
||||||
public string RoomAllName { get; set; }
|
|
||||||
public Nullable<bool> IsLadderPrice { get; set; }
|
|
||||||
public Nullable<int> LadderNum { get; set; }
|
|
||||||
public Nullable<decimal> RoomBalance { get; set; }
|
|
||||||
public Nullable<decimal> OtherBalance { get; set; }
|
|
||||||
public Nullable<int> LastValveEventType { get; set; }
|
|
||||||
public Nullable<decimal> ReadKwh4 { get; set; }
|
|
||||||
public Nullable<decimal> ReadKwh3 { get; set; }
|
|
||||||
public Nullable<decimal> ReadKwh2 { get; set; }
|
|
||||||
public Nullable<decimal> ReadKwh1 { get; set; }
|
|
||||||
public Nullable<decimal> ReadKwh { get; set; }
|
|
||||||
public Nullable<System.DateTime> LastEventTime { get; set; }
|
|
||||||
public Nullable<System.DateTime> LastReadTime { get; set; }
|
|
||||||
public string RoomNumber { get; set; }
|
|
||||||
public string EquipmentName { get; set; }
|
|
||||||
public Nullable<int> EquipmentId { get; set; }
|
|
||||||
public Nullable<bool> IsMalignantLoad { get; set; }
|
|
||||||
public string BrandName { get; set; }
|
|
||||||
public Nullable<decimal> MalignantPower { get; set; }
|
|
||||||
public Nullable<bool> MalignantPowerState { get; set; }
|
|
||||||
public Nullable<bool> RatedPowerState { get; set; }
|
|
||||||
public string SolveStatus { get; set; }
|
|
||||||
public Nullable<int> PowerDownStatus { get; set; }
|
|
||||||
public Nullable<System.DateTime> SolveStatusTime { get; set; }
|
|
||||||
public decimal DisableKwh { get; set; }
|
|
||||||
public Nullable<int> IsDeliver { get; set; }
|
|
||||||
public Nullable<int> HandleUser { get; set; }
|
|
||||||
public string HandleUserName { get; set; }
|
|
||||||
public string Solutions { get; set; }
|
|
||||||
public decimal DisableKwh1 { get; set; }
|
|
||||||
public decimal DisableKwh2 { get; set; }
|
|
||||||
public decimal DisableKwh3 { get; set; }
|
|
||||||
public decimal DisableKwh4 { get; set; }
|
|
||||||
public bool DelaySwitchOff { get; set; }
|
|
||||||
public string MeterSolveStatus { get; set; }
|
|
||||||
public Nullable<System.DateTime> DeliverTime { get; set; }
|
|
||||||
public bool EnableState { get; set; }
|
|
||||||
public string DxNbiotDeviceId { get; set; }
|
|
||||||
public int MeterStatus { get; set; }
|
|
||||||
public string AllowTripTime { get; set; }
|
|
||||||
public Nullable<int> LastCostMilliSecond { get; set; }
|
|
||||||
public string DxNbiotIMEI { get; set; }
|
|
||||||
public Nullable<decimal> ReadKwh5 { get; set; }
|
|
||||||
public Nullable<decimal> ReadKwh6 { get; set; }
|
|
||||||
public Nullable<decimal> ReadKwh7 { get; set; }
|
|
||||||
public Nullable<decimal> ReadKwh8 { get; set; }
|
|
||||||
public Nullable<decimal> DisableKwh5 { get; set; }
|
|
||||||
public Nullable<decimal> DisableKwh6 { get; set; }
|
|
||||||
public Nullable<decimal> DisableKwh7 { get; set; }
|
|
||||||
public Nullable<decimal> DisableKwh8 { get; set; }
|
|
||||||
public Nullable<bool> IsLadder { get; set; }
|
|
||||||
public Nullable<int> TimeSpanSetNum { get; set; }
|
|
||||||
public string ExecutePeriod { get; set; }
|
|
||||||
public string FreqInterval { get; set; }
|
|
||||||
public Nullable<int> Tb_sysUseValueAlarmID { get; set; }
|
|
||||||
public Nullable<bool> IsMaxDemandKwh { get; set; }
|
|
||||||
public Nullable<System.DateTime> OnLineTime { get; set; }
|
|
||||||
public Nullable<int> OperatorId { get; set; }
|
|
||||||
public int PowerCT { get; set; }
|
|
||||||
public string CommunicationsModule { get; set; }
|
|
||||||
public Nullable<bool> CanBlueTooth { get; set; }
|
|
||||||
public Nullable<bool> CanRemote { get; set; }
|
|
||||||
public Nullable<bool> IsDownPrice { get; set; }
|
|
||||||
public Nullable<int> BuyCount { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -18,8 +18,8 @@ using TouchSocket.Core;
|
|||||||
using TouchSocket.Sockets;
|
using TouchSocket.Sockets;
|
||||||
using JiShe.CollectBus.Plugins;
|
using JiShe.CollectBus.Plugins;
|
||||||
using JiShe.CollectBus.Consumers;
|
using JiShe.CollectBus.Consumers;
|
||||||
using JiShe.CollectBus.MessageReceiveds;
|
|
||||||
using JiShe.CollectBus.Protocol.Contracts;
|
using JiShe.CollectBus.Protocol.Contracts;
|
||||||
|
using JiShe.CollectBus.IotSystems.MessageReceiveds;
|
||||||
|
|
||||||
|
|
||||||
namespace JiShe.CollectBus.Host
|
namespace JiShe.CollectBus.Host
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
using JiShe.CollectBus.Devices;
|
using JiShe.CollectBus.IotSystems.Devices;
|
||||||
using JiShe.CollectBus.MessageReceiveds;
|
using JiShe.CollectBus.IotSystems.MessageReceiveds;
|
||||||
using JiShe.CollectBus.Protocols;
|
using JiShe.CollectBus.IotSystems.Protocols;
|
||||||
using MongoDB.Driver;
|
using MongoDB.Driver;
|
||||||
using Volo.Abp.Data;
|
using Volo.Abp.Data;
|
||||||
using Volo.Abp.MongoDB;
|
using Volo.Abp.MongoDB;
|
||||||
|
|||||||
@ -3,15 +3,15 @@ using DotNetCore.CAP;
|
|||||||
using JiShe.CollectBus.Common.Enums;
|
using JiShe.CollectBus.Common.Enums;
|
||||||
using JiShe.CollectBus.Common.Extensions;
|
using JiShe.CollectBus.Common.Extensions;
|
||||||
using JiShe.CollectBus.Common.Models;
|
using JiShe.CollectBus.Common.Models;
|
||||||
using JiShe.CollectBus.MessageReceiveds;
|
|
||||||
using JiShe.CollectBus.Protocol.Contracts.Interfaces;
|
using JiShe.CollectBus.Protocol.Contracts.Interfaces;
|
||||||
using JiShe.CollectBus.Protocols;
|
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using JiShe.CollectBus.Protocol.Contracts.Models;
|
using JiShe.CollectBus.Protocol.Contracts.Models;
|
||||||
using Volo.Abp.Domain.Repositories;
|
using Volo.Abp.Domain.Repositories;
|
||||||
using JiShe.CollectBus.Common.BuildSendDatas;
|
using JiShe.CollectBus.Common.BuildSendDatas;
|
||||||
using JiShe.CollectBus.Protocol.Contracts.AnalysisData;
|
using JiShe.CollectBus.Protocol.Contracts.AnalysisData;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using JiShe.CollectBus.IotSystems.MessageReceiveds;
|
||||||
|
using JiShe.CollectBus.IotSystems.Protocols;
|
||||||
|
|
||||||
namespace JiShe.CollectBus.Protocol.Contracts.Abstracts
|
namespace JiShe.CollectBus.Protocol.Contracts.Abstracts
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using JiShe.CollectBus.Common.Models;
|
using JiShe.CollectBus.Common.Models;
|
||||||
using JiShe.CollectBus.MessageReceiveds;
|
using JiShe.CollectBus.IotSystems.MessageReceiveds;
|
||||||
|
using JiShe.CollectBus.IotSystems.Protocols;
|
||||||
using JiShe.CollectBus.Protocol.Contracts.Models;
|
using JiShe.CollectBus.Protocol.Contracts.Models;
|
||||||
using JiShe.CollectBus.Protocols;
|
|
||||||
using TouchSocket.Sockets;
|
using TouchSocket.Sockets;
|
||||||
|
|
||||||
namespace JiShe.CollectBus.Protocol.Contracts.Interfaces
|
namespace JiShe.CollectBus.Protocol.Contracts.Interfaces
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
using JiShe.CollectBus.Common.Enums;
|
using JiShe.CollectBus.Common.Enums;
|
||||||
using JiShe.CollectBus.Common.Extensions;
|
using JiShe.CollectBus.Common.Extensions;
|
||||||
using JiShe.CollectBus.Common.Models;
|
using JiShe.CollectBus.Common.Models;
|
||||||
using JiShe.CollectBus.MessageReceiveds;
|
using JiShe.CollectBus.IotSystems.MessageReceiveds;
|
||||||
|
using JiShe.CollectBus.IotSystems.Protocols;
|
||||||
using JiShe.CollectBus.Protocol.Contracts.Abstracts;
|
using JiShe.CollectBus.Protocol.Contracts.Abstracts;
|
||||||
using JiShe.CollectBus.Protocol.Contracts.Models;
|
using JiShe.CollectBus.Protocol.Contracts.Models;
|
||||||
using JiShe.CollectBus.Protocols;
|
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
namespace JiShe.CollectBus.Protocol
|
namespace JiShe.CollectBus.Protocol
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user