Compare commits
2 Commits
5c19d02fdd
...
f457e140f6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f457e140f6 | ||
|
|
083a28f7af |
@ -62,9 +62,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "0.Docs", "0.Docs", "{D8346C
|
|||||||
readme.md = readme.md
|
readme.md = readme.md
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JiShe.CollectBus.Analyzers.Attributes", "shared\JiShe.CollectBus.Analyzers.Attributes\JiShe.CollectBus.Analyzers.Attributes.csproj", "{D834B28F-E336-4E05-A5DD-DAF68E3342AA}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JiShe.CollectBus.Analyzers.Shared", "shared\JiShe.CollectBus.Analyzers.Shared\JiShe.CollectBus.Analyzers.Shared.csproj", "{DD68F314-BC66-5601-B094-B1A7BE93F4E0}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JiShe.CollectBus.Analyzers", "shared\JiShe.CollectBus.Analyzers\JiShe.CollectBus.Analyzers.csproj", "{00DF55EE-82CF-B5AA-F8C7-0E5B823FBC24}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JiShe.CollectBus.Analyzers", "modules\JiShe.CollectBus.Analyzers\JiShe.CollectBus.Analyzers.csproj", "{EB97C7BB-1E4A-CBA4-04C1-22DBF48A253A}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
@ -152,14 +152,14 @@ Global
|
|||||||
{75B7D419-C261-577D-58D6-AA3ACED9129F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{75B7D419-C261-577D-58D6-AA3ACED9129F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{75B7D419-C261-577D-58D6-AA3ACED9129F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{75B7D419-C261-577D-58D6-AA3ACED9129F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{75B7D419-C261-577D-58D6-AA3ACED9129F}.Release|Any CPU.Build.0 = Release|Any CPU
|
{75B7D419-C261-577D-58D6-AA3ACED9129F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{D834B28F-E336-4E05-A5DD-DAF68E3342AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{DD68F314-BC66-5601-B094-B1A7BE93F4E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{D834B28F-E336-4E05-A5DD-DAF68E3342AA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{DD68F314-BC66-5601-B094-B1A7BE93F4E0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{D834B28F-E336-4E05-A5DD-DAF68E3342AA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{DD68F314-BC66-5601-B094-B1A7BE93F4E0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{D834B28F-E336-4E05-A5DD-DAF68E3342AA}.Release|Any CPU.Build.0 = Release|Any CPU
|
{DD68F314-BC66-5601-B094-B1A7BE93F4E0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{00DF55EE-82CF-B5AA-F8C7-0E5B823FBC24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{EB97C7BB-1E4A-CBA4-04C1-22DBF48A253A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{00DF55EE-82CF-B5AA-F8C7-0E5B823FBC24}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{EB97C7BB-1E4A-CBA4-04C1-22DBF48A253A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{00DF55EE-82CF-B5AA-F8C7-0E5B823FBC24}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{EB97C7BB-1E4A-CBA4-04C1-22DBF48A253A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{00DF55EE-82CF-B5AA-F8C7-0E5B823FBC24}.Release|Any CPU.Build.0 = Release|Any CPU
|
{EB97C7BB-1E4A-CBA4-04C1-22DBF48A253A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
@ -185,8 +185,8 @@ Global
|
|||||||
{8A61DF78-069B-40B5-8811-614E2960443E} = {3C3F9DB2-EC97-4464-B49F-BF1A0C2B46DC}
|
{8A61DF78-069B-40B5-8811-614E2960443E} = {3C3F9DB2-EC97-4464-B49F-BF1A0C2B46DC}
|
||||||
{E27377CC-E2D3-4237-060F-96EA214D3129} = {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}
|
{75B7D419-C261-577D-58D6-AA3ACED9129F} = {3C3F9DB2-EC97-4464-B49F-BF1A0C2B46DC}
|
||||||
{D834B28F-E336-4E05-A5DD-DAF68E3342AA} = {EBF7C01F-9B4F-48E6-8418-2CBFDA51EB0B}
|
{DD68F314-BC66-5601-B094-B1A7BE93F4E0} = {EBF7C01F-9B4F-48E6-8418-2CBFDA51EB0B}
|
||||||
{00DF55EE-82CF-B5AA-F8C7-0E5B823FBC24} = {EBF7C01F-9B4F-48E6-8418-2CBFDA51EB0B}
|
{EB97C7BB-1E4A-CBA4-04C1-22DBF48A253A} = {2E0FE301-34C3-4561-9CAE-C7A9E65AEE59}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
SolutionGuid = {4324B3B4-B60B-4E3C-91D8-59576B4E26DD}
|
SolutionGuid = {4324B3B4-B60B-4E3C-91D8-59576B4E26DD}
|
||||||
|
|||||||
@ -11,9 +11,9 @@ namespace JiShe.CollectBus.IncrementalGenerator
|
|||||||
/// 复杂类型源生成器
|
/// 复杂类型源生成器
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Generator(LanguageNames.CSharp)]
|
[Generator(LanguageNames.CSharp)]
|
||||||
public class ComplexTypeSourceGenerator : IIncrementalGenerator
|
public class ComplexTypeSourceAnalyzers : IIncrementalGenerator
|
||||||
{
|
{
|
||||||
private const string AttributeFullName = "JiShe.CollectBus.Analyzers.Attributes.GenerateAccessorsAttribute";
|
private const string AttributeFullName = "JiShe.CollectBus.Analyzers.Shared.SourceAnalyzersAttribute";
|
||||||
|
|
||||||
public void Initialize(IncrementalGeneratorInitializationContext context)
|
public void Initialize(IncrementalGeneratorInitializationContext context)
|
||||||
{
|
{
|
||||||
@ -16,6 +16,6 @@
|
|||||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.13.0" PrivateAssets="all" />
|
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.13.0" PrivateAssets="all" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\JiShe.CollectBus.Analyzers.Attributes\JiShe.CollectBus.Analyzers.Attributes.csproj" />
|
<ProjectReference Include="..\..\shared\JiShe.CollectBus.Analyzers.Shared\JiShe.CollectBus.Analyzers.Shared.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@ -10,11 +10,11 @@
|
|||||||
<PackageReference Include="Volo.Abp" Version="8.3.3" />
|
<PackageReference Include="Volo.Abp" Version="8.3.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\shared\JiShe.CollectBus.Analyzers.Attributes\JiShe.CollectBus.Analyzers.Attributes.csproj"/>
|
|
||||||
|
|
||||||
<ProjectReference Include="..\..\shared\JiShe.CollectBus.Analyzers\JiShe.CollectBus.Analyzers.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
|
|
||||||
|
|
||||||
|
|
||||||
|
<ProjectReference Include="..\..\shared\JiShe.CollectBus.Analyzers.Shared\JiShe.CollectBus.Analyzers.Shared.csproj" />
|
||||||
<ProjectReference Include="..\..\shared\JiShe.CollectBus.Common\JiShe.CollectBus.Common.csproj" />
|
<ProjectReference Include="..\..\shared\JiShe.CollectBus.Common\JiShe.CollectBus.Common.csproj" />
|
||||||
|
|
||||||
|
<ProjectReference Include="..\..\modules\JiShe.CollectBus.Analyzers\JiShe.CollectBus.Analyzers.csproj"
|
||||||
|
OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using JiShe.CollectBus.Analyzers.Attributes;
|
using JiShe.CollectBus.Analyzers.Shared;
|
||||||
using JiShe.CollectBus.IoTDB.Attribute;
|
using JiShe.CollectBus.IoTDB.Attribute;
|
||||||
using JiShe.CollectBus.IoTDB.Enums;
|
using JiShe.CollectBus.IoTDB.Enums;
|
||||||
|
|
||||||
@ -8,7 +8,7 @@ namespace JiShe.CollectBus.IoTDB.Model
|
|||||||
/// Table模型单项数据实体
|
/// Table模型单项数据实体
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[EntityType(EntityTypeEnum.TableModel)]
|
[EntityType(EntityTypeEnum.TableModel)]
|
||||||
[GenerateAccessors]
|
[SourceAnalyzers]
|
||||||
public class TableModelSingleMeasuringEntity<T> : IoTEntity
|
public class TableModelSingleMeasuringEntity<T> : IoTEntity
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using JiShe.CollectBus.Analyzers.Attributes;
|
using JiShe.CollectBus.Analyzers.Shared;
|
||||||
using JiShe.CollectBus.IoTDB.Attribute;
|
using JiShe.CollectBus.IoTDB.Attribute;
|
||||||
using JiShe.CollectBus.IoTDB.Enums;
|
using JiShe.CollectBus.IoTDB.Enums;
|
||||||
|
|
||||||
@ -8,7 +8,7 @@ namespace JiShe.CollectBus.IoTDB.Model
|
|||||||
/// Tree模型单项数据实体
|
/// Tree模型单项数据实体
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[EntityType(EntityTypeEnum.TreeModel)]
|
[EntityType(EntityTypeEnum.TreeModel)]
|
||||||
[GenerateAccessors]
|
[SourceAnalyzers]
|
||||||
public class TreeModelSingleMeasuringEntity<T> : IoTEntity
|
public class TreeModelSingleMeasuringEntity<T> : IoTEntity
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@ -124,7 +124,7 @@ namespace JiShe.CollectBus.ScheduledMeterReading
|
|||||||
/// 水表数据采集
|
/// 水表数据采集
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task WatermeterScheduledMeterAutoReading();
|
Task WatermeterScheduledMeterAutoReadding();
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@ -66,7 +66,7 @@ public class SampleAppService : CollectBusAppService, ISampleAppService, IKafkaS
|
|||||||
IssuedMessageHexString = "messageHexString",
|
IssuedMessageHexString = "messageHexString",
|
||||||
Timestamps = testTime// DateTimeOffset.UtcNow.ToUnixTimeNanoseconds()//testTime.GetDateTimeOffset().ToUnixTimeNanoseconds(),
|
Timestamps = testTime// DateTimeOffset.UtcNow.ToUnixTimeNanoseconds()//testTime.GetDateTimeOffset().ToUnixTimeNanoseconds(),
|
||||||
};
|
};
|
||||||
//ElectricityMeterExtension.get
|
//ElectricityMeterTreeModelExtension.GetCurrent()
|
||||||
await _iotDBProvider.InsertAsync(meter);
|
await _iotDBProvider.InsertAsync(meter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -709,7 +709,8 @@ namespace JiShe.CollectBus.ScheduledMeterReading
|
|||||||
itemCode: tempItem,
|
itemCode: tempItem,
|
||||||
subItemCode: null,
|
subItemCode: null,
|
||||||
pendingCopyReadTime: currentTime,
|
pendingCopyReadTime: currentTime,
|
||||||
creationTime: currentTime);
|
creationTime: currentTime,
|
||||||
|
packetType: (TelemetryPacketTypeEnum)timeDensity);
|
||||||
taskList.Add(meterReadingRecords);
|
taskList.Add(meterReadingRecords);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -791,7 +792,8 @@ namespace JiShe.CollectBus.ScheduledMeterReading
|
|||||||
itemCode: itemCode,
|
itemCode: itemCode,
|
||||||
subItemCode: subItemCode,
|
subItemCode: subItemCode,
|
||||||
pendingCopyReadTime: currentTime,
|
pendingCopyReadTime: currentTime,
|
||||||
creationTime: currentTime);
|
creationTime: currentTime,
|
||||||
|
packetType: TelemetryPacketTypeEnum.AmmeterAutomaticVerificationTime);
|
||||||
taskList.Add(meterReadingRecords);
|
taskList.Add(meterReadingRecords);
|
||||||
|
|
||||||
if (taskList == null || taskList.Count <= 0)
|
if (taskList == null || taskList.Count <= 0)
|
||||||
@ -872,7 +874,8 @@ namespace JiShe.CollectBus.ScheduledMeterReading
|
|||||||
itemCode: item,
|
itemCode: item,
|
||||||
subItemCode: null,
|
subItemCode: null,
|
||||||
pendingCopyReadTime: currentTime,
|
pendingCopyReadTime: currentTime,
|
||||||
creationTime: currentTime);
|
creationTime: currentTime,
|
||||||
|
packetType: TelemetryPacketTypeEnum.AmmeterDayFreeze);
|
||||||
taskList.Add(meterReadingRecords);
|
taskList.Add(meterReadingRecords);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -954,7 +957,8 @@ namespace JiShe.CollectBus.ScheduledMeterReading
|
|||||||
itemCode: item,
|
itemCode: item,
|
||||||
subItemCode: null,
|
subItemCode: null,
|
||||||
pendingCopyReadTime: currentTime,
|
pendingCopyReadTime: currentTime,
|
||||||
creationTime: currentTime);
|
creationTime: currentTime,
|
||||||
|
packetType: TelemetryPacketTypeEnum.AmmeterMonthFreeze);
|
||||||
taskList.Add(meterReadingRecords);
|
taskList.Add(meterReadingRecords);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1097,7 +1101,7 @@ namespace JiShe.CollectBus.ScheduledMeterReading
|
|||||||
/// 水表数据采集
|
/// 水表数据采集
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public virtual async Task WatermeterScheduledMeterAutoReading()
|
public virtual async Task WatermeterScheduledMeterAutoReadding()
|
||||||
{
|
{
|
||||||
//获取缓存中的水表信息
|
//获取缓存中的水表信息
|
||||||
int timeDensity = 60;//水表目前只有一个采集频率 60分钟
|
int timeDensity = 60;//水表目前只有一个采集频率 60分钟
|
||||||
@ -1129,7 +1133,7 @@ namespace JiShe.CollectBus.ScheduledMeterReading
|
|||||||
Conditions = conditions,
|
Conditions = conditions,
|
||||||
});
|
});
|
||||||
|
|
||||||
_logger.LogInformation($"{nameof(WatermeterScheduledMeterAutoReading)} {timeDensity}分钟采集水表数据处理完成");
|
_logger.LogInformation($"{nameof(WatermeterScheduledMeterAutoReadding)} {timeDensity}分钟采集水表数据处理完成");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -1214,6 +1218,7 @@ namespace JiShe.CollectBus.ScheduledMeterReading
|
|||||||
DeviceId = $"{watermeter.MeterId}",
|
DeviceId = $"{watermeter.MeterId}",
|
||||||
Timestamps = DateTimeOffset.Now.ToUnixTimeNanoseconds(),
|
Timestamps = DateTimeOffset.Now.ToUnixTimeNanoseconds(),
|
||||||
DatabaseBusiID = watermeter.DatabaseBusiID,
|
DatabaseBusiID = watermeter.DatabaseBusiID,
|
||||||
|
PacketType = (int)TelemetryPacketTypeEnum.WatermeterAutoReadding,
|
||||||
PendingCopyReadTime = timestamps,
|
PendingCopyReadTime = timestamps,
|
||||||
CreationTime = currentTime,
|
CreationTime = currentTime,
|
||||||
MeterAddress = watermeter.MeterAddress,
|
MeterAddress = watermeter.MeterAddress,
|
||||||
@ -1298,7 +1303,8 @@ namespace JiShe.CollectBus.ScheduledMeterReading
|
|||||||
itemCode: itemCode,
|
itemCode: itemCode,
|
||||||
subItemCode: null,
|
subItemCode: null,
|
||||||
pendingCopyReadTime: currentTime,
|
pendingCopyReadTime: currentTime,
|
||||||
creationTime: currentTime);
|
creationTime: currentTime,
|
||||||
|
packetType: TelemetryPacketTypeEnum.TerminalVersion);
|
||||||
taskList.Add(meterReadingRecords);
|
taskList.Add(meterReadingRecords);
|
||||||
|
|
||||||
if (taskList == null || taskList.Count <= 0)
|
if (taskList == null || taskList.Count <= 0)
|
||||||
@ -1376,7 +1382,8 @@ namespace JiShe.CollectBus.ScheduledMeterReading
|
|||||||
itemCode: itemCode,
|
itemCode: itemCode,
|
||||||
subItemCode: null,
|
subItemCode: null,
|
||||||
pendingCopyReadTime: currentTime,
|
pendingCopyReadTime: currentTime,
|
||||||
creationTime: currentTime);
|
creationTime: currentTime,
|
||||||
|
packetType: TelemetryPacketTypeEnum.TelematicsModule);
|
||||||
taskList.Add(meterReadingRecords);
|
taskList.Add(meterReadingRecords);
|
||||||
|
|
||||||
if (taskList == null || taskList.Count <= 0)
|
if (taskList == null || taskList.Count <= 0)
|
||||||
@ -1560,8 +1567,9 @@ namespace JiShe.CollectBus.ScheduledMeterReading
|
|||||||
/// <param name="subItemCode">端到端采集项编码</param>
|
/// <param name="subItemCode">端到端采集项编码</param>
|
||||||
/// <param name="pendingCopyReadTime">待采集时间,定时采集频率才是特殊情况,其他默认当前时间戳</param>
|
/// <param name="pendingCopyReadTime">待采集时间,定时采集频率才是特殊情况,其他默认当前时间戳</param>
|
||||||
/// <param name="creationTime">数据创建时间戳</param>
|
/// <param name="creationTime">数据创建时间戳</param>
|
||||||
|
/// <param name="packetType">数据包类型</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
protected MeterReadingTelemetryPacketInfo CreateAmmeterPacketInfo(AmmeterInfo ammeterInfo, long timestamps, ProtocolBuildResponse builderResponse, string itemCode, string subItemCode, DateTime pendingCopyReadTime, DateTime creationTime)
|
protected MeterReadingTelemetryPacketInfo CreateAmmeterPacketInfo(AmmeterInfo ammeterInfo, long timestamps, ProtocolBuildResponse builderResponse, string itemCode, string subItemCode, DateTime pendingCopyReadTime, DateTime creationTime, TelemetryPacketTypeEnum packetType)
|
||||||
{
|
{
|
||||||
string taskMark = CommonHelper.GetTaskMark(builderResponse.AFn, builderResponse.Fn, ammeterInfo.MeteringCode, builderResponse.MSA, builderResponse.Seq);
|
string taskMark = CommonHelper.GetTaskMark(builderResponse.AFn, builderResponse.Fn, ammeterInfo.MeteringCode, builderResponse.MSA, builderResponse.Seq);
|
||||||
return new MeterReadingTelemetryPacketInfo()
|
return new MeterReadingTelemetryPacketInfo()
|
||||||
@ -1575,10 +1583,13 @@ namespace JiShe.CollectBus.ScheduledMeterReading
|
|||||||
PendingCopyReadTime = pendingCopyReadTime,
|
PendingCopyReadTime = pendingCopyReadTime,
|
||||||
CreationTime = creationTime,
|
CreationTime = creationTime,
|
||||||
MeterAddress = ammeterInfo.AmmerterAddress,
|
MeterAddress = ammeterInfo.AmmerterAddress,
|
||||||
|
PacketType = (int)packetType,
|
||||||
AFN = builderResponse.AFn,
|
AFN = builderResponse.AFn,
|
||||||
Fn = builderResponse.Fn,
|
Fn = builderResponse.Fn,
|
||||||
Seq = builderResponse.Seq,
|
Seq = builderResponse.Seq,
|
||||||
MSA = builderResponse.MSA,
|
MSA = builderResponse.MSA,
|
||||||
|
FocusId = ammeterInfo.FocusId,
|
||||||
|
FocusAddress = ammeterInfo.FocusAddress,
|
||||||
ItemCode = itemCode,
|
ItemCode = itemCode,
|
||||||
SubItemCode = subItemCode,
|
SubItemCode = subItemCode,
|
||||||
TaskMark = taskMark,
|
TaskMark = taskMark,
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using JiShe.CollectBus.Analyzers.Attributes;
|
using JiShe.CollectBus.Analyzers.Shared;
|
||||||
using JiShe.CollectBus.IoTDB.Attribute;
|
using JiShe.CollectBus.IoTDB.Attribute;
|
||||||
using JiShe.CollectBus.IoTDB.Enums;
|
using JiShe.CollectBus.IoTDB.Enums;
|
||||||
using JiShe.CollectBus.IoTDB.Model;
|
using JiShe.CollectBus.IoTDB.Model;
|
||||||
@ -6,7 +6,7 @@ using JiShe.CollectBus.IoTDB.Model;
|
|||||||
namespace JiShe.CollectBus.Ammeters
|
namespace JiShe.CollectBus.Ammeters
|
||||||
{
|
{
|
||||||
[EntityType(EntityTypeEnum.TableModel)]
|
[EntityType(EntityTypeEnum.TableModel)]
|
||||||
[GenerateAccessors]
|
[SourceAnalyzers]
|
||||||
public class ElectricityMeter : IoTEntity
|
public class ElectricityMeter : IoTEntity
|
||||||
{
|
{
|
||||||
[ATTRIBUTEColumn]
|
[ATTRIBUTEColumn]
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using JiShe.CollectBus.Analyzers.Attributes;
|
using JiShe.CollectBus.Analyzers.Shared;
|
||||||
using JiShe.CollectBus.IoTDB.Attribute;
|
using JiShe.CollectBus.IoTDB.Attribute;
|
||||||
using JiShe.CollectBus.IoTDB.Enums;
|
using JiShe.CollectBus.IoTDB.Enums;
|
||||||
using JiShe.CollectBus.IoTDB.Model;
|
using JiShe.CollectBus.IoTDB.Model;
|
||||||
@ -6,7 +6,7 @@ using JiShe.CollectBus.IoTDB.Model;
|
|||||||
namespace JiShe.CollectBus.Ammeters
|
namespace JiShe.CollectBus.Ammeters
|
||||||
{
|
{
|
||||||
[EntityType(EntityTypeEnum.TreeModel)]
|
[EntityType(EntityTypeEnum.TreeModel)]
|
||||||
[GenerateAccessors]
|
[SourceAnalyzers]
|
||||||
public class ElectricityMeterTreeModel : IoTEntity
|
public class ElectricityMeterTreeModel : IoTEntity
|
||||||
{
|
{
|
||||||
[ATTRIBUTEColumn]
|
[ATTRIBUTEColumn]
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using JiShe.CollectBus.Analyzers.Attributes;
|
using JiShe.CollectBus.Analyzers.Shared;
|
||||||
using JiShe.CollectBus.IoTDB.Attribute;
|
using JiShe.CollectBus.IoTDB.Attribute;
|
||||||
using JiShe.CollectBus.IoTDB.Enums;
|
using JiShe.CollectBus.IoTDB.Enums;
|
||||||
using JiShe.CollectBus.IoTDB.Model;
|
using JiShe.CollectBus.IoTDB.Model;
|
||||||
@ -10,7 +10,7 @@ namespace JiShe.CollectBus.IotSystems.MeterReadingRecords
|
|||||||
/// 抄读任务数据
|
/// 抄读任务数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[EntityType(EntityTypeEnum.TableModel)]
|
[EntityType(EntityTypeEnum.TableModel)]
|
||||||
[GenerateAccessors]
|
[SourceAnalyzers]
|
||||||
public class MeterReadingTelemetryPacketInfo : IoTEntity
|
public class MeterReadingTelemetryPacketInfo : IoTEntity
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -19,6 +19,12 @@ namespace JiShe.CollectBus.IotSystems.MeterReadingRecords
|
|||||||
[FIELDColumn]
|
[FIELDColumn]
|
||||||
public string ScoreValue { get; set; }
|
public string ScoreValue { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 数据包类型
|
||||||
|
/// </summary>
|
||||||
|
[FIELDColumn]
|
||||||
|
public int PacketType { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否手动操作
|
/// 是否手动操作
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -56,12 +62,6 @@ namespace JiShe.CollectBus.IotSystems.MeterReadingRecords
|
|||||||
[FIELDColumn]
|
[FIELDColumn]
|
||||||
public string FocusAddress { get; set; }
|
public string FocusAddress { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 表Id
|
|
||||||
/// </summary>
|
|
||||||
[FIELDColumn]
|
|
||||||
public int MeterId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 表地址
|
/// 表地址
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<Import Project="..\..\common.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
@ -21,13 +23,11 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\modules\JiShe.CollectBus.FreeSql\JiShe.CollectBus.FreeSql.csproj" />
|
<ProjectReference Include="..\..\modules\JiShe.CollectBus.FreeSql\JiShe.CollectBus.FreeSql.csproj" />
|
||||||
<ProjectReference Include="..\..\modules\JiShe.CollectBus.IoTDB\JiShe.CollectBus.IoTDB.csproj" />
|
<ProjectReference Include="..\..\modules\JiShe.CollectBus.IoTDB\JiShe.CollectBus.IoTDB.csproj" />
|
||||||
|
<ProjectReference Include="..\..\shared\JiShe.CollectBus.Analyzers.Shared\JiShe.CollectBus.Analyzers.Shared.csproj" />
|
||||||
<ProjectReference Include="..\..\shared\JiShe.CollectBus.Common\JiShe.CollectBus.Common.csproj" />
|
<ProjectReference Include="..\..\shared\JiShe.CollectBus.Common\JiShe.CollectBus.Common.csproj" />
|
||||||
<ProjectReference Include="..\..\shared\JiShe.CollectBus.Domain.Shared\JiShe.CollectBus.Domain.Shared.csproj" />
|
<ProjectReference Include="..\..\shared\JiShe.CollectBus.Domain.Shared\JiShe.CollectBus.Domain.Shared.csproj" />
|
||||||
|
<ProjectReference Include="..\..\modules\JiShe.CollectBus.Analyzers\JiShe.CollectBus.Analyzers.csproj"
|
||||||
<ProjectReference Include="..\..\shared\JiShe.CollectBus.Analyzers.Attributes\JiShe.CollectBus.Analyzers.Attributes.csproj"/>
|
OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
|
||||||
|
|
||||||
<ProjectReference Include="..\..\shared\JiShe.CollectBus.Analyzers\JiShe.CollectBus.Analyzers.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
|
|
||||||
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@ -0,0 +1,40 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace JiShe.CollectBus.Analyzers
|
||||||
|
{
|
||||||
|
public interface ISourceAnalyzersProvider<T>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取属性值
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entity"></param>
|
||||||
|
/// <param name="propertyName"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
object GetPropertyValue(T entity, string propertyName);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设置属性值
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entity"></param>
|
||||||
|
/// <param name="propertyName"></param>
|
||||||
|
/// <param name="value"></param>
|
||||||
|
void SetPropertyValue(T entity, string propertyName, object value);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 判断是否是元组属性
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="propertyName"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
bool IsTupleProperty(string propertyName);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取元组属性值
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entity"></param>
|
||||||
|
/// <param name="tuplePropertyName"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
(object Item1, object Item2) GetTupleParts(T entity, string tuplePropertyName);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,12 +1,12 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace JiShe.CollectBus.Analyzers.Attributes
|
namespace JiShe.CollectBus.Analyzers.Shared
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 标记需要生成源码的类
|
/// 标记需要生成源码的类
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[AttributeUsage(AttributeTargets.Class)]
|
[AttributeUsage(AttributeTargets.Class)]
|
||||||
public class GenerateAccessorsAttribute : Attribute
|
public class SourceAnalyzersAttribute : Attribute
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -0,0 +1,75 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace JiShe.CollectBus.Common.Enums
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 遥测数据包类型枚举
|
||||||
|
/// </summary>
|
||||||
|
public enum TelemetryPacketTypeEnum
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 1分钟密度
|
||||||
|
/// </summary>
|
||||||
|
[Description("1分钟密度")]
|
||||||
|
AmmeterOneMinute = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 5分钟密度
|
||||||
|
/// </summary>
|
||||||
|
[Description("5分钟密度")]
|
||||||
|
AmmeterMeterFiveMinute = 5,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 15分钟密度
|
||||||
|
/// </summary>
|
||||||
|
[Description("15分钟密度")]
|
||||||
|
AmmeterFifteenMinute = 15,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 自动校时
|
||||||
|
/// </summary>
|
||||||
|
[Description("自动校时")]
|
||||||
|
AmmeterAutomaticVerificationTime = 16,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 日冻结
|
||||||
|
/// </summary>
|
||||||
|
[Description("日冻结")]
|
||||||
|
AmmeterDayFreeze = 17,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 月冻结
|
||||||
|
/// </summary>
|
||||||
|
[Description("月冻结")]
|
||||||
|
AmmeterMonthFreeze = 18,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 自动阀控
|
||||||
|
/// </summary>
|
||||||
|
[Description("自动阀控")]
|
||||||
|
AmmeterAutoValveControl = 19,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 集中器终端版本
|
||||||
|
/// </summary>
|
||||||
|
[Description("集中器终端版本")]
|
||||||
|
TerminalVersion = 20,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 集中器通信模块SIM
|
||||||
|
/// </summary>
|
||||||
|
[Description("集中器通信模块SIM")]
|
||||||
|
TelematicsModule = 21,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 水表抄读
|
||||||
|
/// </summary>
|
||||||
|
[Description("水表抄读")]
|
||||||
|
WatermeterAutoReadding = 22,
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,5 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<Import Project="..\..\common.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user