Merge branch 'dev' of https://310.jisheyun.com/daizan/JiShe.CollectBus into dev
This commit is contained in:
commit
13fd36c647
@ -1,4 +1,7 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using Apache.IoTDB;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Protocol.Contracts.Protocol.Dto;
|
||||
using JiShe.CollectBus.Protocol.Dto;
|
||||
@ -31,7 +34,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_00H
|
||||
var data = new AnalysisBaseDto<bool?>()
|
||||
{
|
||||
FiledDesc = "全部确认",
|
||||
DataValue = true
|
||||
DataValue = true,
|
||||
ItemType= $"{input.AFN_FC.AFN.HexToDecStr().PadLeft(2, '0')}_{input.DT.Fn}"
|
||||
};
|
||||
// 查询电表信息
|
||||
AmmeterInfo ammeterInfo = await _dataStorage.GetMeterInfoAsync(MeterTypeEnum.Focus.ToString(), "15");
|
||||
@ -42,6 +46,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_00H
|
||||
data.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = ammeterInfo.Address;
|
||||
data.DeviceType = MeterTypeEnum.Focus;
|
||||
data.FocusId= ammeterInfo.FocusId;
|
||||
}
|
||||
UnitDataAnalysis<AnalysisBaseDto<bool?>> dto = new UnitDataAnalysis<AnalysisBaseDto<bool?>>
|
||||
{
|
||||
@ -54,7 +59,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_00H
|
||||
MessageId = input.MessageId,
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DensityUnit = DensityUnit.None,
|
||||
TimeDensity = -1
|
||||
TimeDensity = -1,
|
||||
DataType= IOTDBDataTypeConst.Log
|
||||
};
|
||||
result?.Invoke(dto);
|
||||
await _dataStorage.SaveDataToIotDbAsync<bool?>(dto);
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Protocol.Contracts.Protocol.Dto;
|
||||
using JiShe.CollectBus.Protocol.Dto;
|
||||
@ -29,7 +31,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_00H
|
||||
var data = new AnalysisBaseDto<bool?>()
|
||||
{
|
||||
FiledDesc = "全部否认",
|
||||
DataValue = false
|
||||
DataValue = false,
|
||||
ItemType = $"{input.AFN_FC.AFN.HexToDecStr().PadLeft(2, '0')}_{input.DT.Fn}"
|
||||
};
|
||||
// 查询电表信息
|
||||
AmmeterInfo ammeterInfo = await _dataStorage.GetMeterInfoAsync(MeterTypeEnum.Focus.ToString(), "15");
|
||||
@ -40,6 +43,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_00H
|
||||
data.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = ammeterInfo.Address;
|
||||
data.DeviceType = MeterTypeEnum.Focus;
|
||||
data.FocusId = ammeterInfo.FocusId;
|
||||
}
|
||||
UnitDataAnalysis<AnalysisBaseDto<bool?>> dto = new UnitDataAnalysis<AnalysisBaseDto<bool?>>
|
||||
{
|
||||
@ -52,7 +56,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_00H
|
||||
MessageId = input.MessageId,
|
||||
ReceivedTime =input.ReceivedTime,
|
||||
DensityUnit = DensityUnit.None,
|
||||
TimeDensity = -1
|
||||
TimeDensity = -1,
|
||||
DataType = IOTDBDataTypeConst.Log
|
||||
};
|
||||
result?.Invoke(dto);
|
||||
#if DEBUG
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Protocol.Contracts.Protocol.Dto;
|
||||
using JiShe.CollectBus.Protocol.Dto;
|
||||
@ -31,7 +33,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_02H
|
||||
{
|
||||
FiledDesc = "登录",
|
||||
FiledName = "Type",
|
||||
DataValue = "Login"
|
||||
DataValue = "Login",
|
||||
ItemType = $"{input.AFN_FC.AFN.HexToDecStr().PadLeft(2, '0')}_{input.DT.Fn}"
|
||||
};
|
||||
// 查询电表信息
|
||||
AmmeterInfo ammeterInfo = await _dataStorage.GetMeterInfoAsync(MeterTypeEnum.Focus.ToString(), "15");
|
||||
@ -42,6 +45,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_02H
|
||||
data.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = ammeterInfo.Address;
|
||||
data.DeviceType = MeterTypeEnum.Focus;
|
||||
data.FocusId = ammeterInfo.FocusId;
|
||||
}
|
||||
UnitDataAnalysis<AnalysisBaseDto<string>> dto = new UnitDataAnalysis<AnalysisBaseDto<string>>
|
||||
{
|
||||
@ -54,7 +58,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_02H
|
||||
MessageId = input.MessageId,
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DensityUnit = DensityUnit.None,
|
||||
TimeDensity = -1
|
||||
TimeDensity = -1,
|
||||
DataType = IOTDBDataTypeConst.Status
|
||||
};
|
||||
result?.Invoke(dto);
|
||||
await _dataStorage.SaveStatusToIotDbAsync<string>(dto);
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Protocol.Contracts.Protocol.Dto;
|
||||
using JiShe.CollectBus.Protocol.Dto;
|
||||
@ -31,7 +33,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_02H
|
||||
{
|
||||
FiledDesc = "退出登录",
|
||||
FiledName = "Type",
|
||||
DataValue = "LogOut"
|
||||
DataValue = "LogOut",
|
||||
ItemType = $"{input.AFN_FC.AFN.HexToDecStr().PadLeft(2, '0')}_{input.DT.Fn}"
|
||||
};
|
||||
// 查询电表信息
|
||||
AmmeterInfo ammeterInfo = await _dataStorage.GetMeterInfoAsync(MeterTypeEnum.Focus.ToString(), "15");
|
||||
@ -42,6 +45,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_02H
|
||||
data.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = ammeterInfo.Address;
|
||||
data.DeviceType = MeterTypeEnum.Focus;
|
||||
data.FocusId = ammeterInfo.FocusId;
|
||||
}
|
||||
UnitDataAnalysis<AnalysisBaseDto<string>> dto = new UnitDataAnalysis<AnalysisBaseDto<string>>
|
||||
{
|
||||
@ -54,7 +58,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_02H
|
||||
MessageId = input.MessageId,
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DensityUnit = DensityUnit.None,
|
||||
TimeDensity = -1
|
||||
TimeDensity = -1,
|
||||
DataType = IOTDBDataTypeConst.Status
|
||||
};
|
||||
result?.Invoke(dto);
|
||||
await _dataStorage.SaveStatusToIotDbAsync<string>(dto);
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Protocol.Contracts.Protocol.Dto;
|
||||
using JiShe.CollectBus.Protocol.Dto;
|
||||
@ -31,7 +33,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_02H
|
||||
{
|
||||
FiledDesc = "心跳",
|
||||
FiledName = "Type",
|
||||
DataValue = "Heartbeat"
|
||||
DataValue = "Heartbeat",
|
||||
ItemType = $"{input.AFN_FC.AFN.HexToDecStr().PadLeft(2, '0')}_{input.DT.Fn}"
|
||||
};
|
||||
// 查询电表信息
|
||||
AmmeterInfo ammeterInfo = await _dataStorage.GetMeterInfoAsync(MeterTypeEnum.Focus.ToString(), "15");
|
||||
@ -42,6 +45,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_02H
|
||||
data.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = ammeterInfo.Address;
|
||||
data.DeviceType = MeterTypeEnum.Focus;
|
||||
data.FocusId = ammeterInfo.FocusId;
|
||||
}
|
||||
UnitDataAnalysis<AnalysisBaseDto<string>> dto = new UnitDataAnalysis<AnalysisBaseDto<string>>
|
||||
{
|
||||
@ -54,7 +58,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_02H
|
||||
MessageId = input.MessageId,
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DensityUnit = DensityUnit.None,
|
||||
TimeDensity = -1
|
||||
TimeDensity = -1,
|
||||
DataType = IOTDBDataTypeConst.Status
|
||||
};
|
||||
result?.Invoke(dto);
|
||||
await _dataStorage.SaveStatusToIotDbAsync<string>(dto);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using System.Text;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
@ -38,7 +39,8 @@ namespace JiShe.CollectBus.Protocol.AnalysisData.AFN_09H
|
||||
var data = new AnalysisBaseDto<AFN9_F1_AnalysisDto?>()
|
||||
{
|
||||
FiledDesc = "终端版本信息",
|
||||
DataValue = version
|
||||
DataValue = version,
|
||||
ItemType = $"{input.AFN_FC.AFN.HexToDecStr().PadLeft(2, '0')}_{input.DT.Fn}"
|
||||
};
|
||||
// 查询电表信息
|
||||
AmmeterInfo ammeterInfo = await _dataStorage.GetMeterInfoAsync(MeterTypeEnum.Focus.ToString(), "15");
|
||||
@ -49,6 +51,7 @@ namespace JiShe.CollectBus.Protocol.AnalysisData.AFN_09H
|
||||
data.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = ammeterInfo.Address;
|
||||
data.DeviceType = MeterTypeEnum.Focus;
|
||||
data.FocusId = ammeterInfo.FocusId;
|
||||
}
|
||||
UnitDataAnalysis<AnalysisBaseDto<AFN9_F1_AnalysisDto?>> dto = new UnitDataAnalysis<AnalysisBaseDto<AFN9_F1_AnalysisDto?>>
|
||||
{
|
||||
@ -61,7 +64,8 @@ namespace JiShe.CollectBus.Protocol.AnalysisData.AFN_09H
|
||||
MessageId = input.MessageId,
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DensityUnit = DensityUnit.None,
|
||||
TimeDensity = -1
|
||||
TimeDensity = -1,
|
||||
DataType=IOTDBDataTypeConst.Data
|
||||
};
|
||||
result?.Invoke(dto);
|
||||
await _dataStorage.SaveDataToIotDbAsync(dto);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using System.Text;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
@ -32,7 +33,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_09H
|
||||
var data = new AnalysisBaseDto<string?>()
|
||||
{
|
||||
FiledDesc = "远程通信模块版本信息",
|
||||
DataValue = Encoding.ASCII.GetString(string.Join("", input.UnitData.HexMessageList.Skip(30).Take(20).ToList()).HexToByte()).Replace("\0", "")
|
||||
DataValue = Encoding.ASCII.GetString(string.Join("", input.UnitData.HexMessageList.Skip(30).Take(20).ToList()).HexToByte()).Replace("\0", ""),
|
||||
ItemType = $"{input.AFN_FC.AFN.HexToDecStr().PadLeft(2, '0')}_{input.DT.Fn}"
|
||||
};
|
||||
// 查询电表信息
|
||||
AmmeterInfo ammeterInfo = await _dataStorage.GetMeterInfoAsync(MeterTypeEnum.Focus.ToString(), "15");
|
||||
@ -43,6 +45,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_09H
|
||||
data.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = ammeterInfo.Address;
|
||||
data.DeviceType = MeterTypeEnum.Focus;
|
||||
data.FocusId = ammeterInfo.FocusId;
|
||||
}
|
||||
UnitDataAnalysis<AnalysisBaseDto<string?>> dto = new UnitDataAnalysis<AnalysisBaseDto<string?>>
|
||||
{
|
||||
@ -55,7 +58,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_09H
|
||||
MessageId = input.MessageId,
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DensityUnit = DensityUnit.None,
|
||||
TimeDensity = -1
|
||||
TimeDensity = -1,
|
||||
DataType= IOTDBDataTypeConst.Data
|
||||
};
|
||||
result?.Invoke(dto);
|
||||
await _dataStorage.SaveDataToIotDbAsync(dto);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Protocol.Contracts.Protocol.Dto;
|
||||
@ -37,7 +38,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0AH
|
||||
{
|
||||
AFN10F10Entitys = tuple.Item2,
|
||||
ConfigNum = tuple.Item1
|
||||
}
|
||||
},
|
||||
ItemType = $"{input.AFN_FC.AFN.HexToDecStr().PadLeft(2, '0')}_{input.DT.Fn}"
|
||||
};
|
||||
// 查询电表信息
|
||||
AmmeterInfo ammeterInfo = await _dataStorage.GetMeterInfoAsync(MeterTypeEnum.Focus.ToString(), "15");
|
||||
@ -48,6 +50,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0AH
|
||||
data.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = ammeterInfo.Address;
|
||||
data.DeviceType = MeterTypeEnum.Focus;
|
||||
data.FocusId = ammeterInfo.FocusId;
|
||||
}
|
||||
UnitDataAnalysis<AnalysisBaseDto<AFN10_F10_AnalysisDto?>> dto = new UnitDataAnalysis<AnalysisBaseDto<AFN10_F10_AnalysisDto?>>
|
||||
{
|
||||
@ -60,7 +63,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0AH
|
||||
MessageId = input.MessageId,
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DensityUnit = DensityUnit.None,
|
||||
TimeDensity = -1
|
||||
TimeDensity = -1,
|
||||
DataType=IOTDBDataTypeConst.Param
|
||||
};
|
||||
result?.Invoke(dto);
|
||||
await _dataStorage.SaveDataToIotDbAsync<AFN10_F10_AnalysisDto?>(dto);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Protocol.Contracts.Protocol.Dto;
|
||||
@ -36,7 +37,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0AH
|
||||
var data = new AnalysisBaseDto<AFN10_F66_AnalysisDto?>()
|
||||
{
|
||||
FiledDesc = "终端电能表/交流采样装置配置参数",
|
||||
DataValue = await GenerateFinalResult(input.UnitData.HexMessageList)
|
||||
DataValue = await GenerateFinalResult(input.UnitData.HexMessageList),
|
||||
ItemType = $"{input.AFN_FC.AFN.HexToDecStr().PadLeft(2, '0')}_{input.DT.Fn}"
|
||||
};
|
||||
// 查询电表信息
|
||||
AmmeterInfo ammeterInfo = await _dataStorage.GetMeterInfoAsync(MeterTypeEnum.Focus.ToString(), "15");
|
||||
@ -47,6 +49,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0AH
|
||||
data.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = ammeterInfo.Address;
|
||||
data.DeviceType = MeterTypeEnum.Focus;
|
||||
data.FocusId = ammeterInfo.FocusId;
|
||||
}
|
||||
UnitDataAnalysis<AnalysisBaseDto<AFN10_F66_AnalysisDto?>> dto = new UnitDataAnalysis<AnalysisBaseDto<AFN10_F66_AnalysisDto?>>
|
||||
{
|
||||
@ -59,7 +62,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0AH
|
||||
MessageId = input.MessageId,
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DensityUnit = DensityUnit.None,
|
||||
TimeDensity = -1
|
||||
TimeDensity = -1,
|
||||
DataType = IOTDBDataTypeConst.Param
|
||||
};
|
||||
result?.Invoke(dto);
|
||||
await _dataStorage.SaveDataToIotDbAsync<AFN10_F66_AnalysisDto?>(dto);
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Protocol.Contracts.Protocol.Dto;
|
||||
using JiShe.CollectBus.Protocol.Dto;
|
||||
@ -30,7 +32,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0AH
|
||||
var data = new AnalysisBaseDto<bool?>()
|
||||
{
|
||||
FiledDesc = "终端电能表/交流采样装置配置参数",
|
||||
DataValue = input.UnitData.HexMessageList[4].Equals("55")
|
||||
DataValue = input.UnitData.HexMessageList[4].Equals("55"),
|
||||
ItemType = $"{input.AFN_FC.AFN.HexToDecStr().PadLeft(2, '0')}_{input.DT.Fn}"
|
||||
};
|
||||
// 查询电表信息
|
||||
AmmeterInfo ammeterInfo = await _dataStorage.GetMeterInfoAsync(MeterTypeEnum.Focus.ToString(), "15");
|
||||
@ -41,6 +44,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0AH
|
||||
data.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = ammeterInfo.Address;
|
||||
data.DeviceType = MeterTypeEnum.Focus;
|
||||
data.FocusId = ammeterInfo.FocusId;
|
||||
}
|
||||
UnitDataAnalysis<AnalysisBaseDto<bool?>> dto = new UnitDataAnalysis<AnalysisBaseDto<bool?>>
|
||||
{
|
||||
@ -53,7 +57,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0AH
|
||||
MessageId = input.MessageId,
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DensityUnit = DensityUnit.None,
|
||||
TimeDensity = -1
|
||||
TimeDensity = -1,
|
||||
DataType = IOTDBDataTypeConst.Param
|
||||
};
|
||||
result?.Invoke(dto);
|
||||
await _dataStorage.SaveDataToIotDbAsync<bool?>(dto);
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using Apache.IoTDB;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.IoTDB.Interface;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
@ -46,7 +48,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0CH
|
||||
MessageId = input.MessageId,
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DensityUnit = DensityUnit.Second,
|
||||
TimeDensity = 0
|
||||
TimeDensity = 0,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
List<string> datas = await AnalysisDataUnitAsync(input.UnitData.HexMessageList);
|
||||
List<AnalysisBaseDto<decimal?>> list = GenerateFinalResult(2, datas, "正向有功电能示值", input.AFN_FC.AFN, input.DT.Fn);
|
||||
@ -62,6 +65,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0CH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -127,14 +131,14 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0CH
|
||||
if(decimal.TryParse(data[i], out decimal value))
|
||||
meter.DataValue = value;
|
||||
}
|
||||
meter.DataType = $"{afn.ToString().PadLeft(2, '0')}_{fn}_{i - index}";
|
||||
meter.ItemType = i - index == 0 ? $"{afn.ToString().PadLeft(2, '0')}_{fn}": $"{afn.ToString().PadLeft(2, '0')}_{fn}_{i - index}";
|
||||
string timeSpan = $"{data[0].Substring(0, 4)}-{data[0].Substring(4, 2)}-{data[0].Substring(6, 2)} {data[0].Substring(8, 2)}:{data[0].Substring(10, 2)}:00";
|
||||
if (DateTime.TryParse(timeSpan, out DateTime readingDate))
|
||||
{
|
||||
meter.TimeSpan = readingDate;
|
||||
}
|
||||
meter.FiledDesc = filedDesc;
|
||||
meter.FiledName = meter.DataType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
meter.FiledName = meter.ItemType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
list.Add(meter);
|
||||
}
|
||||
return list;
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Protocol.Contracts.Protocol.Dto;
|
||||
@ -7,6 +8,7 @@ using JiShe.CollectBus.Protocol.Interfaces;
|
||||
using JiShe.CollectBus.Protocol.T37612012.Appendix;
|
||||
using JiShe.CollectBus.Protocol3761;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using static System.Runtime.InteropServices.JavaScript.JSType;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0CH
|
||||
{
|
||||
@ -46,6 +48,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0CH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -60,7 +63,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0CH
|
||||
MessageId = input.MessageId,
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DensityUnit = DensityUnit.Second,
|
||||
TimeDensity = 0
|
||||
TimeDensity = 0,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync(unitDataAnalysis);
|
||||
@ -116,12 +120,12 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0CH
|
||||
if(decimal.TryParse(data[i], out decimal value))
|
||||
meter.DataValue = value;
|
||||
}
|
||||
meter.DataType = $"{afn.ToString().PadLeft(2, '0')}_{fn}_{i - index}";
|
||||
meter.ItemType = i - index==0 ? $"{afn.ToString().PadLeft(2, '0')}_{fn}": $"{afn.ToString().PadLeft(2, '0')}_{fn}_{i - index}";
|
||||
string timeSpan = $"{data[0].Substring(0, 4)}-{data[0].Substring(4, 2)}-{data[0].Substring(6, 2)} {data[0].Substring(8, 2)}:{data[0].Substring(10, 2)}:00";
|
||||
if(DateTime.TryParse(timeSpan, out DateTime readingDate))
|
||||
meter.TimeSpan = readingDate;
|
||||
meter.FiledDesc = filedDesc;
|
||||
meter.FiledName = meter.DataType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
meter.FiledName = meter.ItemType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
list.Add(meter);
|
||||
}
|
||||
return list;
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Protocol.Contracts.Protocol.Dto;
|
||||
@ -9,6 +10,7 @@ using JiShe.CollectBus.Protocol3761;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using YamlDotNet.Core.Tokens;
|
||||
using static System.Runtime.InteropServices.JavaScript.JSType;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0CH
|
||||
{
|
||||
@ -47,6 +49,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0CH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -61,7 +64,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0CH
|
||||
MessageId = input.MessageId,
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DensityUnit = DensityUnit.Second,
|
||||
TimeDensity = 0
|
||||
TimeDensity = 0,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync(unitDataAnalysis);
|
||||
@ -118,12 +122,12 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0CH
|
||||
if(decimal.TryParse(data[i], out decimal value))
|
||||
meter.DataValue = value;
|
||||
}
|
||||
meter.DataType = $"{afn.ToString().PadLeft(2, '0')}_{fn}_{i - index}";
|
||||
meter.ItemType = i - index==0? $"{afn.ToString().PadLeft(2, '0')}_{fn}" : $"{afn.ToString().PadLeft(2, '0')}_{fn}_{i - index}";
|
||||
string timeSpan = $"{data[0].Substring(0, 4)}-{data[0].Substring(4, 2)}-{data[0].Substring(6, 2)} {data[0].Substring(8, 2)}:{data[0].Substring(10, 2)}:00";
|
||||
if(DateTime.TryParse(timeSpan, out DateTime readTime))
|
||||
meter.TimeSpan = readTime;
|
||||
meter.FiledDesc = filedDesc;
|
||||
meter.FiledName = meter.DataType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
meter.FiledName = meter.ItemType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
list.Add(meter);
|
||||
}
|
||||
return list;
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
@ -50,6 +51,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0CH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -64,7 +66,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0CH
|
||||
MessageId = input.MessageId,
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DensityUnit = DensityUnit.Second,
|
||||
TimeDensity = 0
|
||||
TimeDensity = 0,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync(unitDataAnalysis);
|
||||
@ -100,7 +103,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0CH
|
||||
}
|
||||
return values;
|
||||
}
|
||||
public List<AnalysisBaseDto<decimal?>> GenerateFinalResult(int index, List<string> data, string dataType, string filedDesc = "")
|
||||
public List<AnalysisBaseDto<decimal?>> GenerateFinalResult(int index, List<string> data, string itemType, string filedDesc = "")
|
||||
{
|
||||
List<AnalysisBaseDto<decimal?>> list = new List<AnalysisBaseDto<decimal?>>();
|
||||
for (int i = index; i < data.Count; i++)
|
||||
@ -121,14 +124,14 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0CH
|
||||
meter.DataValue = value;
|
||||
}
|
||||
|
||||
meter.DataType = $"{dataType}_{i - index}";
|
||||
meter.ItemType = i - index==0?itemType:$"{itemType}_{i - index}";
|
||||
string timeSpan = $"{data[0].Substring(0, 4)}-{data[0].Substring(4, 2)}-{data[0].Substring(6, 2)} {data[0].Substring(8, 2)}:{data[0].Substring(10, 2)}:00";
|
||||
if (DateTime.TryParse(timeSpan,out DateTime readingDate))
|
||||
{
|
||||
meter.TimeSpan = readingDate;
|
||||
}
|
||||
meter.FiledDesc = filedDesc;
|
||||
meter.FiledName = meter.DataType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
meter.FiledName = meter.ItemType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
list.Add(meter);
|
||||
}
|
||||
return list;
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
@ -10,6 +11,7 @@ using JiShe.CollectBus.Protocol3761;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.Metrics;
|
||||
using static FreeSql.Internal.GlobalFilter;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0CH
|
||||
{
|
||||
@ -36,9 +38,9 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0CH
|
||||
ArgumentNullException.ThrowIfNull(input);
|
||||
ArgumentNullException.ThrowIfNull(input.UnitData?.HexMessageList);
|
||||
List<string> datas = await AnalysisDataUnitAsync(input.UnitData.HexMessageList);
|
||||
string dataType = $"{input.AFN_FC.AFN.HexToDecStr().PadLeft(2, '0')}_{input.DT.Fn}";
|
||||
string itemType = $"{input.AFN_FC.AFN.HexToDecStr().PadLeft(2, '0')}_{input.DT.Fn}";
|
||||
|
||||
AnalysisBaseDto<decimal?> data = GenerateFinalResult(datas, "当月正向有功最大需量及发生时间", dataType);
|
||||
AnalysisBaseDto<decimal?> data = GenerateFinalResult(datas, "当月正向有功最大需量及发生时间", itemType);
|
||||
// 查询电表信息
|
||||
AmmeterInfo ammeterInfo = await _dataStorage.GetMeterInfoAsync(data.DeviceType.ToString(), "15");
|
||||
if (ammeterInfo != null)
|
||||
@ -47,7 +49,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0CH
|
||||
data.DeviceId = ammeterInfo.MeterId;
|
||||
data.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
|
||||
data.FocusId = ammeterInfo.FocusId;
|
||||
}
|
||||
|
||||
UnitDataAnalysis<AnalysisBaseDto<decimal?>> unitDataAnalysis = new UnitDataAnalysis<AnalysisBaseDto<decimal?>>
|
||||
@ -61,7 +63,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0CH
|
||||
MessageId = input.MessageId,
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DensityUnit = DensityUnit.Second,
|
||||
TimeDensity = 0
|
||||
TimeDensity = 0,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
await _dataStorage.SaveDataToIotDbAsync(unitDataAnalysis);
|
||||
@ -111,7 +114,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0CH
|
||||
return values;
|
||||
}
|
||||
|
||||
public AnalysisBaseDto<decimal?> GenerateFinalResult(List<string> data, string filedDesc,string dataType)
|
||||
public AnalysisBaseDto<decimal?> GenerateFinalResult(List<string> data, string filedDesc,string itemType)
|
||||
{
|
||||
AnalysisBaseDto<decimal?> dto = new AnalysisBaseDto<decimal?>
|
||||
{
|
||||
@ -134,9 +137,9 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0CH
|
||||
{
|
||||
dto.TimeSpan = readingDate;
|
||||
}
|
||||
dto.DataType = dataType;
|
||||
dto.ItemType = itemType;
|
||||
dto.FiledDesc = filedDesc;
|
||||
dto.FiledName = dto.DataType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
dto.FiledName = dto.ItemType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
return dto;
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
@ -9,6 +10,7 @@ using JiShe.CollectBus.Protocol.T37612012.AnalysisData;
|
||||
using JiShe.CollectBus.Protocol.T37612012.Appendix;
|
||||
using JiShe.CollectBus.Protocol3761;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using static FreeSql.Internal.GlobalFilter;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
{
|
||||
@ -36,9 +38,9 @@ namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
ArgumentNullException.ThrowIfNull(input);
|
||||
ArgumentNullException.ThrowIfNull(input.UnitData?.HexMessageList);
|
||||
List<string> datas = await AnalysisDataUnit(input.UnitData.HexMessageList);
|
||||
string dataType = $"{input.AFN_FC.AFN.HexToDecStr().PadLeft(2, '0')}_{input.DT.Fn}";
|
||||
string itemType = $"{input.AFN_FC.AFN.HexToDecStr().PadLeft(2, '0')}_{input.DT.Fn}";
|
||||
|
||||
AnalysisBaseDto<decimal?> data = GenerateFinalResult(datas, dataType,"上月(上一结算日)正向有功最大需量及发生时间");
|
||||
AnalysisBaseDto<decimal?> data = GenerateFinalResult(datas, itemType,"上月(上一结算日)正向有功最大需量及发生时间");
|
||||
// 查询电表信息
|
||||
AmmeterInfo ammeterInfo = await _dataStorage.GetMeterInfoAsync(data.DeviceType.ToString(), "15");
|
||||
if (ammeterInfo != null)
|
||||
@ -47,6 +49,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
data.DeviceId = ammeterInfo.MeterId;
|
||||
data.DatabaseBusiID=ammeterInfo.DatabaseBusiID;
|
||||
data.DeviceAddress= ammeterInfo.AmmerterAddress;
|
||||
data.FocusId = ammeterInfo.FocusId;
|
||||
}
|
||||
UnitDataAnalysis<AnalysisBaseDto<decimal?>> unitDataAnalysis = new UnitDataAnalysis<AnalysisBaseDto<decimal?>>
|
||||
{
|
||||
@ -61,7 +64,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
MessageId=input.MessageId,
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DensityUnit = DensityUnit.Second,
|
||||
TimeDensity = 0
|
||||
TimeDensity = 0,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
@ -110,7 +114,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
}
|
||||
return values;
|
||||
}
|
||||
public AnalysisBaseDto<decimal?> GenerateFinalResult(List<string> data,string dataType, string filedDesc = "")
|
||||
public AnalysisBaseDto<decimal?> GenerateFinalResult(List<string> data,string itemType, string filedDesc = "")
|
||||
{
|
||||
AnalysisBaseDto<decimal?> dto = new AnalysisBaseDto<decimal?>
|
||||
{
|
||||
@ -144,9 +148,9 @@ namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
{
|
||||
dto.TimeSpan= dto.TimeSpan.Value.AddYears(-1);
|
||||
}
|
||||
dto.DataType = dataType;
|
||||
dto.ItemType = itemType;
|
||||
dto.FiledDesc = "上月(上一结算日)正向有功最大需量及发生时间";
|
||||
dto.FiledName = dto.DataType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
dto.FiledName = dto.ItemType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
|
||||
return dto;
|
||||
}
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
@ -9,6 +10,7 @@ using JiShe.CollectBus.Protocol.T37612012.AnalysisData;
|
||||
using JiShe.CollectBus.Protocol3761;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using YamlDotNet.Core.Tokens;
|
||||
using static FreeSql.Internal.GlobalFilter;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
{
|
||||
@ -37,8 +39,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
ArgumentNullException.ThrowIfNull(input.UnitData?.HexMessageList);
|
||||
ArgumentNullException.ThrowIfNull(input.AFN_FC.AFN);
|
||||
ArgumentNullException.ThrowIfNull(input.DT.Fn);
|
||||
string dataType = $"{input.AFN_FC.AFN.HexToDecStr().PadLeft(2, '0')}_{input.DT.Fn}";
|
||||
AnalysisBaseDto<decimal?> data = GenerateFinalResult(input.UnitData.HexMessageList, dataType);
|
||||
string itemType = $"{input.AFN_FC.AFN.HexToDecStr().PadLeft(2, '0')}_{input.DT.Fn}";
|
||||
AnalysisBaseDto<decimal?> data = GenerateFinalResult(input.UnitData.HexMessageList, itemType);
|
||||
// 查询电表信息
|
||||
AmmeterInfo ammeterInfo = await _dataStorage.GetMeterInfoAsync(data.DeviceType.ToString(), "15");
|
||||
if (ammeterInfo != null)
|
||||
@ -47,7 +49,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
data.DeviceId = ammeterInfo.MeterId;
|
||||
data.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
|
||||
data.FocusId = ammeterInfo.FocusId;
|
||||
}
|
||||
UnitDataAnalysis<AnalysisBaseDto<decimal?>> dto = new UnitDataAnalysis<AnalysisBaseDto<decimal?>>
|
||||
{
|
||||
@ -60,7 +62,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
MessageId = input.MessageId,
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DensityUnit = DensityUnit.Second,
|
||||
TimeDensity = 0
|
||||
TimeDensity = 0,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
result?.Invoke(dto);
|
||||
await _dataStorage.SaveDataToIotDbAsync(dto);
|
||||
@ -73,7 +76,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
}
|
||||
return await Task.FromResult(false);
|
||||
}
|
||||
public AnalysisBaseDto<decimal?> GenerateFinalResult(List<string> hexMessageList,string dataType)
|
||||
public AnalysisBaseDto<decimal?> GenerateFinalResult(List<string> hexMessageList,string itemType)
|
||||
{
|
||||
AnalysisBaseDto<decimal?> dto = new AnalysisBaseDto<decimal?>
|
||||
{
|
||||
@ -91,9 +94,9 @@ namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
if (decimal.TryParse($"{arr[11]}{arr[12]}{arr[13]}.{arr[14]}", out decimal value))
|
||||
dto.DataValue = value;
|
||||
}
|
||||
dto.DataType = dataType;
|
||||
dto.ItemType = itemType;
|
||||
dto.FiledDesc = "水示值";
|
||||
dto.FiledName = dto.DataType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
dto.FiledName = dto.ItemType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
return dto;
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
@ -29,7 +30,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
_dataStorage = dataStorage;
|
||||
}
|
||||
|
||||
public List<string> DataType { get; set; } = new List<string>() { "YGGL", "YGGL_A", "YGGL_B", "YGGL_C", "WGGL", "WGGL_A", "WGGL_B", "WGGL_C", "GLYS", "GLYS_A", "GLYS_B", "GLYS_C", "DY_A", "DY_B", "DY_C", "DL_A", "DL_B", "DL_C", "LXDL", "SZGL", "SZGL_A", "SZGL_B", "SZGL_C" };
|
||||
public List<string> ItemType { get; set; } = new List<string>() { "YGGL", "AYGGL", "BYGGL", "CYGGL", "WGGL", "AWGGL", "BWGGL", "CWGGL", "GLYS", "AGLYS", "BGLYS", "CGLYS", "ADY", "BDY", "CDY", "ADL", "BDL", "CDL", "LXDL", "SZGL", "ASZGL", "BSZGL", "CSZGL" };
|
||||
|
||||
public async Task<bool> ExecuteAsync(TB3761 input, Action<dynamic>? result = null)
|
||||
{
|
||||
@ -59,8 +60,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
dto.DataValue = value;
|
||||
}
|
||||
|
||||
dto.DataType = $"{input.AFN_FC.AFN.HexToDecStr().PadLeft(2, '0')}_{input.DT.Fn}_{DataType[i-1]}";
|
||||
dto.FiledName = DataType[i - 1].GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
dto.ItemType = $"{input.AFN_FC.AFN.HexToDecStr().PadLeft(2, '0')}_{input.DT.Fn}_{ItemType[i-1]}";
|
||||
dto.FiledName = ItemType[i - 1].GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
dto.TimeSpan = Convert.ToDateTime($"{data[0].Substring(0, 4)}-{data[0].Substring(4, 2)}-{data[0].Substring(6, 2)} {data[0].Substring(8, 2)}:{data[0].Substring(10, 2)}:00");
|
||||
dto.FiledDesc = remarks[i - 1];
|
||||
list.Add(dto);
|
||||
@ -68,7 +69,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
if (list.Count > 0)
|
||||
{
|
||||
// 查询电表信息
|
||||
AmmeterInfo ammeterInfo = await _dataStorage.GetMeterInfoAsync(list[0].DataType.ToString(), "15");
|
||||
AmmeterInfo ammeterInfo = await _dataStorage.GetMeterInfoAsync(list[0].ItemType.ToString(), "15");
|
||||
if (ammeterInfo != null)
|
||||
{
|
||||
list.ForEach(item =>
|
||||
@ -77,6 +78,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -92,7 +94,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
MessageId = input.MessageId,
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DensityUnit = DensityUnit.Second,
|
||||
TimeDensity = 0
|
||||
TimeDensity = 0,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync(unitDataAnalysis);
|
||||
|
||||
@ -10,6 +10,8 @@ using static System.Runtime.InteropServices.JavaScript.JSType;
|
||||
using System.Diagnostics.Metrics;
|
||||
using JiShe.CollectBus.Protocol.T37612012.AnalysisData;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using static FreeSql.Internal.GlobalFilter;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
{
|
||||
@ -35,9 +37,9 @@ namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(input);
|
||||
ArgumentNullException.ThrowIfNull(input.UnitData?.HexMessageList);
|
||||
string dataType = $"{input.AFN_FC.AFN.HexToDecStr().PadLeft(2, '0')}_{input.DT.Fn}";
|
||||
string itemType = $"{input.AFN_FC.AFN.HexToDecStr().PadLeft(2, '0')}_{input.DT.Fn}";
|
||||
|
||||
var data = await GenerateFinalResultAsync(input.UnitData.HexMessageList, dataType);
|
||||
var data = await GenerateFinalResultAsync(input.UnitData.HexMessageList, itemType);
|
||||
// 查询电表信息
|
||||
AmmeterInfo ammeterInfo = await _dataStorage.GetMeterInfoAsync(data.DeviceType.ToString(), "15");
|
||||
if (ammeterInfo != null)
|
||||
@ -46,7 +48,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
data.DeviceId = ammeterInfo.MeterId;
|
||||
data.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
|
||||
data.FocusId = ammeterInfo.FocusId;
|
||||
}
|
||||
UnitDataAnalysis<AnalysisBaseDto<string>> dto = new UnitDataAnalysis<AnalysisBaseDto<string>>
|
||||
{
|
||||
@ -59,7 +61,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
MessageId = input.MessageId,
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DensityUnit = DensityUnit.Second,
|
||||
TimeDensity = 0
|
||||
TimeDensity = 0,
|
||||
DataType = IOTDBDataTypeConst.Param,
|
||||
};
|
||||
result?.Invoke(dto);
|
||||
await _dataStorage.SaveDataToIotDbAsync(dto);
|
||||
@ -73,7 +76,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
return await Task.FromResult(false);
|
||||
}
|
||||
|
||||
public async Task<AnalysisBaseDto<string>> GenerateFinalResultAsync(List<string> hexMessageList,string dataType)
|
||||
public async Task<AnalysisBaseDto<string>> GenerateFinalResultAsync(List<string> hexMessageList,string itemType)
|
||||
{
|
||||
AnalysisBaseDto<string> dto = new AnalysisBaseDto<string>();
|
||||
var arr = hexMessageList.GetRange(4, 6);
|
||||
@ -91,7 +94,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
dto.DataValue = $"{data.Item1} {data.Item2}";
|
||||
});
|
||||
}
|
||||
dto.DataType = dataType;
|
||||
dto.ItemType = itemType;
|
||||
dto.FiledName = "TerminalTime";
|
||||
dto.FiledDesc = "召读终端时间";
|
||||
return await Task.FromResult(dto);
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Protocol.Contracts.Protocol.Dto;
|
||||
using JiShe.CollectBus.Protocol.Dto;
|
||||
@ -8,6 +10,7 @@ using JiShe.CollectBus.Protocol.T37612012.Appendix;
|
||||
using JiShe.CollectBus.Protocol3761;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System;
|
||||
using static FreeSql.Internal.GlobalFilter;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
{
|
||||
@ -27,7 +30,6 @@ namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
_dataStorage = dataStorage;
|
||||
}
|
||||
|
||||
|
||||
public async Task<bool> ExecuteAsync(TB3761 input, Action<dynamic>? result = null)
|
||||
{
|
||||
try
|
||||
@ -41,7 +43,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
var data = new AnalysisBaseDto<AFN12_F33_AnalysisDto?>()
|
||||
{
|
||||
FiledDesc = "当前正向有/无功电能示值、一/四象限无功电能示值",
|
||||
DataValue = await AnalysisDataUnit(input.UnitData.HexMessageList, rationgCount)
|
||||
DataValue = await AnalysisDataUnit(input.UnitData.HexMessageList, rationgCount),
|
||||
ItemType= $"{input.AFN_FC.AFN.HexToDecStr().PadLeft(2, '0')}_{input.DT.Fn}"
|
||||
};
|
||||
// 查询电表信息
|
||||
AmmeterInfo ammeterInfo = await _dataStorage.GetMeterInfoAsync(data.DeviceType.ToString(), "15");
|
||||
@ -51,7 +54,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
data.DeviceId = ammeterInfo.MeterId;
|
||||
data.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
|
||||
data.FocusId = ammeterInfo.FocusId;
|
||||
}
|
||||
UnitDataAnalysis<AnalysisBaseDto<AFN12_F33_AnalysisDto?>> unitDataAnalysis = new UnitDataAnalysis<AnalysisBaseDto<AFN12_F33_AnalysisDto?>>
|
||||
{
|
||||
@ -64,7 +67,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
MessageId = input.MessageId,
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DensityUnit = DensityUnit.Second,
|
||||
TimeDensity = 0
|
||||
TimeDensity = 0,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
await _dataStorage.SaveDataToIotDbAsync(unitDataAnalysis);
|
||||
@ -137,7 +141,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
{
|
||||
ChildNodes model = new ChildNodes()
|
||||
{
|
||||
Value = value //29,4 33,4 37,4 41,4
|
||||
Value = value
|
||||
};
|
||||
children.Add(model);
|
||||
});
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
@ -28,7 +29,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
_dataStorage = dataStorage;
|
||||
}
|
||||
|
||||
public List<string> DataType { get; set; } = new List<string>() { "Uab_Ua", "Ub", "Ucb_Uc", "Ia", "Ib", "Ic" };
|
||||
public List<string> ItemType { get; set; } = new List<string>() { "Uab_Ua", "Ub", "Ucb_Uc", "Ia", "Ib", "Ic" };
|
||||
|
||||
public async Task<bool> ExecuteAsync(TB3761 input, Action<dynamic>? result = null)
|
||||
{
|
||||
@ -56,8 +57,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
if(decimal.TryParse(data[i], out decimal value))
|
||||
dto.DataValue = value;
|
||||
}
|
||||
dto.DataType = $"{input.AFN_FC.AFN.HexToDecStr().PadLeft(2, '0')}_{input.DT.Fn}_{DataType[i]}";
|
||||
dto.FiledName = dto.DataType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
dto.ItemType = $"{input.AFN_FC.AFN.HexToDecStr().PadLeft(2, '0')}_{input.DT.Fn}_{ItemType[i]}";
|
||||
dto.FiledName = dto.ItemType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
dto.FiledDesc= remarks[i];
|
||||
list.Add(dto);
|
||||
}
|
||||
@ -73,6 +74,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -87,7 +89,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
MessageId = input.MessageId,
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DensityUnit = DensityUnit.Second,
|
||||
TimeDensity = 0
|
||||
TimeDensity = 0,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync(unitDataAnalysis);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
@ -52,6 +53,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -69,7 +71,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = density,//密度,注意这里会兼容存储做判断
|
||||
DensityUnit = DensityUnit.Minute,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
@ -50,6 +51,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -66,7 +68,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = density,//密度,注意这里会兼容存储做判断
|
||||
DensityUnit = DensityUnit.Minute,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -52,6 +52,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
@ -36,9 +37,9 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
List<string> datas = await AnalysisDataUnitAsync(input.UnitData.HexMessageList);
|
||||
int density = Convert.ToInt32(Convert.ToInt32(datas[1]).GetEnumDescription(typeof(DensityEnums)));
|
||||
|
||||
string dataType = $"{input.AFN_FC.AFN.HexToDecStr().PadLeft(2, '0')}_{input.DT.Fn}";
|
||||
string itemType = $"{input.AFN_FC.AFN.HexToDecStr().PadLeft(2, '0')}_{input.DT.Fn}";
|
||||
|
||||
List<AnalysisBaseDto<decimal?>> data = datas.GenerateFinalResultTd_c(3, density, dataType, "反向有功总电能示值");
|
||||
List<AnalysisBaseDto<decimal?>> data = datas.GenerateFinalResultTd_c(3, density, itemType, "反向有功总电能示值");
|
||||
|
||||
if (data.Count > 0)
|
||||
{
|
||||
@ -52,6 +53,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -68,7 +70,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = density,//密度,注意这里会兼容存储做判断
|
||||
DensityUnit = DensityUnit.Minute,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
@ -51,6 +52,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -67,7 +69,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = density,//密度,注意这里会兼容存储做判断
|
||||
DensityUnit = DensityUnit.Minute,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
@ -51,6 +52,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -67,7 +69,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = density,//密度,注意这里会兼容存储做判断
|
||||
DensityUnit = DensityUnit.Minute,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
@ -51,6 +52,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -67,7 +69,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = density,//密度,注意这里会兼容存储做判断
|
||||
DensityUnit = DensityUnit.Minute,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
@ -50,6 +51,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -66,7 +68,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = density,//密度,注意这里会兼容存储做判断
|
||||
DensityUnit = DensityUnit.Minute,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
@ -51,6 +52,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -67,7 +69,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = density,//密度-间隔分钟数,
|
||||
DensityUnit = DensityUnit.Minute,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
@ -50,6 +51,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -66,7 +68,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = 1,//密度-间隔,
|
||||
DensityUnit = DensityUnit.Day,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
@ -148,10 +151,10 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
meter.TimeSpan = readingDate;
|
||||
}
|
||||
meter.DataType = i == 1 ? dataType : $"{dataType}_{ i - 1}";
|
||||
meter.ItemType = i == 1 ? dataType : $"{dataType}_{ i - 1}";
|
||||
filedDesc = i == 1 ? filedDesc : filedDesc.Replace("有功", "无功");
|
||||
meter.FiledDesc = filedDesc;
|
||||
meter.FiledName = meter.DataType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
meter.FiledName = meter.ItemType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
|
||||
list.Add(meter);
|
||||
}
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
@ -50,6 +51,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -66,7 +68,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = density,//密度-间隔分钟数,
|
||||
DensityUnit = DensityUnit.Minute,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
@ -51,6 +52,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -67,7 +69,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = density,//密度-间隔分钟数,
|
||||
DensityUnit = DensityUnit.Minute,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
@ -50,6 +51,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -66,7 +68,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = density,//密度-间隔分钟数,
|
||||
DensityUnit = DensityUnit.Minute,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
@ -51,6 +52,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -67,7 +69,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = density,//密度-间隔分钟数,
|
||||
DensityUnit = DensityUnit.Minute,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Protocol.Contracts.Protocol.Dto;
|
||||
@ -50,6 +51,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -66,7 +68,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = 1,//密度-间隔,
|
||||
DensityUnit = DensityUnit.Day,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Protocol.Contracts.Protocol.Dto;
|
||||
@ -49,6 +50,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -65,7 +67,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = 1,//密度-间隔,
|
||||
DensityUnit = DensityUnit.Day,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Protocol.Contracts.Protocol.Dto;
|
||||
@ -66,7 +67,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = 1,//密度-间隔,
|
||||
DensityUnit = DensityUnit.Day,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Protocol.Contracts.Protocol.Dto;
|
||||
@ -49,6 +50,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -65,7 +67,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = 1,//密度-间隔,
|
||||
DensityUnit = DensityUnit.Day,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Protocol.Contracts.Protocol.Dto;
|
||||
@ -49,6 +50,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -65,7 +67,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = 1,//密度-间隔,
|
||||
DensityUnit = DensityUnit.Day,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Protocol.Contracts.Protocol.Dto;
|
||||
@ -49,6 +50,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -65,7 +67,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = 1,//密度-间隔,
|
||||
DensityUnit = DensityUnit.Day,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Protocol.Contracts.Protocol.Dto;
|
||||
@ -49,6 +50,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -65,7 +67,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = 1,//密度-间隔,
|
||||
DensityUnit = DensityUnit.Day,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Protocol.Contracts.Protocol.Dto;
|
||||
@ -49,6 +50,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -65,7 +67,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = 1,//密度-间隔,
|
||||
DensityUnit = DensityUnit.Day,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Protocol.Contracts.Protocol.Dto;
|
||||
@ -48,6 +49,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -64,7 +66,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = 1,//密度-间隔,
|
||||
DensityUnit = DensityUnit.Month,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -8,6 +8,7 @@ using Microsoft.Extensions.Logging;
|
||||
using JiShe.CollectBus.Protocol.T37612012.Appendix;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
@ -49,6 +50,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -65,7 +67,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = 1,//密度-间隔,
|
||||
DensityUnit = DensityUnit.Month,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -8,6 +8,7 @@ using Microsoft.Extensions.Logging;
|
||||
using JiShe.CollectBus.Protocol.T37612012.Appendix;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
@ -49,6 +50,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -65,7 +67,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = 1,//密度-间隔,
|
||||
DensityUnit = DensityUnit.Month,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Protocol.Contracts.Protocol.Dto;
|
||||
@ -48,6 +49,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -64,7 +66,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = 1,//密度-间隔,
|
||||
DensityUnit = DensityUnit.Month,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -8,6 +8,7 @@ using Microsoft.Extensions.Logging;
|
||||
using JiShe.CollectBus.Protocol.T37612012.Appendix;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
@ -49,6 +50,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -65,7 +67,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = 1,//密度-间隔,
|
||||
DensityUnit = DensityUnit.Month,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -8,6 +8,7 @@ using Microsoft.Extensions.Logging;
|
||||
using JiShe.CollectBus.Protocol.T37612012.Appendix;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
@ -49,6 +50,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -65,7 +67,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = 1,//密度-间隔,
|
||||
DensityUnit = DensityUnit.Month,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Protocol.Contracts.Protocol.Dto;
|
||||
@ -48,6 +49,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -64,7 +66,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = 1,//密度-间隔,
|
||||
DensityUnit = DensityUnit.Month,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -8,6 +8,7 @@ using Microsoft.Extensions.Logging;
|
||||
using JiShe.CollectBus.Protocol.T37612012.Appendix;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
@ -49,6 +50,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -65,7 +67,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = 1,//密度-间隔,
|
||||
DensityUnit = DensityUnit.Month,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -8,6 +8,7 @@ using Microsoft.Extensions.Logging;
|
||||
using JiShe.CollectBus.Protocol.T37612012.Appendix;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
@ -50,6 +51,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -66,7 +68,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = 1,//密度-间隔,
|
||||
DensityUnit = DensityUnit.Day,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
@ -8,6 +9,7 @@ using JiShe.CollectBus.Protocol.Interfaces;
|
||||
using JiShe.CollectBus.Protocol.T37612012.Appendix;
|
||||
using JiShe.CollectBus.Protocol3761;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using static FreeSql.Internal.GlobalFilter;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
@ -45,6 +47,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
data.DeviceId = ammeterInfo.MeterId;
|
||||
data.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
data.FocusId = ammeterInfo.FocusId;
|
||||
}
|
||||
UnitDataAnalysis<AnalysisBaseDto<decimal?>> unitDataAnalysis = new UnitDataAnalysis<AnalysisBaseDto<decimal?>>
|
||||
{
|
||||
@ -59,7 +62,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = 1,//密度-间隔,
|
||||
DensityUnit = DensityUnit.Day,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
@ -136,9 +140,9 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
meter.TimeSpan = readingDate;
|
||||
}
|
||||
meter.DataType = dataType;
|
||||
meter.ItemType = dataType;
|
||||
meter.FiledDesc = filedDesc;
|
||||
meter.FiledName = meter.DataType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
meter.FiledName = meter.ItemType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
return meter;
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,6 +9,8 @@ using JiShe.CollectBus.Protocol.T37612012.Appendix;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using static FreeSql.Internal.GlobalFilter;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
@ -46,6 +48,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
data.DeviceId = ammeterInfo.MeterId;
|
||||
data.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
data.FocusId = ammeterInfo.FocusId;
|
||||
}
|
||||
UnitDataAnalysis<AnalysisBaseDto<decimal?>> unitDataAnalysis = new UnitDataAnalysis<AnalysisBaseDto<decimal?>>
|
||||
{
|
||||
@ -60,7 +63,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = 1,//密度-间隔,
|
||||
DensityUnit = DensityUnit.Month,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
@ -128,9 +132,9 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
meter.TimeSpan = readingDate;
|
||||
}
|
||||
meter.DataType = dataType;
|
||||
meter.ItemType = dataType;
|
||||
meter.FiledDesc = filedDesc;
|
||||
meter.FiledName = meter.DataType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
meter.FiledName = meter.ItemType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
return meter;
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,6 +9,8 @@ using JiShe.CollectBus.Protocol.T37612012.Appendix;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using static FreeSql.Internal.GlobalFilter;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
@ -46,6 +48,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
data.DeviceId = ammeterInfo.MeterId;
|
||||
data.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
data.FocusId = ammeterInfo.FocusId;
|
||||
}
|
||||
UnitDataAnalysis<AnalysisBaseDto<decimal?>> unitDataAnalysis = new UnitDataAnalysis<AnalysisBaseDto<decimal?>>
|
||||
{
|
||||
@ -60,7 +63,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = 1,//密度-间隔,
|
||||
DensityUnit = DensityUnit.Month,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
@ -128,9 +132,9 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
meter.TimeSpan = readingDate;
|
||||
}
|
||||
meter.DataType = dataType;
|
||||
meter.ItemType = dataType;
|
||||
meter.FiledDesc = filedDesc;
|
||||
meter.FiledName = meter.DataType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
meter.FiledName = meter.ItemType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
return meter;
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,6 +11,7 @@ using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using YamlDotNet.Core.Tokens;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
@ -51,6 +52,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -67,7 +69,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = 1,//密度-间隔,
|
||||
DensityUnit = DensityUnit.Day,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
@ -146,10 +149,10 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
meter.TimeSpan = readingDate;
|
||||
}
|
||||
meter.DataType = i == 1 ? dataType : $"{dataType}_{ i - 1}";
|
||||
meter.ItemType = i == 1 ? dataType : $"{dataType}_{ i - 1}";
|
||||
filedDesc = i == 1 ? filedDesc : filedDesc.Replace("有功", "无功");
|
||||
meter.FiledDesc = filedDesc;
|
||||
meter.FiledName = meter.DataType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
meter.FiledName = meter.ItemType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
list.Add(meter);
|
||||
}
|
||||
return list;
|
||||
|
||||
@ -11,6 +11,7 @@ using JiShe.CollectBus.Common.Extensions;
|
||||
using Volo.Abp.Domain.Entities;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
@ -54,6 +55,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -70,7 +72,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = 1,//密度-间隔,
|
||||
DensityUnit = DensityUnit.Day,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
@ -162,10 +165,10 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
else
|
||||
meter.TimeSpan=tsField;
|
||||
}
|
||||
meter.DataType = i == 1 ? dataType : $"{dataType}_{ i - 1}";
|
||||
meter.ItemType = i == 1 ? dataType : $"{dataType}_{ i - 1}";
|
||||
filedDesc = i == 1 ? filedDesc : filedDesc.Replace("有功", "无功");
|
||||
meter.FiledDesc = filedDesc;
|
||||
meter.FiledName = meter.DataType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
meter.FiledName = meter.ItemType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
list.Add(meter);
|
||||
|
||||
}
|
||||
|
||||
@ -10,6 +10,7 @@ using JiShe.CollectBus.Common.Extensions;
|
||||
using AutoMapper.Internal.Mappers;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
@ -53,6 +54,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -69,7 +71,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = 1,//密度-间隔,
|
||||
DensityUnit = DensityUnit.Day,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
@ -164,10 +167,10 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
else
|
||||
meter.TimeSpan = tsField;
|
||||
}
|
||||
meter.DataType = i == 1 ? dataType : $"{dataType}_{ i - 1}";
|
||||
meter.ItemType = i == 1 ? dataType : $"{dataType}_{ i - 1}";
|
||||
filedDesc = i == 1 ? filedDesc : filedDesc.Replace("有功", "无功");
|
||||
meter.FiledDesc = filedDesc;
|
||||
meter.FiledName = meter.DataType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
meter.FiledName = meter.ItemType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
list.Add(meter);
|
||||
}
|
||||
return list;
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
@ -51,6 +52,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -67,7 +69,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = density,//密度-间隔分钟数,
|
||||
DensityUnit = DensityUnit.Minute,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -9,6 +9,7 @@ using JiShe.CollectBus.Protocol.T37612012.Appendix;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
@ -52,6 +53,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -68,7 +70,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = density,//密度-间隔分钟数,
|
||||
DensityUnit = DensityUnit.Minute,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -9,6 +9,7 @@ using JiShe.CollectBus.Protocol.T37612012.Appendix;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
@ -52,6 +53,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -68,7 +70,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = density,//密度-间隔分钟数,
|
||||
DensityUnit = DensityUnit.Minute,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
@ -51,6 +52,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -67,7 +69,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = density,//密度-间隔分钟数,
|
||||
DensityUnit = DensityUnit.Minute,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -9,6 +9,7 @@ using JiShe.CollectBus.Protocol.T37612012.Appendix;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
@ -52,6 +53,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -68,7 +70,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = density,//密度-间隔分钟数,
|
||||
DensityUnit = DensityUnit.Minute,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -9,6 +9,7 @@ using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.Protocol.T37612012.Appendix;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
@ -52,6 +53,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -68,7 +70,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = density,//密度-间隔分钟数,
|
||||
DensityUnit = DensityUnit.Minute,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
@ -51,6 +52,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -67,7 +69,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = density,//密度-间隔分钟数,
|
||||
DensityUnit = DensityUnit.Minute,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -9,6 +9,7 @@ using JiShe.CollectBus.Protocol.T37612012.Appendix;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
@ -52,6 +53,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -68,7 +70,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = density,//密度-间隔分钟数,
|
||||
DensityUnit = DensityUnit.Minute,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -9,6 +9,7 @@ using JiShe.CollectBus.Protocol.T37612012.Appendix;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
@ -52,6 +53,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -68,7 +70,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = density,//密度-间隔分钟数,
|
||||
DensityUnit = DensityUnit.Minute,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -9,6 +9,7 @@ using JiShe.CollectBus.Protocol.T37612012.Appendix;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
@ -52,6 +53,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -68,7 +70,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = density,//密度-间隔分钟数,
|
||||
DensityUnit = DensityUnit.Minute,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
@ -51,6 +52,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -67,7 +69,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = density,//密度-间隔分钟数,
|
||||
DensityUnit = DensityUnit.Minute,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -9,6 +9,7 @@ using JiShe.CollectBus.Protocol.T37612012.Appendix;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
@ -52,6 +53,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -68,7 +70,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = density,//密度-间隔分钟数,
|
||||
DensityUnit = DensityUnit.Minute,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -9,6 +9,7 @@ using JiShe.CollectBus.Protocol.T37612012.Appendix;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
@ -52,6 +53,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -68,7 +70,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = density,//密度-间隔分钟数,
|
||||
DensityUnit = DensityUnit.Minute,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -9,6 +9,7 @@ using JiShe.CollectBus.Protocol.T37612012.Appendix;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
@ -52,6 +53,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -68,7 +70,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = density,//密度-间隔分钟数,
|
||||
DensityUnit = DensityUnit.Minute,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -9,6 +9,7 @@ using JiShe.CollectBus.Protocol.T37612012.Appendix;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
@ -52,6 +53,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -68,7 +70,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = density,//密度-间隔分钟数,
|
||||
DensityUnit = DensityUnit.Minute,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -9,6 +9,7 @@ using JiShe.CollectBus.Protocol.T37612012.Appendix;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
@ -52,6 +53,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -68,7 +70,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = density,//密度-间隔分钟数,
|
||||
DensityUnit = DensityUnit.Minute,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -9,6 +9,7 @@ using JiShe.CollectBus.Protocol.T37612012.Appendix;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
@ -52,6 +53,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -68,7 +70,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = density,//密度-间隔分钟数,
|
||||
DensityUnit = DensityUnit.Minute,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -9,6 +9,7 @@ using JiShe.CollectBus.Protocol.T37612012.Appendix;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
@ -52,6 +53,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
item.DeviceId = ammeterInfo.MeterId;
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -68,7 +70,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = density,//密度-间隔分钟数,
|
||||
DensityUnit = DensityUnit.Minute,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
await _dataStorage.SaveMultipleDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Protocol.Contracts.Protocol.Dto;
|
||||
@ -55,6 +56,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0EH
|
||||
item.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = ammeterInfo.Address;
|
||||
item.DeviceType = MeterTypeEnum.Focus;
|
||||
item.FocusId = ammeterInfo.FocusId;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -69,7 +71,8 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0EH
|
||||
MessageId = input.MessageId,
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DensityUnit = DensityUnit.None,
|
||||
TimeDensity = -1
|
||||
TimeDensity = -1,
|
||||
DataType = IOTDBDataTypeConst.Event,
|
||||
};
|
||||
// meterData.DataType = "0E_1";
|
||||
result?.Invoke(dto);
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Protocol.Contracts.Protocol.Dto;
|
||||
using JiShe.CollectBus.Protocol.Dto;
|
||||
using JiShe.CollectBus.Protocol.Interfaces;
|
||||
@ -32,8 +34,19 @@ namespace GatherService.WattMeter.AnalysisData.AFN_10H
|
||||
var data = new AnalysisBaseDto<string?>()
|
||||
{
|
||||
FiledDesc = "透读取SIM卡信息",
|
||||
DataValue = AnalysisDataUnit(input.UnitData.HexMessageList)
|
||||
DataValue = AnalysisDataUnit(input.UnitData.HexMessageList),
|
||||
ItemType = $"{input.AFN_FC.AFN.HexToDecStr().PadLeft(2, '0')}_{input.DT.Fn}"
|
||||
};
|
||||
// 查询电表信息
|
||||
AmmeterInfo ammeterInfo = await _dataStorage.GetMeterInfoAsync(data.DeviceType.ToString(), "15");
|
||||
if (ammeterInfo != null)
|
||||
{
|
||||
data.ProjectId = ammeterInfo.ProjectID;
|
||||
data.DeviceId = ammeterInfo.MeterId;
|
||||
data.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
data.FocusId = ammeterInfo.FocusId;
|
||||
}
|
||||
UnitDataAnalysis<AnalysisBaseDto<string?>> dto = new UnitDataAnalysis<AnalysisBaseDto<string?>>
|
||||
{
|
||||
Code = input.A.Code!,
|
||||
@ -45,7 +58,8 @@ namespace GatherService.WattMeter.AnalysisData.AFN_10H
|
||||
MessageId = input.MessageId,
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DensityUnit = DensityUnit.None,
|
||||
TimeDensity = -1
|
||||
TimeDensity = -1,
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
};
|
||||
result?.Invoke(dto);
|
||||
await _dataStorage.SaveDataToIotDbAsync<string?>(dto);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using GatherService.WattMeter.AnalysisData.AFN_10H;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
@ -41,6 +42,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_10H
|
||||
|
||||
List<string> datas = await AnalysisDataUnitAsync(input.UnitData.HexMessageList);
|
||||
AnalysisBaseDto<decimal?> data = GenerateFinalResult(datas);
|
||||
|
||||
// 查询电表信息
|
||||
AmmeterInfo ammeterInfo = await _dataStorage.GetMeterInfoAsync(data.DeviceType.ToString(), "15");
|
||||
if (ammeterInfo != null)
|
||||
@ -49,6 +51,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_10H
|
||||
data.DeviceId = ammeterInfo.MeterId;
|
||||
data.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
data.FocusId = ammeterInfo.FocusId;
|
||||
}
|
||||
UnitDataAnalysis<AnalysisBaseDto<decimal?>> unitDataAnalysis = new UnitDataAnalysis<AnalysisBaseDto<decimal?>>
|
||||
{
|
||||
@ -63,7 +66,9 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_10H
|
||||
MessageId = input.MessageId,
|
||||
TimeDensity = 1,//密度-间隔,
|
||||
DensityUnit = DensityUnit.Hour,
|
||||
ReceivedTime = input.ReceivedTime
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DataType = IOTDBDataTypeConst.Data
|
||||
|
||||
};
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
await _dataStorage.SaveDataToIotDbAsync<decimal?>(unitDataAnalysis);
|
||||
@ -93,10 +98,10 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_10H
|
||||
meter.DataValue = value;
|
||||
}
|
||||
|
||||
meter.DataType = "10_97";
|
||||
meter.ItemType = "10_97";
|
||||
meter.ValidData = data[2].Equals("91") || data[2].Equals("B1");
|
||||
meter.FiledDesc = "电网频率";//"电网频率";
|
||||
meter.FiledName = meter.DataType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
meter.FiledName = meter.ItemType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
return meter;
|
||||
}
|
||||
private async Task<List<string>> AnalysisDataUnitAsync(List<string> hexMessageList)
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Protocol;
|
||||
@ -39,7 +40,8 @@ namespace GatherService.WattMeter.AnalysisData.AFN_10H
|
||||
var data = new AnalysisBaseDto<bool?>()
|
||||
{
|
||||
FiledDesc = "跳合闸",
|
||||
DataValue = (datas[2].Equals("9C") || datas[2].Equals("94")) ? true : false
|
||||
DataValue = (datas[2].Equals("9C") || datas[2].Equals("94")) ? true : false,
|
||||
ItemType= "10_98",
|
||||
};
|
||||
|
||||
// 查询电表信息
|
||||
@ -50,6 +52,7 @@ namespace GatherService.WattMeter.AnalysisData.AFN_10H
|
||||
data.DeviceId = ammeterInfo.MeterId;
|
||||
data.DatabaseBusiID = ammeterInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = ammeterInfo.AmmerterAddress;
|
||||
data.FocusId = ammeterInfo.FocusId;
|
||||
}
|
||||
UnitDataAnalysis<AnalysisBaseDto<bool?>> unitDataAnalysis = new UnitDataAnalysis<AnalysisBaseDto<bool?>>
|
||||
{
|
||||
@ -64,7 +67,8 @@ namespace GatherService.WattMeter.AnalysisData.AFN_10H
|
||||
MessageId = input.MessageId,
|
||||
ReceivedTime = input.ReceivedTime,
|
||||
DensityUnit = DensityUnit.None,
|
||||
TimeDensity = -1
|
||||
TimeDensity = -1,
|
||||
DataType = IOTDBDataTypeConst.Data
|
||||
};
|
||||
result?.Invoke(unitDataAnalysis);
|
||||
await _dataStorage.SaveDataToIotDbAsync(unitDataAnalysis);
|
||||
|
||||
@ -123,7 +123,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
|
||||
DeviceId = $"{data.DeviceId}",
|
||||
DeviceType = $"{data.DeviceType.ToString()}",
|
||||
ProjectId = $"{data.ProjectId}",
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
DataType = analysisBaseDto.DataType,
|
||||
Timestamps = data.TimeSpan!.Value.GetFormatTime(analysisBaseDto.DensityUnit, analysisBaseDto.TimeDensity).GetDateTimeOffset().ToUnixTimeNanoseconds(),
|
||||
SingleMeasuring = (data.FiledName ?? string.Empty, data.DataValue ?? default)
|
||||
};
|
||||
@ -148,16 +148,19 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
|
||||
ProjectId = $"{data.ProjectId}",
|
||||
DeviceType = $"{data.DeviceType}",
|
||||
DeviceId = $"{data.DeviceId}",
|
||||
DataType = analysisBaseDto.DataType,
|
||||
FocusId = data.FocusId,
|
||||
FocusAddress = analysisBaseDto.Code,
|
||||
Timestamps = DateTime.Now.GetDateTimeOffset().ToUnixTimeNanoseconds(),
|
||||
DatabaseBusiID = data.DatabaseBusiID,
|
||||
PendingCopyReadTime = data.TimeSpan.Value.GetFormatTime(analysisBaseDto.DensityUnit, analysisBaseDto.TimeDensity),
|
||||
CreationTime = currentTime,
|
||||
MeterAddress = data.DeviceAddress,
|
||||
MeterAddress = analysisBaseDto.Code == data.DeviceAddress ? "" : data.DeviceAddress, // 判断是否能取到表地址
|
||||
AFN = analysisBaseDto.AFN,
|
||||
Fn = analysisBaseDto.Fn,
|
||||
Seq = analysisBaseDto.PSEQ,
|
||||
MSA = analysisBaseDto.MSA,
|
||||
ItemCode = data.DataType,
|
||||
ItemCode = data.ItemType,
|
||||
TaskMark = taskMark,
|
||||
IsSend = false,
|
||||
ManualOrNot = false,
|
||||
@ -170,7 +173,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
|
||||
ReceivedTime = analysisBaseDto.ReceivedTime,
|
||||
};
|
||||
}
|
||||
|
||||
_runtimeContext.UseTableSessionPool = true; // 使树模型池
|
||||
await _dbProvider.InsertAsync(taskData);
|
||||
//如果无字段名,则不保存数据
|
||||
if (!string.IsNullOrWhiteSpace(data.FiledName))
|
||||
@ -229,7 +232,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
|
||||
DeviceId = $"{item.DeviceId}",
|
||||
DeviceType = $"{item.DeviceType}",
|
||||
ProjectId = $"{item.ProjectId}",
|
||||
DataType = IOTDBDataTypeConst.Data,
|
||||
DataType = analysisBaseDto.DataType,
|
||||
Timestamps = item.TimeSpan!.Value.GetFormatTime(analysisBaseDto.DensityUnit, analysisBaseDto.TimeDensity).GetDateTimeOffset().ToUnixTimeNanoseconds(), // TODO:这里暂时格式化15分钟数据,需要进行调整
|
||||
SingleMeasuring =(item.FiledName ?? string.Empty, item.DataValue ?? default)
|
||||
};
|
||||
@ -254,16 +257,19 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
|
||||
ProjectId = $"{item.ProjectId}",
|
||||
DeviceType = $"{item.DeviceType}",
|
||||
DeviceId = $"{item.DeviceId}",
|
||||
DataType = IOTDBDataTypeConst.Log, // 匹配不到下发记录标记为LOG
|
||||
Timestamps = DateTime.Now.CheckTimePoint().GetDateTimeOffset().ToUnixTimeNanoseconds(),
|
||||
DatabaseBusiID = item.DatabaseBusiID,
|
||||
PendingCopyReadTime = item.TimeSpan.Value.GetFormatTime(analysisBaseDto.DensityUnit, analysisBaseDto.TimeDensity),
|
||||
CreationTime = currentTime,
|
||||
MeterAddress = item.DeviceAddress,
|
||||
FocusId = item.FocusId,
|
||||
FocusAddress = analysisBaseDto.Code,
|
||||
MeterAddress = analysisBaseDto.Code == item.DeviceAddress ? "" : item.DeviceAddress, // 判断是否能取到表地址
|
||||
AFN = analysisBaseDto.AFN,
|
||||
Fn = analysisBaseDto.Fn,
|
||||
Seq = analysisBaseDto.PSEQ,
|
||||
MSA = analysisBaseDto.MSA,
|
||||
ItemCode = item.DataType,
|
||||
ItemCode = item.ItemType,
|
||||
TaskMark = taskMark,
|
||||
IsSend = false,
|
||||
ManualOrNot = false,
|
||||
@ -318,7 +324,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
|
||||
DeviceId = $"{data.DeviceId}",
|
||||
DeviceType = $"{data.DeviceType}",
|
||||
ProjectId = $"{data.ProjectId}",
|
||||
DataType = IOTDBDataTypeConst.Status,
|
||||
DataType = analysisBaseDto.DataType,
|
||||
Timestamps = timestamps,
|
||||
SingleMeasuring = (data.FiledName!, data.DataValue!)
|
||||
};
|
||||
@ -331,7 +337,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
|
||||
DeviceId = $"{data.DeviceId}",
|
||||
DeviceType = $"{data.DeviceType}",
|
||||
ProjectId = $"{data.ProjectId}",
|
||||
DataType = IOTDBDataTypeConst.Status,
|
||||
DataType = analysisBaseDto.DataType,
|
||||
Timestamps = timestamps,
|
||||
SingleMeasuring = (ConcentratorStatusFieldConst.FrameData, analysisBaseDto.ReceivedHexMessage ?? string.Empty)
|
||||
};
|
||||
@ -340,15 +346,15 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
|
||||
await _dbProvider.InsertAsync(treeFrameData);
|
||||
|
||||
// 时间
|
||||
var treeRecordingTimeData = new TreeModelSingleMeasuringEntity<long>()
|
||||
var treeRecordingTimeData = new TreeModelSingleMeasuringEntity<DateTime>()
|
||||
{
|
||||
SystemName = _applicationOptions.SystemType,
|
||||
DeviceId = $"{data.DeviceId}",
|
||||
DeviceType = $"{data.DeviceType}",
|
||||
ProjectId = $"{data.ProjectId}",
|
||||
Timestamps = timestamps,
|
||||
DataType = IOTDBDataTypeConst.Status,
|
||||
SingleMeasuring = (ConcentratorStatusFieldConst.RecordingTime, (data.TimeSpan.HasValue ? data.TimeSpan.Value : DateTime.Now).GetDateTimeOffset().ToUnixTimeNanoseconds())
|
||||
DataType = analysisBaseDto.DataType,
|
||||
SingleMeasuring = (ConcentratorStatusFieldConst.RecordingTime, data.TimeSpan.HasValue ? data.TimeSpan.Value : DateTime.Now)
|
||||
};
|
||||
_runtimeContext.UseTableSessionPool = false; // 使树模型池
|
||||
await _dbProvider.InsertAsync(treeRecordingTimeData);
|
||||
@ -362,16 +368,19 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
|
||||
ProjectId = $"{data.ProjectId}",
|
||||
DeviceType = $"{data.DeviceType}",
|
||||
DeviceId = $"{data.DeviceId}",
|
||||
DataType = analysisBaseDto.DataType,
|
||||
FocusId = data.FocusId,
|
||||
FocusAddress = analysisBaseDto.Code,
|
||||
Timestamps = DateTime.Now.GetDateTimeOffset().ToUnixTimeNanoseconds(),
|
||||
DatabaseBusiID = data.DatabaseBusiID,
|
||||
PendingCopyReadTime = data.TimeSpan!.Value.GetFormatTime(analysisBaseDto.DensityUnit, analysisBaseDto.TimeDensity),
|
||||
CreationTime = currentTime,
|
||||
MeterAddress = data.DeviceAddress,
|
||||
MeterAddress = analysisBaseDto.Code == data.DeviceAddress ? "" : data.DeviceAddress,// 判断是否能取到表地址
|
||||
AFN = analysisBaseDto.AFN,
|
||||
Fn = analysisBaseDto.Fn,
|
||||
Seq = analysisBaseDto.PSEQ,
|
||||
MSA = analysisBaseDto.MSA,
|
||||
ItemCode = data.DataType,
|
||||
ItemCode = data.ItemType,
|
||||
TaskMark = taskMark,
|
||||
IsSend = false,
|
||||
ManualOrNot = false,
|
||||
@ -416,7 +425,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
|
||||
DeviceId = $"{item.DeviceId}",
|
||||
DeviceType = $"{item.DeviceType}",
|
||||
ProjectId = $"{item.ProjectId}",
|
||||
DataType = IOTDBDataTypeConst.Status,
|
||||
DataType = analysisBaseDto.DataType,
|
||||
Timestamps = timestamps,
|
||||
SingleMeasuring = (item.FiledName!, item.DataValue!)
|
||||
};
|
||||
@ -428,7 +437,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
|
||||
SystemName = _applicationOptions.SystemType,
|
||||
DeviceType = $"{item.DeviceType}",
|
||||
ProjectId = $"{item.ProjectId}",
|
||||
DataType = IOTDBDataTypeConst.Status,
|
||||
DataType = analysisBaseDto.DataType,
|
||||
Timestamps = timestamps,
|
||||
SingleMeasuring = (ConcentratorStatusFieldConst.FrameData, analysisBaseDto.ReceivedHexMessage ?? string.Empty)
|
||||
};
|
||||
@ -437,14 +446,14 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
|
||||
await _dbProvider.InsertAsync(treeFrameData);
|
||||
|
||||
// 时间
|
||||
var treeRecordingTimeData = new TreeModelSingleMeasuringEntity<long>()
|
||||
var treeRecordingTimeData = new TreeModelSingleMeasuringEntity<DateTime>()
|
||||
{
|
||||
SystemName = _applicationOptions.SystemType,
|
||||
DeviceType = $"{item.DeviceType}",
|
||||
ProjectId = $"{item.ProjectId}",
|
||||
DataType = IOTDBDataTypeConst.Status,
|
||||
DataType = analysisBaseDto.DataType,
|
||||
Timestamps = timestamps,
|
||||
SingleMeasuring = (ConcentratorStatusFieldConst.RecordingTime, (item.TimeSpan.HasValue ? item.TimeSpan.Value : DateTime.Now).GetDateTimeOffset().ToUnixTimeNanoseconds())
|
||||
SingleMeasuring = (ConcentratorStatusFieldConst.RecordingTime, item.TimeSpan.HasValue ? item.TimeSpan.Value : DateTime.Now)
|
||||
};
|
||||
_runtimeContext.UseTableSessionPool = false; // 使树模型池
|
||||
await _dbProvider.InsertAsync(treeRecordingTimeData);
|
||||
@ -458,16 +467,19 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
|
||||
ProjectId = $"{item.ProjectId}",
|
||||
DeviceType = $"{item.DeviceType}",
|
||||
DeviceId = $"{item.DeviceId}",
|
||||
DataType = analysisBaseDto.DataType,
|
||||
Timestamps = DateTime.Now.GetDateTimeOffset().ToUnixTimeNanoseconds(),
|
||||
DatabaseBusiID = item.DatabaseBusiID,
|
||||
PendingCopyReadTime = item.TimeSpan!.Value.GetFormatTime(analysisBaseDto.DensityUnit, analysisBaseDto.TimeDensity),
|
||||
CreationTime = currentTime,
|
||||
MeterAddress = item.DeviceAddress,
|
||||
FocusId = item.FocusId,
|
||||
FocusAddress = analysisBaseDto.Code,
|
||||
MeterAddress= analysisBaseDto.Code== item.DeviceAddress?"": item.DeviceAddress,// 判断是否能取到表地址
|
||||
AFN = analysisBaseDto.AFN,
|
||||
Fn = analysisBaseDto.Fn,
|
||||
Seq = analysisBaseDto.PSEQ,
|
||||
MSA = analysisBaseDto.MSA,
|
||||
ItemCode = item.DataType,
|
||||
ItemCode = item.ItemType,
|
||||
TaskMark = taskMark,
|
||||
IsSend = false,
|
||||
ManualOrNot = false,
|
||||
|
||||
@ -262,9 +262,9 @@ namespace JiShe.CollectBus.Protocol.T37612012
|
||||
meter.DataValue = value;
|
||||
}
|
||||
}
|
||||
meter.DataType = dataType;
|
||||
meter.ItemType = dataType;
|
||||
meter.FiledDesc = filedDesc;
|
||||
meter.FiledName = meter.DataType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
meter.FiledName = meter.ItemType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
if (DateTime.TryParse(CalculateTimeSpan(i - 3, data[0], density), out DateTime readingDate))
|
||||
meter.TimeSpan = readingDate;
|
||||
list.Add(meter);
|
||||
@ -305,9 +305,9 @@ namespace JiShe.CollectBus.Protocol.T37612012
|
||||
{
|
||||
meter.TimeSpan = readingDate;
|
||||
}
|
||||
meter.DataType = i - index == 0 ? dataType : $"{dataType}_{i - index}";
|
||||
meter.ItemType = i - index == 0 ? dataType : $"{dataType}_{i - index}";
|
||||
meter.FiledDesc = filedDesc;
|
||||
meter.FiledName = meter.DataType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
meter.FiledName = meter.ItemType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
list.Add(meter);
|
||||
}
|
||||
return list;
|
||||
@ -348,9 +348,9 @@ namespace JiShe.CollectBus.Protocol.T37612012
|
||||
{
|
||||
meter.TimeSpan = readingDate;
|
||||
}
|
||||
meter.DataType = i - index == 0 ? dataType : $"{dataType}_{i - index}";
|
||||
meter.ItemType = i - index == 0 ? dataType : $"{dataType}_{i - index}";
|
||||
meter.FiledDesc = filedDesc;
|
||||
meter.FiledName = meter.DataType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
meter.FiledName = meter.ItemType.GetDataFieldByGatherDataType() ?? string.Empty;
|
||||
list.Add(meter);
|
||||
typeIndex++;
|
||||
}
|
||||
@ -385,7 +385,7 @@ namespace JiShe.CollectBus.Protocol.T37612012
|
||||
if (item.ValidData && item.DataValue.HasValue)
|
||||
jfpgSum += item.DataValue.Value;
|
||||
}
|
||||
var totalItem = meterDatas.FirstOrDefault(f => f.DataType.Equals(mark[0]));//meterDatas.Find(f => f.DataType.Equals(mark[0]));
|
||||
var totalItem = meterDatas.FirstOrDefault(f => f.ItemType.Equals(mark[0]));//meterDatas.Find(f => f.DataType.Equals(mark[0]));
|
||||
if (totalItem != null)
|
||||
{
|
||||
var floatingNum = (jfpgSum * 5 / 100);//上下浮动数据
|
||||
|
||||
@ -17,9 +17,9 @@ namespace JiShe.CollectBus.Protocol.Contracts.Protocol.Dto
|
||||
public bool ValidData { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// 数据类型
|
||||
/// 数据项类型
|
||||
/// </summary>
|
||||
public string DataType { get; set; } = null!;
|
||||
public string ItemType { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// 错误码信息
|
||||
@ -67,6 +67,10 @@ namespace JiShe.CollectBus.Protocol.Contracts.Protocol.Dto
|
||||
/// </summary>
|
||||
public string DeviceAddress { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// 集中器ID
|
||||
/// </summary>
|
||||
public int FocusId { get; set; }
|
||||
}
|
||||
|
||||
public class AnalysisBaseDto<T> : AnalysisBaseDto
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@ -60,6 +61,17 @@ namespace JiShe.CollectBus.Protocol.Dto
|
||||
/// 采集密度单位
|
||||
/// </summary>
|
||||
public DensityUnit DensityUnit { get; set; }= DensityUnit.Minute;
|
||||
|
||||
/// <summary>
|
||||
/// 数据类型
|
||||
/// </summary>
|
||||
public string DataType { get; set; }= null!;
|
||||
|
||||
/// <summary>
|
||||
/// 数据项编码
|
||||
/// </summary>
|
||||
public string ItemCode => $"{AFN.HexToDecStr().PadLeft(2, '0')}_{Fn}";
|
||||
|
||||
}
|
||||
|
||||
public class UnitDataAnalysis<T>: UnitDataAnalysis
|
||||
|
||||
@ -25,5 +25,15 @@ namespace JiShe.CollectBus.Common.Consts
|
||||
/// 状态
|
||||
/// </summary>
|
||||
public const string Status = "Status";
|
||||
|
||||
/// <summary>
|
||||
/// 日志
|
||||
/// </summary>
|
||||
public const string Log = "Log";
|
||||
|
||||
/// <summary>
|
||||
/// 参数
|
||||
/// </summary>
|
||||
public const string Param= "Param";
|
||||
}
|
||||
}
|
||||
|
||||
@ -98,6 +98,10 @@ namespace JiShe.CollectBus.Common.Consts
|
||||
public const string Ib = "Ib";
|
||||
public const string Ic = "Ic";
|
||||
|
||||
public const string SZGL = "SZGL";
|
||||
public const string ASZGL = "ASZGL";
|
||||
public const string BSZGL = "BSZGL";
|
||||
public const string CSZGL = "CSZGL";
|
||||
}
|
||||
|
||||
public class ConstGatherDataType
|
||||
@ -150,6 +154,12 @@ namespace JiShe.CollectBus.Common.Consts
|
||||
public const string Ib = "0C_49_Ib"; // 当前电压、电流相位角
|
||||
public const string Ic = "0C_49_Ic"; // 当前电压、电流相位角
|
||||
|
||||
|
||||
public const string SZGL = "0C_25_SZGL"; // 视在功率曲线
|
||||
public const string ASZGL = "0C_25_ASZGL"; // A相视在功率曲线
|
||||
public const string BSZGL = "0C_25_BSZGL"; // B相视在功率曲线
|
||||
public const string CSZGL = "0C_25_CSZGL"; // C相视在功率曲线
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -16,7 +16,6 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link href="libs/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
|
||||
<title>后端服务</title>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
@ -88,7 +88,7 @@
|
||||
"ClusterList": [ "192.168.1.9:6667" ],
|
||||
"PoolSize": 32,
|
||||
"DataBaseName": "energy",
|
||||
"OpenDebugMode": false,
|
||||
"OpenDebugMode": true,
|
||||
"UseTableSessionPoolByDefault": false
|
||||
},
|
||||
"Cassandra": {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user