框架融合
This commit is contained in:
parent
632518c0ce
commit
53b4e16f2d
@ -2,7 +2,7 @@
|
||||
<!-- 定义项目加载属性 -->
|
||||
<PropertyGroup>
|
||||
<!--JiShe.ServicePro版本-->
|
||||
<ServiceProVersion>1.0.5.01</ServiceProVersion>
|
||||
<ServiceProVersion>1.0.5.04 </ServiceProVersion>
|
||||
<!--Volo Abp 版本-->
|
||||
<VoloAbpVersion>9.1.1</VoloAbpVersion>
|
||||
|
||||
|
||||
@ -51,8 +51,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "0.Docs", "0.Docs", "{D8346C
|
||||
readme.md = readme.md
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MainHost", "MainHost", "{A38B5EB3-2F55-44A2-944B-31A73DE91402}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@ -120,8 +118,8 @@ Global
|
||||
{F2840BC7-0188-4606-9126-DADD0F5ABF7A} = {BA4DA3E7-9AD0-47AD-A0E6-A0BB6700DA23}
|
||||
{BD65D04F-08D5-40C1-8C24-77CA0BACB877} = {BA4DA3E7-9AD0-47AD-A0E6-A0BB6700DA23}
|
||||
{78040F9E-3501-4A40-82DF-00A597710F35} = {BA4DA3E7-9AD0-47AD-A0E6-A0BB6700DA23}
|
||||
{077AA5F8-8B61-420C-A6B5-0150A66FDB34} = {A38B5EB3-2F55-44A2-944B-31A73DE91402}
|
||||
{35829A15-4127-4F69-8BDE-9405DEAACA9A} = {A38B5EB3-2F55-44A2-944B-31A73DE91402}
|
||||
{077AA5F8-8B61-420C-A6B5-0150A66FDB34} = {A02F7D8A-04DC-44D6-94D4-3F65712D6B94}
|
||||
{35829A15-4127-4F69-8BDE-9405DEAACA9A} = {A02F7D8A-04DC-44D6-94D4-3F65712D6B94}
|
||||
{AD2F1928-4411-4511-B564-5FB996EC08B9} = {EBF7C01F-9B4F-48E6-8418-2CBFDA51EB0B}
|
||||
{8BA01C3D-297D-42DF-BD63-EF07202A0A67} = {BA4DA3E7-9AD0-47AD-A0E6-A0BB6700DA23}
|
||||
{A377955E-7EA1-6F29-8CF7-774569E93925} = {3C3F9DB2-EC97-4464-B49F-BF1A0C2B46DC}
|
||||
@ -129,7 +127,6 @@ Global
|
||||
{8A61DF78-069B-40B5-8811-614E2960443E} = {3C3F9DB2-EC97-4464-B49F-BF1A0C2B46DC}
|
||||
{E27377CC-E2D3-4237-060F-96EA214D3129} = {3C3F9DB2-EC97-4464-B49F-BF1A0C2B46DC}
|
||||
{75B7D419-C261-577D-58D6-AA3ACED9129F} = {3C3F9DB2-EC97-4464-B49F-BF1A0C2B46DC}
|
||||
{A38B5EB3-2F55-44A2-944B-31A73DE91402} = {A02F7D8A-04DC-44D6-94D4-3F65712D6B94}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {4324B3B4-B60B-4E3C-91D8-59576B4E26DD}
|
||||
|
||||
@ -0,0 +1,8 @@
|
||||
// Global using directives
|
||||
|
||||
global using System.Text;
|
||||
global using Volo.Abp.Modularity;
|
||||
global using JiShe.ServicePro.Enums;
|
||||
global using JiShe.ServicePro.FreeRedisProvider;
|
||||
global using JiShe.ServicePro.Consts;
|
||||
global using JiShe.ServicePro.Core;
|
||||
@ -44,7 +44,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_00H
|
||||
DeviceCacheInfo? deviceInfo = await _dataStorage.GetDeviceInfoAsync(input.A.Code);
|
||||
if (deviceInfo != null)
|
||||
{
|
||||
data.ProjectId = deviceInfo.ProjectID;
|
||||
data.ProjectId = deviceInfo.ProjectId;
|
||||
data.DeviceId = deviceInfo.FocusId;
|
||||
data.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = deviceInfo.FocusAddress;
|
||||
|
||||
@ -39,7 +39,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_00H
|
||||
DeviceCacheInfo? deviceInfo = await _dataStorage.GetDeviceInfoAsync(input.A.Code);
|
||||
if (deviceInfo != null)
|
||||
{
|
||||
data.ProjectId = deviceInfo.ProjectID;
|
||||
data.ProjectId = deviceInfo.ProjectId;
|
||||
data.DeviceId = deviceInfo.FocusId;
|
||||
data.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = deviceInfo.FocusAddress;
|
||||
|
||||
@ -41,7 +41,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_02H
|
||||
DeviceCacheInfo? deviceInfo = await _dataStorage.GetDeviceInfoAsync(input.A.Code);
|
||||
if (deviceInfo != null)
|
||||
{
|
||||
data.ProjectId = deviceInfo.ProjectID;
|
||||
data.ProjectId = deviceInfo.ProjectId;
|
||||
data.DeviceId = deviceInfo.FocusId;
|
||||
data.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = deviceInfo.FocusAddress;
|
||||
|
||||
@ -41,7 +41,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_02H
|
||||
DeviceCacheInfo? deviceInfo = await _dataStorage.GetDeviceInfoAsync(input.A.Code);
|
||||
if (deviceInfo != null)
|
||||
{
|
||||
data.ProjectId = deviceInfo.ProjectID;
|
||||
data.ProjectId = deviceInfo.ProjectId;
|
||||
data.DeviceId = deviceInfo.FocusId;
|
||||
data.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = deviceInfo.FocusAddress;
|
||||
|
||||
@ -41,7 +41,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_02H
|
||||
DeviceCacheInfo? deviceInfo = await _dataStorage.GetDeviceInfoAsync(input.A.Code);
|
||||
if (deviceInfo != null)
|
||||
{
|
||||
data.ProjectId = deviceInfo.ProjectID;
|
||||
data.ProjectId = deviceInfo.ProjectId;
|
||||
data.DeviceId = deviceInfo.FocusId;
|
||||
data.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = deviceInfo.FocusAddress;
|
||||
|
||||
@ -48,7 +48,7 @@ namespace JiShe.CollectBus.Protocol.AnalysisData.AFN_09H
|
||||
DeviceCacheInfo? deviceInfo = await _dataStorage.GetDeviceInfoAsync(input.A.Code);
|
||||
if (deviceInfo != null)
|
||||
{
|
||||
data.ProjectId = deviceInfo.ProjectID;
|
||||
data.ProjectId = deviceInfo.ProjectId;
|
||||
data.DeviceId = deviceInfo.FocusId;
|
||||
data.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = deviceInfo.FocusAddress;
|
||||
|
||||
@ -42,7 +42,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_09H
|
||||
DeviceCacheInfo? deviceInfo = await _dataStorage.GetDeviceInfoAsync(input.A.Code);
|
||||
if (deviceInfo != null)
|
||||
{
|
||||
data.ProjectId = deviceInfo.ProjectID;
|
||||
data.ProjectId = deviceInfo.ProjectId;
|
||||
data.DeviceId = deviceInfo.FocusId;
|
||||
data.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = deviceInfo.FocusAddress;
|
||||
|
||||
@ -47,7 +47,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0AH
|
||||
DeviceCacheInfo? deviceInfo = await _dataStorage.GetDeviceInfoAsync(input.A.Code);
|
||||
if (deviceInfo != null)
|
||||
{
|
||||
data.ProjectId = deviceInfo.ProjectID;
|
||||
data.ProjectId = deviceInfo.ProjectId;
|
||||
data.DeviceId = deviceInfo.FocusId;
|
||||
data.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = deviceInfo.FocusAddress;
|
||||
|
||||
@ -46,7 +46,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0AH
|
||||
DeviceCacheInfo? deviceInfo = await _dataStorage.GetDeviceInfoAsync(input.A.Code);
|
||||
if (deviceInfo != null)
|
||||
{
|
||||
data.ProjectId = deviceInfo.ProjectID;
|
||||
data.ProjectId = deviceInfo.ProjectId;
|
||||
data.DeviceId = deviceInfo.FocusId;
|
||||
data.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = deviceInfo.FocusAddress;
|
||||
|
||||
@ -41,7 +41,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0AH
|
||||
DeviceCacheInfo? deviceInfo = await _dataStorage.GetDeviceInfoAsync(input.A.Code);
|
||||
if (deviceInfo != null)
|
||||
{
|
||||
data.ProjectId = deviceInfo.ProjectID;
|
||||
data.ProjectId = deviceInfo.ProjectId;
|
||||
data.DeviceId = deviceInfo.FocusId;
|
||||
data.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = deviceInfo.FocusAddress;
|
||||
|
||||
@ -58,7 +58,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0CH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -46,7 +46,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0CH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -47,7 +47,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0CH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -49,7 +49,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0CH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -47,7 +47,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0CH
|
||||
DeviceCacheInfo? deviceInfo = await _dataStorage.GetDeviceInfoAsync(input.A.Code, input.DA.Pn);
|
||||
if (deviceInfo != null)
|
||||
{
|
||||
data.ProjectId = deviceInfo.ProjectID;
|
||||
data.ProjectId = deviceInfo.ProjectId;
|
||||
data.DeviceId = deviceInfo.MeterId;
|
||||
data.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -47,7 +47,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
DeviceCacheInfo? deviceInfo = await _dataStorage.GetDeviceInfoAsync(input.A.Code, input.DA.Pn);
|
||||
if (deviceInfo != null)
|
||||
{
|
||||
data.ProjectId = deviceInfo.ProjectID;
|
||||
data.ProjectId = deviceInfo.ProjectId;
|
||||
data.DeviceId = deviceInfo.MeterId;
|
||||
data.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -47,7 +47,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
DeviceCacheInfo? deviceInfo = await _dataStorage.GetDeviceInfoAsync(input.A.Code, input.DA.Pn);
|
||||
if (deviceInfo != null)
|
||||
{
|
||||
data.ProjectId = deviceInfo.ProjectID;
|
||||
data.ProjectId = deviceInfo.ProjectId;
|
||||
data.DeviceId = deviceInfo.MeterId;
|
||||
data.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -76,7 +76,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -46,7 +46,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
DeviceCacheInfo? deviceInfo = await _dataStorage.GetDeviceInfoAsync(input.A.Code, input.DA.Pn);
|
||||
if (deviceInfo != null)
|
||||
{
|
||||
data.ProjectId = deviceInfo.ProjectID;
|
||||
data.ProjectId = deviceInfo.ProjectId;
|
||||
data.DeviceId = deviceInfo.MeterId;
|
||||
data.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -52,7 +52,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
DeviceCacheInfo? deviceInfo = await _dataStorage.GetDeviceInfoAsync(input.A.Code, input.DA.Pn);
|
||||
if (deviceInfo != null)
|
||||
{
|
||||
data.ProjectId = deviceInfo.ProjectID;
|
||||
data.ProjectId = deviceInfo.ProjectId;
|
||||
data.DeviceId = deviceInfo.MeterId;
|
||||
data.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -71,7 +71,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AFN_0CH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -52,7 +52,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -50,7 +50,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -51,7 +51,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -52,7 +52,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -51,7 +51,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -51,7 +51,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -51,7 +51,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -50,7 +50,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -51,7 +51,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -50,7 +50,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -50,7 +50,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -50,7 +50,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -50,7 +50,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -51,7 +51,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -50,7 +50,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -49,7 +49,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -50,7 +50,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -49,7 +49,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -49,7 +49,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -49,7 +49,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -49,7 +49,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -49,7 +49,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -48,7 +48,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -49,7 +49,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -49,7 +49,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -48,7 +48,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -49,7 +49,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -49,7 +49,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -48,7 +48,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -49,7 +49,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -50,7 +50,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -45,7 +45,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
DeviceCacheInfo? deviceInfo = await _dataStorage.GetDeviceInfoAsync(input.A.Code, input.DA.Pn);
|
||||
if (deviceInfo != null)
|
||||
{
|
||||
data.ProjectId = deviceInfo.ProjectID;
|
||||
data.ProjectId = deviceInfo.ProjectId;
|
||||
data.DeviceId = deviceInfo.MeterId;
|
||||
data.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -46,7 +46,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
DeviceCacheInfo? deviceInfo = await _dataStorage.GetDeviceInfoAsync(input.A.Code, input.DA.Pn);
|
||||
if (deviceInfo != null)
|
||||
{
|
||||
data.ProjectId = deviceInfo.ProjectID;
|
||||
data.ProjectId = deviceInfo.ProjectId;
|
||||
data.DeviceId = deviceInfo.MeterId;
|
||||
data.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -46,7 +46,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
DeviceCacheInfo? deviceInfo = await _dataStorage.GetDeviceInfoAsync(input.A.Code, input.DA.Pn);
|
||||
if (deviceInfo != null)
|
||||
{
|
||||
data.ProjectId = deviceInfo.ProjectID;
|
||||
data.ProjectId = deviceInfo.ProjectId;
|
||||
data.DeviceId = deviceInfo.MeterId;
|
||||
data.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -51,7 +51,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -54,7 +54,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -53,7 +53,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -51,7 +51,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -52,7 +52,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -52,7 +52,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -51,7 +51,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -52,7 +52,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -52,7 +52,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -51,7 +51,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -52,7 +52,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -52,7 +52,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -52,7 +52,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -51,7 +51,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -52,7 +52,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -52,7 +52,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -52,7 +52,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -52,7 +52,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -52,7 +52,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -52,7 +52,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -52,7 +52,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0DH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -54,7 +54,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_0EH
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -72,7 +72,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_10H
|
||||
DeviceCacheInfo? deviceInfo = await _dataStorage.GetDeviceInfoAsync(input.A.Code);
|
||||
if (deviceInfo != null)
|
||||
{
|
||||
data.ProjectId = deviceInfo.ProjectID;
|
||||
data.ProjectId = deviceInfo.ProjectId;
|
||||
data.DeviceId = deviceInfo.FocusId;
|
||||
data.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = deviceInfo.FocusAddress;
|
||||
|
||||
@ -43,7 +43,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_10H.Ammeter
|
||||
DeviceCacheInfo? deviceInfo = await _dataStorage.GetDeviceInfoAsync(input.A.Code, input.DA.Pn);
|
||||
if (deviceInfo != null)
|
||||
{
|
||||
data.ProjectId = deviceInfo.ProjectID;
|
||||
data.ProjectId = deviceInfo.ProjectId;
|
||||
data.DeviceId = deviceInfo.MeterId;
|
||||
data.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -49,7 +49,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_10H.Ammeter
|
||||
DeviceCacheInfo? deviceInfo = await _dataStorage.GetDeviceInfoAsync(input.A.Code, input.DA.Pn, datas[1]);
|
||||
if (deviceInfo != null)
|
||||
{
|
||||
data.ProjectId = deviceInfo.ProjectID;
|
||||
data.ProjectId = deviceInfo.ProjectId;
|
||||
data.DeviceId = deviceInfo.MeterId;
|
||||
data.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -50,7 +50,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_10H.Ammeter
|
||||
DeviceCacheInfo? deviceInfo = await _dataStorage.GetDeviceInfoAsync(input.A.Code, input.DA.Pn);
|
||||
if (deviceInfo != null)
|
||||
{
|
||||
data.ProjectId = deviceInfo.ProjectID;
|
||||
data.ProjectId = deviceInfo.ProjectId;
|
||||
data.DeviceId = deviceInfo.MeterId;
|
||||
data.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
data.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -47,7 +47,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData.AFN_10H.Watermeter
|
||||
{
|
||||
list.ForEach(item =>
|
||||
{
|
||||
item.ProjectId = deviceInfo.ProjectID;
|
||||
item.ProjectId = deviceInfo.ProjectId;
|
||||
item.DeviceId = deviceInfo.MeterId;
|
||||
item.DatabaseBusiID = deviceInfo.DatabaseBusiID;
|
||||
item.DeviceAddress = deviceInfo.MeterAddress;
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
using FreeRedis;
|
||||
using JiShe.CollectBus.Common;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.Encrypt;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.Protocol.Contracts.Protocol.Dto;
|
||||
using JiShe.CollectBus.Protocol.Dto;
|
||||
using JiShe.ServicePro.FreeRedisProvider;
|
||||
using JiShe.ServicePro.Consts;
|
||||
using JiShe.ServicePro.Core;
|
||||
using JiShe.ServicePro.Encrypt;
|
||||
using JiShe.ServicePro.IoTDBManagement.Model;
|
||||
using JiShe.ServicePro.IoTDBManagement.Options;
|
||||
using JiShe.ServicePro.IoTDBManagement.SessionPools;
|
||||
@ -17,6 +17,7 @@ using Microsoft.Extensions.Options;
|
||||
using System.Threading.Channels;
|
||||
using Volo.Abp.DependencyInjection;
|
||||
using Volo.Abp.Guids;
|
||||
using static FreeSql.Internal.GlobalFilter;
|
||||
using static JiShe.CollectBus.Common.Consts.T37612012PacketItemCodeConst;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
|
||||
@ -141,7 +142,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
|
||||
DeviceId = $"{data.DeviceId}",
|
||||
DeviceType = $"{data.DeviceType.ToString()}",
|
||||
ProjectId = $"{data.ProjectId}",
|
||||
DataType = analysisBaseDto.DataType,
|
||||
IoTDataType = analysisBaseDto.DataType,
|
||||
Timestamps = data.TimeSpan!.Value.GetFormatTime(analysisBaseDto.DensityUnit, analysisBaseDto.TimeDensity).GetDateTimeOffset().ToUnixTimeNanoseconds(),
|
||||
SingleMeasuring = (data.FiledName ?? string.Empty, data.DataValue ?? default)
|
||||
};
|
||||
@ -168,7 +169,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
|
||||
ProjectId = $"{data.ProjectId}",
|
||||
DeviceType = $"{data.DeviceType}",
|
||||
DeviceId = $"{data.DeviceId}",
|
||||
DataType = analysisBaseDto.DataType,
|
||||
IoTDataType = analysisBaseDto.DataType,
|
||||
FocusId = data.FocusId,
|
||||
FocusAddress = analysisBaseDto.Code,
|
||||
Timestamps = DateTime.Now.GetDateTimeOffset().ToUnixTimeNanoseconds(),
|
||||
@ -206,7 +207,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
|
||||
DeviceId = $"{data.DeviceId}",
|
||||
DeviceType = $"{data.DeviceType}",
|
||||
ProjectId = $"{data.ProjectId}",
|
||||
DataType = analysisBaseDto.DataType,
|
||||
IoTDataType = analysisBaseDto.DataType,
|
||||
Timestamps = meter.Timestamps,
|
||||
SingleMeasuring = (IotDbFieldConst.IsSync, false)
|
||||
};
|
||||
@ -219,7 +220,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
|
||||
DeviceId = $"{data.DeviceId}",
|
||||
DeviceType = $"{data.DeviceType}",
|
||||
ProjectId = $"{data.ProjectId}",
|
||||
DataType = analysisBaseDto.DataType,
|
||||
IoTDataType = analysisBaseDto.DataType,
|
||||
Timestamps = meter.Timestamps,
|
||||
SingleMeasuring = (IotDbFieldConst.DatabaseBusiID, data.DatabaseBusiID)
|
||||
};
|
||||
@ -279,7 +280,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
|
||||
DeviceId = $"{item.DeviceId}",
|
||||
DeviceType = $"{item.DeviceType}",
|
||||
ProjectId = $"{item.ProjectId}",
|
||||
DataType = analysisBaseDto.DataType,
|
||||
IoTDataType = analysisBaseDto.DataType,
|
||||
Timestamps = item.TimeSpan!.Value.GetFormatTime(analysisBaseDto.DensityUnit, analysisBaseDto.TimeDensity).GetDateTimeOffset().ToUnixTimeNanoseconds(), // TODO:这里暂时格式化15分钟数据,需要进行调整
|
||||
SingleMeasuring =(item.FiledName ?? string.Empty, item.DataValue ?? default)
|
||||
};
|
||||
@ -305,7 +306,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
|
||||
ProjectId = $"{item.ProjectId}",
|
||||
DeviceType = $"{item.DeviceType}",
|
||||
DeviceId = $"{item.DeviceId}",
|
||||
DataType = IOTDBDataTypeConst.Log, // 匹配不到下发记录标记为LOG
|
||||
IoTDataType = IOTDBDataTypeConst.Log, // 匹配不到下发记录标记为LOG
|
||||
Timestamps = DateTime.Now.CheckTimePoint().GetDateTimeOffset().ToUnixTimeNanoseconds(),
|
||||
DatabaseBusiID = item.DatabaseBusiID,
|
||||
PendingCopyReadTime = item.TimeSpan.Value.GetFormatTime(analysisBaseDto.DensityUnit, analysisBaseDto.TimeDensity),
|
||||
@ -333,7 +334,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
|
||||
}
|
||||
meterReadingTelemetryPacketInfos.Add(taskData);
|
||||
//如果无字段名,则不保存数据,如saveData=false 也不保存数据
|
||||
if (!string.IsNullOrWhiteSpace(item.FiledName) && item.ProjectId>0)
|
||||
if (!string.IsNullOrWhiteSpace(item.FiledName) && !string.IsNullOrWhiteSpace(item.ProjectId))
|
||||
{
|
||||
treeModelSingleMeasuringEntities.Add(meter);
|
||||
|
||||
@ -344,11 +345,11 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
|
||||
DeviceId = $"{item.DeviceId}",
|
||||
DeviceType = $"{item.DeviceType}",
|
||||
ProjectId = $"{item.ProjectId}",
|
||||
DataType = analysisBaseDto.DataType,
|
||||
IoTDataType = analysisBaseDto.DataType,
|
||||
Timestamps = meter.Timestamps,
|
||||
SingleMeasuring = (IotDbFieldConst.IsSync, false)
|
||||
};
|
||||
if(!meterIsSyncs.Any(a=> a.DataType == meterIsSync.DataType && a.ProjectId == meterIsSync.ProjectId && a.SystemName== meterIsSync.SystemName && a.DeviceId== meterIsSync.DeviceId && a.Timestamps== meterIsSync.Timestamps))
|
||||
if(!meterIsSyncs.Any(a=> a.IoTDataType == meterIsSync.IoTDataType && a.ProjectId == meterIsSync.ProjectId && a.SystemName== meterIsSync.SystemName && a.DeviceId== meterIsSync.DeviceId && a.Timestamps== meterIsSync.Timestamps))
|
||||
meterIsSyncs.Add(meterIsSync);
|
||||
|
||||
// 数据库业务ID
|
||||
@ -358,11 +359,11 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
|
||||
DeviceId = $"{item.DeviceId}",
|
||||
DeviceType = $"{item.DeviceType}",
|
||||
ProjectId = $"{item.ProjectId}",
|
||||
DataType = analysisBaseDto.DataType,
|
||||
IoTDataType = analysisBaseDto.DataType,
|
||||
Timestamps = meter.Timestamps,
|
||||
SingleMeasuring = (IotDbFieldConst.DatabaseBusiID, item.DatabaseBusiID)
|
||||
};
|
||||
if (!meterDataBaseIDs.Any(a => a.DataType == meterIsSync.DataType && a.ProjectId == meterIsSync.ProjectId && a.SystemName == meterIsSync.SystemName && a.DeviceId == meterIsSync.DeviceId && a.Timestamps == meterIsSync.Timestamps))
|
||||
if (!meterDataBaseIDs.Any(a => a.IoTDataType == meterIsSync.IoTDataType && a.ProjectId == meterIsSync.ProjectId && a.SystemName == meterIsSync.SystemName && a.DeviceId == meterIsSync.DeviceId && a.Timestamps == meterIsSync.Timestamps))
|
||||
meterDataBaseIDs.Add(meterIsDatabaseBusiID);
|
||||
|
||||
}
|
||||
@ -398,7 +399,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
|
||||
if (!data.TimeSpan.HasValue)
|
||||
data.TimeSpan = analysisBaseDto.ReceivedTime;
|
||||
// 类型(心跳,登录,上电,掉电)
|
||||
if (data.ProjectId > 0)
|
||||
if (!string.IsNullOrWhiteSpace(data.ProjectId))
|
||||
{
|
||||
long timestamps = DateTime.Now.GetDateTimeOffset().ToUnixTimeNanoseconds();
|
||||
var treeData = new TreeModelSingleMeasuringEntity<T>()
|
||||
@ -407,7 +408,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
|
||||
DeviceId = $"{data.DeviceId}",
|
||||
DeviceType = $"{data.DeviceType}",
|
||||
ProjectId = $"{data.ProjectId}",
|
||||
DataType = IOTDBDataTypeConst.Status,
|
||||
IoTDataType = IOTDBDataTypeConst.Status,
|
||||
Timestamps = timestamps,
|
||||
SingleMeasuring = (data.FiledName!, data.DataValue!)
|
||||
};
|
||||
@ -419,7 +420,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
|
||||
DeviceId = $"{data.DeviceId}",
|
||||
DeviceType = $"{data.DeviceType}",
|
||||
ProjectId = $"{data.ProjectId}",
|
||||
DataType = IOTDBDataTypeConst.Status,
|
||||
IoTDataType = IOTDBDataTypeConst.Status,
|
||||
Timestamps = timestamps,
|
||||
SingleMeasuring = (IotDbFieldConst.FrameData, analysisBaseDto.ReceivedHexMessage ?? string.Empty)
|
||||
};
|
||||
@ -433,7 +434,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
|
||||
DeviceType = $"{data.DeviceType}",
|
||||
ProjectId = $"{data.ProjectId}",
|
||||
Timestamps = timestamps,
|
||||
DataType = IOTDBDataTypeConst.Status,
|
||||
IoTDataType = IOTDBDataTypeConst.Status,
|
||||
SingleMeasuring = (IotDbFieldConst.RecordingTime, data.TimeSpan.HasValue ? data.TimeSpan.Value : DateTime.Now)
|
||||
};
|
||||
await _dbProvider.GetSessionPool(false).InsertAsync(treeRecordingTimeData);
|
||||
@ -450,7 +451,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
|
||||
ProjectId = $"{data.ProjectId}",
|
||||
DeviceType = $"{data.DeviceType}",
|
||||
DeviceId = $"{data.DeviceId}",
|
||||
DataType = analysisBaseDto.DataType,
|
||||
IoTDataType = analysisBaseDto.DataType,
|
||||
FocusId = data.FocusId,
|
||||
FocusAddress = analysisBaseDto.Code,
|
||||
Timestamps = DateTime.Now.GetDateTimeOffset().ToUnixTimeNanoseconds(),
|
||||
@ -500,7 +501,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
|
||||
if (!item.TimeSpan.HasValue)
|
||||
item.TimeSpan = analysisBaseDto.ReceivedTime;
|
||||
// 类型(心跳,登录,上电,掉电)
|
||||
if (item.ProjectId > 0)
|
||||
if (!string.IsNullOrWhiteSpace(item.ProjectId))
|
||||
{
|
||||
long timestamps = DateTime.Now.GetDateTimeOffset().ToUnixTimeNanoseconds();
|
||||
var treeData = new TreeModelSingleMeasuringEntity<T>()
|
||||
@ -509,7 +510,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
|
||||
DeviceId = $"{item.DeviceId}",
|
||||
DeviceType = $"{item.DeviceType}",
|
||||
ProjectId = $"{item.ProjectId}",
|
||||
DataType = IOTDBDataTypeConst.Status,
|
||||
IoTDataType = IOTDBDataTypeConst.Status,
|
||||
Timestamps = timestamps,
|
||||
SingleMeasuring = (item.FiledName!, item.DataValue!)
|
||||
};
|
||||
@ -520,7 +521,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
|
||||
SystemName = _applicationOptions.SystemType,
|
||||
DeviceType = $"{item.DeviceType}",
|
||||
ProjectId = $"{item.ProjectId}",
|
||||
DataType = IOTDBDataTypeConst.Status,
|
||||
IoTDataType = IOTDBDataTypeConst.Status,
|
||||
Timestamps = timestamps,
|
||||
SingleMeasuring = (IotDbFieldConst.FrameData, analysisBaseDto.ReceivedHexMessage ?? string.Empty)
|
||||
};
|
||||
@ -533,7 +534,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
|
||||
SystemName = _applicationOptions.SystemType,
|
||||
DeviceType = $"{item.DeviceType}",
|
||||
ProjectId = $"{item.ProjectId}",
|
||||
DataType = IOTDBDataTypeConst.Status,
|
||||
IoTDataType = IOTDBDataTypeConst.Status,
|
||||
Timestamps = timestamps,
|
||||
SingleMeasuring = (IotDbFieldConst.RecordingTime, item.TimeSpan.HasValue ? item.TimeSpan.Value : DateTime.Now)
|
||||
};
|
||||
@ -552,7 +553,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
|
||||
ProjectId = $"{item.ProjectId}",
|
||||
DeviceType = $"{item.DeviceType}",
|
||||
DeviceId = $"{item.DeviceId}",
|
||||
DataType = analysisBaseDto.DataType,
|
||||
IoTDataType = analysisBaseDto.DataType,
|
||||
Timestamps = DateTime.Now.GetDateTimeOffset().ToUnixTimeNanoseconds(),
|
||||
DatabaseBusiID = item.DatabaseBusiID,
|
||||
PendingCopyReadTime = item.TimeSpan!.Value.GetFormatTime(analysisBaseDto.DensityUnit, analysisBaseDto.TimeDensity),
|
||||
|
||||
@ -4,3 +4,5 @@ global using System.Text;
|
||||
global using Volo.Abp.Modularity;
|
||||
global using JiShe.ServicePro.Enums;
|
||||
global using JiShe.ServicePro.FreeRedisProvider;
|
||||
global using JiShe.ServicePro.Consts;
|
||||
global using JiShe.ServicePro.Core;
|
||||
@ -0,0 +1,8 @@
|
||||
// Global using directives
|
||||
|
||||
global using System.Text;
|
||||
global using Volo.Abp.Modularity;
|
||||
global using JiShe.ServicePro.Enums;
|
||||
global using JiShe.ServicePro.FreeRedisProvider;
|
||||
global using JiShe.ServicePro.Consts;
|
||||
global using JiShe.ServicePro.Core;
|
||||
@ -9,3 +9,5 @@ global using JiShe.ServicePro.IoTDBManagement.SessionPools;
|
||||
global using JiShe.ServicePro.IoTDBManagement.TableModels;
|
||||
global using JiShe.ServicePro.Kafka.Consts;
|
||||
global using JiShe.ServicePro.Kafka.Internal;
|
||||
global using JiShe.ServicePro.Consts;
|
||||
global using JiShe.ServicePro.Core;
|
||||
@ -12,3 +12,5 @@ global using JiShe.ServicePro.Kafka.Internal;
|
||||
global using JiShe.ServicePro.Kafka.Attributes;
|
||||
global using JiShe.ServicePro.FreeSqlProvider;
|
||||
global using JiShe.ServicePro.Kafka.Producer;
|
||||
global using JiShe.ServicePro.Consts;
|
||||
global using JiShe.ServicePro.Core;
|
||||
|
||||
@ -9,6 +9,12 @@
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="Mappers\**" />
|
||||
<EmbeddedResource Remove="Mappers\**" />
|
||||
<None Remove="Mappers\**" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="FodyWeavers.xml" />
|
||||
<None Remove="JiShe.CollectBus.Application.abppkg" />
|
||||
@ -30,8 +36,4 @@
|
||||
<ProjectReference Include="..\JiShe.CollectBus.Application.Contracts\JiShe.CollectBus.Application.Contracts.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Mappers\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
using JiShe.CollectBus.Common;
|
||||
using JiShe.CollectBus.Common.Consts;
|
||||
using JiShe.CollectBus.Common.DeviceBalanceControl;
|
||||
using JiShe.CollectBus.Common.Encrypt;
|
||||
using JiShe.CollectBus.Common.Enums;
|
||||
using JiShe.CollectBus.Common.Extensions;
|
||||
using JiShe.CollectBus.Common.Helpers;
|
||||
using JiShe.CollectBus.Common.Models;
|
||||
using JiShe.CollectBus.DataChannels;
|
||||
using JiShe.CollectBus.GatherItem;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Protocol.Interfaces;
|
||||
using JiShe.CollectBus.Protocol.Models;
|
||||
using JiShe.ServicePro.Core;
|
||||
using JiShe.ServicePro.Encrypt;
|
||||
using Mapster;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
@ -1524,7 +1524,7 @@ namespace JiShe.CollectBus.ScheduledMeterReading
|
||||
return new MeterReadingTelemetryPacketInfo()
|
||||
{
|
||||
SystemName = SystemType,
|
||||
ProjectId = $"{ammeterInfo.ProjectID}",
|
||||
ProjectId = $"{ammeterInfo.ProjectId}",
|
||||
DeviceType = $"{MeterTypeEnum.Ammeter}",
|
||||
DeviceId = $"{ammeterInfo.MeterId}",
|
||||
Timestamps = timestamps,
|
||||
|
||||
@ -7,6 +7,8 @@ using JiShe.CollectBus.GatherItem;
|
||||
using JiShe.CollectBus.IotSystems.Ammeters;
|
||||
using JiShe.CollectBus.Protocol.Interfaces;
|
||||
using JiShe.CollectBus.Protocol.Models;
|
||||
using JiShe.ServicePro.Consts;
|
||||
using JiShe.ServicePro.Core;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
@ -210,9 +212,14 @@ namespace JiShe.CollectBus.ScheduledMeterReading
|
||||
TimeDensity = 15,
|
||||
BrandType = "DTS1980",
|
||||
Password = "000000",
|
||||
ProjectID = 1,
|
||||
MeterType = MeterTypeEnum.Ammeter,
|
||||
MeteringPort = MeteringPortConst.MeteringPortTwo,
|
||||
SystemName = SystemType,
|
||||
IoTDataType = IOTDBDataTypeConst.Data,
|
||||
ProjectId = "1",
|
||||
DeviceType = JiShe.ServicePro.Enums.MeterTypeEnum.Ammeter.ToString(),
|
||||
DeviceId = "78973",
|
||||
|
||||
});
|
||||
|
||||
FreeRedisProvider.Instance.Set(redisCacheDeviceCacheInfoHashKeyTemp, ammeterInfos);
|
||||
@ -591,18 +598,22 @@ namespace JiShe.CollectBus.ScheduledMeterReading
|
||||
BrandType = "云集",
|
||||
MeterTypeName = "水表",
|
||||
MeterType = MeterTypeEnum.WaterMeter,
|
||||
ProjectID = 1,
|
||||
MeteringPort = MeteringPortConst.MeteringPortTwo,
|
||||
Password = "000000",
|
||||
LinkType = "RS-485",
|
||||
TimesRate = 1.0000m,
|
||||
Protocol = 30,
|
||||
SystemName = SystemType,
|
||||
IoTDataType = IOTDBDataTypeConst.Data,
|
||||
ProjectId = "1",
|
||||
DeviceType = JiShe.ServicePro.Enums.MeterTypeEnum.WaterMeter.ToString(),
|
||||
DeviceId = "1025",
|
||||
});
|
||||
|
||||
FreeRedisProvider.Instance.Set(redisCacheDeviceCacheInfoHashKeyTemp, DeviceCacheInfos);
|
||||
}
|
||||
|
||||
return DeviceCacheInfos;
|
||||
return DeviceCacheInfos;
|
||||
#else
|
||||
string sql = $@"SELECT
|
||||
A.ID as MeterId,
|
||||
|
||||
@ -4,3 +4,5 @@ global using System.Text;
|
||||
global using Volo.Abp.Modularity;
|
||||
global using JiShe.ServicePro.Enums;
|
||||
global using JiShe.ServicePro.FreeRedisProvider;
|
||||
global using JiShe.ServicePro.Consts;
|
||||
global using JiShe.ServicePro.Core;
|
||||
@ -1,5 +1,6 @@
|
||||
using FreeSql.DataAnnotations;
|
||||
using JiShe.CollectBus.Common.Models;
|
||||
using JiShe.ServicePro.Core;
|
||||
using JiShe.ServicePro.FreeRedisProvider;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -21,7 +22,7 @@ namespace JiShe.CollectBus.IotSystems.Ammeters
|
||||
/// ZSet排序索引分数值,具体值可以根据不同业务场景进行定义,例如时间戳
|
||||
/// </summary>
|
||||
[Column(IsIgnore = true)]
|
||||
public override long ScoreValue => Common.Helpers.CommonHelper.GetFocusScores(FocusAddress,MeteringCode);
|
||||
public override long ScoreValue => CommonHelper.GetFocusScores(FocusAddress,MeteringCode);
|
||||
|
||||
/// <summary>
|
||||
/// 电表名称
|
||||
|
||||
@ -45,7 +45,7 @@ namespace JiShe.CollectBus.Protocol.Contracts.Protocol.Dto
|
||||
/// <summary>
|
||||
/// 项目Id
|
||||
/// </summary>
|
||||
public int ProjectId { get; set; }
|
||||
public string ProjectId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备ID(电表ID,水表ID,气表ID,集中器ID等)
|
||||
|
||||
@ -1,41 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JiShe.CollectBus.Common.Consts
|
||||
{
|
||||
/// <summary>
|
||||
/// 常用常量管理
|
||||
/// </summary>
|
||||
public class CommonConst
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Kafka
|
||||
/// </summary>
|
||||
public const string Kafka = "Kafka";
|
||||
|
||||
/// <summary>
|
||||
/// 服务器标识
|
||||
/// </summary>
|
||||
public const string ServerTagName = $"{Kafka}:ServerTagName";
|
||||
|
||||
/// <summary>
|
||||
/// Kafka副本数量
|
||||
/// </summary>
|
||||
public const string KafkaReplicationFactor = $"{Kafka}:KafkaReplicationFactor";
|
||||
|
||||
/// <summary>
|
||||
/// Kafka主题分区数量
|
||||
/// </summary>
|
||||
public const string NumPartitions = $"{Kafka}:NumPartitions";
|
||||
|
||||
/// <summary>
|
||||
/// 首次采集时间
|
||||
/// </summary>
|
||||
public const string FirstCollectionTime = "FirstCollectionTime";
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,39 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JiShe.CollectBus.Common.Consts
|
||||
{
|
||||
/// <summary>
|
||||
/// IOTDB数据树类型
|
||||
/// </summary>
|
||||
public class IOTDBDataTypeConst
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据
|
||||
/// </summary>
|
||||
public const string Data = "Data";
|
||||
|
||||
/// <summary>
|
||||
/// 事件
|
||||
/// </summary>
|
||||
public const string Event = "Event";
|
||||
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
public const string Status = "Status";
|
||||
|
||||
/// <summary>
|
||||
/// 日志
|
||||
/// </summary>
|
||||
public const string Log = "Log";
|
||||
|
||||
/// <summary>
|
||||
/// 参数
|
||||
/// </summary>
|
||||
public const string Param= "Param";
|
||||
}
|
||||
}
|
||||
@ -1,24 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JiShe.CollectBus.Common.Consts
|
||||
{
|
||||
/// <summary>
|
||||
/// 计量端口常量
|
||||
/// </summary>
|
||||
public class MeteringPortConst
|
||||
{
|
||||
/// <summary>
|
||||
/// 计量端口1
|
||||
/// </summary>
|
||||
public const int MeteringPortOne = 1;
|
||||
|
||||
/// <summary>
|
||||
/// 计量端口2
|
||||
/// </summary>
|
||||
public const int MeteringPortTwo = 2;
|
||||
}
|
||||
}
|
||||
@ -1,431 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Volo.Abp.DependencyInjection;
|
||||
|
||||
namespace JiShe.CollectBus.Common.DeviceBalanceControl
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备组负载控制
|
||||
/// </summary>
|
||||
public class DeviceGroupBalanceControl
|
||||
{
|
||||
private static readonly object _syncRoot = new object();
|
||||
|
||||
private static volatile CacheState _currentCache;
|
||||
|
||||
/// <summary>
|
||||
/// 使用ConcurrentDictionary保证线程安全的设备分组映射
|
||||
/// </summary>
|
||||
private sealed class CacheState
|
||||
{
|
||||
public readonly ConcurrentDictionary<string, int> BalancedMapping;
|
||||
public readonly List<string>[] CachedGroups;
|
||||
|
||||
public CacheState(int groupCount)
|
||||
{
|
||||
BalancedMapping = new ConcurrentDictionary<string, int>();
|
||||
CachedGroups = new List<string>[groupCount];
|
||||
for (int i = 0; i < groupCount; i++)
|
||||
{
|
||||
CachedGroups[i] = new List<string>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 初始化或增量更新缓存
|
||||
/// </summary>
|
||||
public static void InitializeCache(List<string> deviceList, int groupCount = 30)
|
||||
{
|
||||
if (deviceList == null || deviceList.Count <= 0)
|
||||
{
|
||||
throw new ArgumentException($"{nameof(InitializeCache)} 设备分组初始化失败,设备数据为空");
|
||||
}
|
||||
|
||||
if (groupCount > 60 || groupCount <= 0)
|
||||
{
|
||||
groupCount = 60;
|
||||
}
|
||||
|
||||
lock (_syncRoot)
|
||||
{
|
||||
// 首次初始化
|
||||
if (_currentCache == null)
|
||||
{
|
||||
var newCache = new CacheState(groupCount);
|
||||
UpdateCacheWithDevices(newCache, deviceList, groupCount);
|
||||
_currentCache = newCache;
|
||||
}
|
||||
// 后续增量更新
|
||||
else
|
||||
{
|
||||
if (_currentCache.CachedGroups.Length != groupCount)
|
||||
{
|
||||
throw new ArgumentException($"{nameof(InitializeCache)} 设备分组初始化完成以后,分组数量不能更改");
|
||||
}
|
||||
|
||||
var clonedCache = CloneExistingCache();
|
||||
UpdateCacheWithDevices(clonedCache, deviceList, groupCount);
|
||||
_currentCache = clonedCache;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 带锁的缓存克隆(写入时复制)
|
||||
/// </summary>
|
||||
private static CacheState CloneExistingCache()
|
||||
{
|
||||
var oldCache = _currentCache;
|
||||
var newCache = new CacheState(oldCache.CachedGroups.Length);
|
||||
|
||||
// 复制已有映射
|
||||
foreach (var kvp in oldCache.BalancedMapping)
|
||||
{
|
||||
newCache.BalancedMapping.TryAdd(kvp.Key, kvp.Value);
|
||||
}
|
||||
|
||||
// 复制分组数据
|
||||
for (int i = 0; i < oldCache.CachedGroups.Length; i++)
|
||||
{
|
||||
newCache.CachedGroups[i].AddRange(oldCache.CachedGroups[i]);
|
||||
}
|
||||
|
||||
return newCache;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新设备到缓存
|
||||
/// </summary>
|
||||
private static void UpdateCacheWithDevices(CacheState cache, List<string> deviceList, int groupCount)
|
||||
{
|
||||
foreach (var deviceId in deviceList)
|
||||
{
|
||||
// 原子操作:如果设备不存在则计算分组
|
||||
cache.BalancedMapping.GetOrAdd(deviceId, id =>
|
||||
{
|
||||
int groupId = GetGroupId(id, groupCount);
|
||||
lock (cache.CachedGroups[groupId])
|
||||
{
|
||||
cache.CachedGroups[groupId].Add(id);
|
||||
}
|
||||
return groupId;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 并行处理泛型数据集(支持动态线程分配)
|
||||
/// </summary>
|
||||
/// <typeparam name="T">已经分组的设备信息</typeparam>
|
||||
/// <param name="items">部分或者全部的已经分组的设备集合</param>
|
||||
/// <param name="deviceIdSelector">从泛型对象提取deviceId</param>
|
||||
/// <param name="processor">处理委托(参数:当前对象,线程ID)</param>
|
||||
/// <param name="maxThreads">可选线程限制</param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="InvalidOperationException"></exception>
|
||||
public static async Task ProcessGenericListAsync<T>(
|
||||
List<T> items, Func<T, string> deviceIdSelector, Action<T, int> processor, int? maxThreads = null)
|
||||
{
|
||||
var cache = _currentCache ?? throw new InvalidOperationException("缓存未初始化");
|
||||
|
||||
// 创建分组任务队列
|
||||
var groupQueues = new ConcurrentQueue<T>[cache.CachedGroups.Length];
|
||||
for (int i = 0; i < groupQueues.Length; i++)
|
||||
{
|
||||
groupQueues[i] = new ConcurrentQueue<T>();
|
||||
}
|
||||
|
||||
// 阶段1:分发数据到分组队列
|
||||
Parallel.ForEach(items, item =>
|
||||
{
|
||||
var deviceId = deviceIdSelector(item);
|
||||
if (cache.BalancedMapping.TryGetValue(deviceId, out int groupId))
|
||||
{
|
||||
groupQueues[groupId].Enqueue(item);
|
||||
}
|
||||
});
|
||||
|
||||
if ((maxThreads.HasValue && maxThreads.Value > cache.CachedGroups.Length) || maxThreads.HasValue == false)
|
||||
{
|
||||
maxThreads = cache.CachedGroups.Length;
|
||||
}
|
||||
|
||||
// 阶段2:并行处理队列
|
||||
var options = new ParallelOptions
|
||||
{
|
||||
MaxDegreeOfParallelism = maxThreads.Value,
|
||||
};
|
||||
|
||||
await Task.Run(() =>
|
||||
{
|
||||
Parallel.For(0, cache.CachedGroups.Length, options, async groupId =>
|
||||
{
|
||||
var queue = groupQueues[groupId];
|
||||
while (queue.TryDequeue(out T item))
|
||||
{
|
||||
processor(item, groupId);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 智能节流处理(CPU友好型)
|
||||
/// </summary>
|
||||
/// <typeparam name="T">已经分组的设备信息</typeparam>
|
||||
/// <param name="items">部分或者全部的已经分组的设备集合</param>
|
||||
/// <param name="deviceIdSelector">从泛型对象提取deviceId</param>
|
||||
/// <param name="processor">处理委托(参数:当前对象,分组ID)</param>
|
||||
/// <param name="maxConcurrency">可选最佳并发度</param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="InvalidOperationException"></exception>
|
||||
public static async Task ProcessWithThrottleAsync<T>(
|
||||
List<T> items,
|
||||
Func<T, string> deviceIdSelector,
|
||||
Action<T,int> processor,
|
||||
int? maxConcurrency = null)
|
||||
{
|
||||
var cache = _currentCache ?? throw new InvalidOperationException("缓存未初始化");
|
||||
//var timer = Stopwatch.StartNew();
|
||||
|
||||
// 自动计算最佳并发度
|
||||
int recommendedThreads = CalculateOptimalThreadCount();
|
||||
if ((maxConcurrency.HasValue && maxConcurrency.Value > cache.CachedGroups.Length) || maxConcurrency.HasValue == false)
|
||||
{
|
||||
maxConcurrency = cache.CachedGroups.Length;
|
||||
}
|
||||
|
||||
int actualThreads = maxConcurrency ?? recommendedThreads;
|
||||
|
||||
|
||||
// 创建节流器
|
||||
using var throttler = new SemaphoreSlim(initialCount: actualThreads);
|
||||
|
||||
// 使用LongRunning避免线程池饥饿
|
||||
var tasks = items.Select(async item =>
|
||||
{
|
||||
await throttler.WaitAsync();
|
||||
try
|
||||
{
|
||||
var deviceId = deviceIdSelector(item);
|
||||
if (cache.BalancedMapping.TryGetValue(deviceId, out int groupId))
|
||||
{
|
||||
// 分组级处理(保持顺序性)
|
||||
await ProcessItemAsync(item, processor, groupId);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
throttler.Release();
|
||||
}
|
||||
});
|
||||
|
||||
await Task.WhenAll(tasks);
|
||||
//timer.Stop();
|
||||
//Console.WriteLine($"任务处理完成,耗时:{timer.ElapsedMilliseconds}ms");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 自动计算最优线程数
|
||||
/// </summary>
|
||||
public static int CalculateOptimalThreadCount()
|
||||
{
|
||||
int coreCount = Environment.ProcessorCount;
|
||||
return Math.Min(
|
||||
coreCount * 8, // 超线程优化
|
||||
_currentCache?.CachedGroups.Length ?? 60
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分组异步处理(带节流)
|
||||
/// </summary>
|
||||
private static async Task ProcessItemAsync<T>(T item, Action<T,int> processor, int groupId)
|
||||
{
|
||||
// 使用内存缓存降低CPU负载
|
||||
await Task.Yield(); // 立即释放当前线程
|
||||
|
||||
// 分组处理上下文
|
||||
var context = ExecutionContext.Capture();
|
||||
ThreadPool.QueueUserWorkItem(_ =>
|
||||
{
|
||||
ExecutionContext.Run(context!, state =>
|
||||
{
|
||||
processor(item,groupId);
|
||||
}, null);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 通过 deviceId 获取所在的分组集合
|
||||
/// </summary>
|
||||
public static List<string> GetGroup(string deviceId)
|
||||
{
|
||||
var cache = _currentCache;
|
||||
if (cache == null)
|
||||
throw new InvalidOperationException("缓存未初始化");
|
||||
|
||||
return cache.CachedGroups[cache.BalancedMapping[deviceId]];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 通过 deviceId 获取分组Id
|
||||
/// </summary>
|
||||
public static int GetDeviceGroupId(string deviceId)
|
||||
{
|
||||
var cache = _currentCache;
|
||||
if (cache == null)
|
||||
throw new InvalidOperationException("缓存未初始化");
|
||||
|
||||
return cache.BalancedMapping[deviceId];
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 创建均衡映射表
|
||||
/// </summary>
|
||||
/// <param name="deviceList">数据集合</param>
|
||||
/// <param name="groupCount">分组数量</param>
|
||||
/// <param name="maxDeviation">允许的最大偏差百分比</param>
|
||||
/// <returns></returns>
|
||||
public static Dictionary<string, int> CreateBalancedMapping(List<string> deviceList, int groupCount, int maxDeviation = 5)
|
||||
{
|
||||
var mapping = new Dictionary<string, int>();
|
||||
int targetPerGroup = deviceList.Count / groupCount;
|
||||
int maxAllowed = (int)(targetPerGroup * (1 + maxDeviation / 100.0));
|
||||
|
||||
// 初始化分组计数器
|
||||
int[] groupCounters = new int[groupCount];
|
||||
|
||||
foreach (var deviceId in deviceList)
|
||||
{
|
||||
int preferredGroup = GetGroupId(deviceId, groupCount);
|
||||
|
||||
// 如果首选分组未满,直接分配
|
||||
if (groupCounters[preferredGroup] < maxAllowed)
|
||||
{
|
||||
mapping[deviceId] = preferredGroup;
|
||||
groupCounters[preferredGroup]++;
|
||||
}
|
||||
else
|
||||
{
|
||||
// 寻找当前最空闲的分组
|
||||
int fallbackGroup = Array.IndexOf(groupCounters, groupCounters.Min());
|
||||
mapping[deviceId] = fallbackGroup;
|
||||
groupCounters[fallbackGroup]++;
|
||||
}
|
||||
}
|
||||
|
||||
return mapping;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分析分组分布
|
||||
/// </summary>
|
||||
/// <param name="deviceList"></param>
|
||||
/// <param name="groupCount"></param>
|
||||
/// <returns></returns>
|
||||
public static Dictionary<int, int> AnalyzeDistribution(List<string> deviceList, int groupCount)
|
||||
{
|
||||
Dictionary<int, int> distribution = new Dictionary<int, int>();
|
||||
foreach (var deviceId in deviceList)
|
||||
{
|
||||
int groupId = GetGroupId(deviceId, groupCount);
|
||||
distribution[groupId] = distribution.TryGetValue(groupId, out var count) ? count + 1 : 1;
|
||||
}
|
||||
return distribution;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取设备ID对应的分组ID
|
||||
/// </summary>
|
||||
/// <param name="deviceId"></param>
|
||||
/// <param name="groupCount"></param>
|
||||
/// <returns></returns>
|
||||
public static int GetGroupId(string deviceId, int groupCount)
|
||||
{
|
||||
int hash = Fnv1aHash(deviceId);
|
||||
// 双重取模确保分布均匀
|
||||
return (hash % groupCount + groupCount) % groupCount;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// FNV-1a哈希算法
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
public static int Fnv1aHash(string input)
|
||||
{
|
||||
const uint fnvPrime = 16777619;
|
||||
const uint fnvOffsetBasis = 2166136261;
|
||||
|
||||
uint hash = fnvOffsetBasis;
|
||||
foreach (char c in input)
|
||||
{
|
||||
hash ^= (byte)c;
|
||||
hash *= fnvPrime;
|
||||
}
|
||||
return (int)hash;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// CRC16算法实现
|
||||
/// </summary>
|
||||
/// <param name="bytes"></param>
|
||||
/// <returns></returns>
|
||||
public static ushort CRC16Hash(byte[] bytes)
|
||||
{
|
||||
ushort crc = 0xFFFF;
|
||||
for (int i = 0; i < bytes.Length; i++)
|
||||
{
|
||||
crc ^= bytes[i];
|
||||
for (int j = 0; j < 8; j++)
|
||||
{
|
||||
if ((crc & 0x0001) == 1)
|
||||
{
|
||||
crc = (ushort)((crc >> 1) ^ 0xA001);
|
||||
}
|
||||
else
|
||||
{
|
||||
crc >>= 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return crc;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 打印分组统计数据
|
||||
/// </summary>
|
||||
public static void PrintDistributionStats()
|
||||
{
|
||||
var cache = _currentCache;
|
||||
if (cache == null)
|
||||
{
|
||||
Console.WriteLine("缓存未初始化");
|
||||
return;
|
||||
}
|
||||
|
||||
var stats = cache.CachedGroups
|
||||
.Select((group, idx) => new { GroupId = idx, Count = group.Count })
|
||||
.OrderBy(x => x.GroupId);
|
||||
|
||||
Console.WriteLine("分组数据量统计:");
|
||||
foreach (var stat in stats)
|
||||
{
|
||||
Console.WriteLine($"Group {stat.GroupId}: {stat.Count} 条数据");
|
||||
}
|
||||
|
||||
Console.WriteLine($"总共: {stats.Sum(d=>d.Count)} 条数据");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user