Compare commits

...

26 Commits

Author SHA1 Message Date
ChenYi
9f61d37129 绑定设备端物模型 2025-12-22 17:15:27 +08:00
ChenYi
2ba44b5d30 完善产品聚合服务 2025-12-22 15:36:35 +08:00
ChenYi
0bc946d1e9 设备端物模型管理接口对接 2025-12-19 16:35:31 +08:00
ChenYi
c324a12f75 优化设备端物模型属性表设计和函数构建逻辑 2025-12-18 17:15:31 +08:00
ChenYi
fb5c9eca52 平台产品聚合服务 2025-12-17 15:51:11 +08:00
ChenYi
8f9fb1816d 将设备端物模型函数编译并缓存到Redis 2025-12-16 15:50:37 +08:00
ChenYi
37ebc900a2 修改MapsterGlobalJsonToListConverter 2025-12-16 13:46:21 +08:00
ChenYi
a4adc39cc3 更新dockerfile 2025-12-16 11:31:47 +08:00
ChenYi
583c3b7a8a 更新dockerfile 2025-12-16 11:28:14 +08:00
ChenYi
d20b277ab0 设备端物模型函数动态解析构建和解析调用测试通过,消除CodeAnalysis警告 2025-12-16 11:20:55 +08:00
ChenYi
d76c18a1cf 优化函数测试接口,实现设备端物模型解析函数构建 2025-12-15 16:02:40 +08:00
ChenYi
f9ce67e98f 解析脚本测试 2025-12-12 16:44:29 +08:00
ChenYi
b160064154 解析脚本测试 2025-12-12 15:33:46 +08:00
ChenYi
e7b44d35d8 DynamicAnalyzerEngine应用 2025-12-12 14:24:12 +08:00
ChenYi
65bd35110a SpecialCommand获取原始报文实现 2025-12-11 15:23:34 +08:00
ChenYi
7dcc470018 完成设备属性标识符特殊结构体参数下发 2025-12-10 17:08:24 +08:00
ChenYi
c1423d549f 优化注释 2025-12-09 17:24:27 +08:00
ChenYi
180b654f26 设备端物模型结构体属性设置请求体封装、平台产品物模型信息结构体拆解函数 2025-12-09 17:19:34 +08:00
ChenYi
e63baad9da 设备物模型指令属性限制 2025-12-08 17:18:00 +08:00
ChenYi
7610eb77f5 缓存设备端物模型信息到Redis 2025-12-08 17:09:16 +08:00
ChenYi
a32518cfe3 解析脚本测试 2025-12-08 16:58:21 +08:00
ChenYi
8190de6eff 缓存设备端物模型信息 2025-12-08 16:27:42 +08:00
陈益
6d681f4b0f 迁移更新 2025-12-07 20:30:15 +08:00
陈益
f48c6e64eb 还原net9 2025-12-07 20:21:24 +08:00
陈益
94af3c9a7f Pomelo迁移失败 2025-12-07 11:03:48 +08:00
陈益
26d4db8f92 升级net10,编译成功 2025-12-05 23:48:20 +08:00
39 changed files with 805 additions and 168 deletions

4
.gitignore vendored
View File

@ -57,3 +57,7 @@
/test/JiShe.IoT.TestBase/bin/Release/net9.0
/host/JiShe.IoT.HttpApi.Host/UploadFile/20250729/host/abp-file-management
/host/JiShe.IoT.HttpApi.Host/UploadFile/20250731/host/abp-file-management/3a1b7059-f930-8a33-5a5b-a67f48f2feec
/gateways/JiShe.IoT.WebGateway/bin/Debug/net10.0
/host/JiShe.IoT.HttpApi.Host/bin/Debug/net10.0
/src/JiShe.IoT.Application/bin/Debug/net10.0
/host/JiShe.IoT.HttpApi.Host/UploadFile/20251210/host/abp-file-management

View File

@ -1,12 +1,12 @@
# FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
FROM registry.cn-qingdao.aliyuncs.com/jisheyun/aspnetcore:9.0.6_ub24_simsun_pdp_v341 AS base
FROM registry.cn-qingdao.aliyuncs.com/jisheyun/aspnetcore:9.0.11_ub24_simsun_pdp_v350 AS base
WORKDIR /app
EXPOSE 10500
EXPOSE 443
ENV TZ=Asia/Shanghai
ENV ASPNETCORE_ENVIRONMENT=Development
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:9.0.308 AS build
COPY ["JiShe.IoT.Admin.sln", "."]
COPY ["Directory.Build.JiShe.targets", "."]
COPY ["Directory.Build.Microsoft.targets", "."]

View File

@ -17,10 +17,14 @@
<PackageReference Update="Microsoft.Extensions.DependencyInjection" Version="$(DotnetInfoVersion)" />
<PackageReference Update="Microsoft.Extensions.Http" Version="$(DotnetInfoVersion)"/>
<PackageReference Update="Microsoft.AspNetCore.Mvc.Core" Version="2.2.0"/>
<PackageReference Update="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0"/>
<PackageReference Update="Microsoft.CSharp" Version="4.12.0"/>
<PackageReference Update="Microsoft.CodeAnalysis.CSharp" Version="4.12.0"/>
<PackageReference Update="Microsoft.AspNetCore.Mvc.Core" Version="2.3.0"/>
<PackageReference Update="Microsoft.AspNetCore.Http.Abstractions" Version="2.3.0"/>
<PackageReference Update="Microsoft.AspNetCore.Http.Features" Version="2.3.0"/>
<PackageReference Update="Microsoft.CSharp" Version="4.14.0"/>
<PackageReference Update="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0" />
<PackageReference Update="Microsoft.CodeAnalysis.CSharp" Version="4.14.0" />
<PackageReference Update="Microsoft.CodeAnalysis.Common " Version="4.14.0" />
<PackageReference Update="Microsoft.CodeAnalysis.Workspaces.Common" Version="4.14.0" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.8.0"/>
</ItemGroup>
</Project>

View File

@ -94,5 +94,6 @@
<PackageReference Update="Volo.Abp.EventBus" Version="$(VoloAbpVersion)"/>
<PackageReference Update="Volo.Abp.Localization" Version="$(VoloAbpVersion)" />
<PackageReference Update="Volo.Abp.DistributedLocking" Version="$(VoloAbpVersion)" />
<PackageReference Update="Volo.Abp.EntityFrameworkCore.MySQL.Pomelo" Version="$(VoloAbpVersion)" />
</ItemGroup>
</Project>

View File

@ -4,10 +4,10 @@
<!--JiShe.ServicePro版本-->
<ServiceProVersion>1.0.5.40</ServiceProVersion>
<!--Volo Abp 版本-->
<VoloAbpVersion>9.2.1</VoloAbpVersion>
<VoloAbpVersion>9.3.4</VoloAbpVersion>
<!--Dotnet 组件 版本-->
<DotnetInfoVersion>9.0.4</DotnetInfoVersion>
<DotnetInfoVersion>9.0.11</DotnetInfoVersion>
<!--Dotnet 框架 版本-->
<DotnetTargetFrameworkVersion>net9.0</DotnetTargetFrameworkVersion>

View File

@ -28,6 +28,17 @@
<PackageReference Update="Ocelot.Provider.Consul" Version="18.0.0"/>
<PackageReference Update="Ocelot.Provider.Polly" Version="18.0.0"/>
<!--FreeRedis-->
<PackageReference Update="FreeRedis" Version="1.3.7"/>
<PackageReference Update="FreeRedis.DistributedCache" Version="1.3.7"/>
<!--FreeSql-->
<PackageReference Update="FreeSql.Cloud" Version="2.0.1" />
<PackageReference Update="FreeSql.Extensions.JsonMap" Version="3.5.303" />
<PackageReference Update="FreeSql" Version="3.5.303"/>
<PackageReference Update="FreeSql.Provider.MysqlConnector" Version="3.5.303"/>
<PackageReference Update="FreeSql.Provider.Sqlite" Version="3.5.303"/>
<PackageReference Update="FreeSql.Provider.SqlServer" Version="3.5.303" />
<!-- 单元测试包-->
<PackageReference Update="xunit" Version="2.9.3"/>
@ -69,8 +80,8 @@
<!-- Magicodes 导入导出Excel-->
<PackageReference Update="Magicodes.IE.Excel" Version="2.7.5.2"/>
<PackageReference Update="Magicodes.IE.Excel.AspNetCore" Version="2.7.5.2"/>
<PackageReference Update="Magicodes.IE.Excel" Version="2.8.0"/>
<PackageReference Update="Magicodes.IE.Excel.AspNetCore" Version="2.8.0"/>
<!-- MiniProfiler 查看接口耗时,sql耗时-->
<PackageReference Update="MiniProfiler.AspNetCore.Mvc" Version="4.5.4"/>
@ -105,5 +116,28 @@
<PackageReference Update="QRCoder" Version="1.6.0" />
<!--Flurl-->
<PackageReference Update="Flurl.Http" Version="4.0.2" />
<PackageReference Update="Mapster" Version="7.4.0" />
<!--Apache.IoTDB-->
<PackageReference Update="Apache.IoTDB" Version="2.0.2.12" />
<!--Kafka-->
<PackageReference Update="Confluent.Kafka" Version="2.11.0" />
<!--DotPulsar-->
<PackageReference Update="DotPulsar" Version="5.1.0" />
<PackageReference Update="K4os.Compression.LZ4" Version="1.3.8" />
<PackageReference Update="ZstdNet" Version="1.4.5" />
<PackageReference Update="ZstdSharp.Port" Version="0.8.6" />
<!--SixLabors.ImageSharp-->
<PackageReference Update="SixLabors.ImageSharp" Version="3.1.12" />
<!--SkiaSharp-->
<PackageReference Update="SkiaSharp" Version="3.119.1" />
</ItemGroup>
</Project>

View File

@ -44,7 +44,7 @@
"DefaultPartitions": 16,
"DefaultBundles": 16,
"EnableAutoCreation": true, //Topic
"TopicMode": "Static", //Dynamic
"TopicMode": "Static", //DynamicStatic
"EnableTopicTypeFilter": true, //Topic
"AllowedTopicTypes": [ "Static" ], //Topic
"AllowedClusters": [ "pulsar-cluster-1" ], //

View File

@ -44,7 +44,7 @@
"DefaultPartitions": 16,
"DefaultBundles": 16,
"EnableAutoCreation": false, //Topic
"TopicMode": "Dynamic", //Dynamic
"TopicMode": "Dynamic", //DynamicStatic
"EnableTopicTypeFilter": true, //Topic
"AllowedTopicTypes": [ "Dynamic" ], //Topic
"AllowedClusters": [ "pulsar-cluster-1" ], //

View File

@ -268,7 +268,7 @@ services:
- pulsar-net
admin-api-service:
image: registry.cn-qingdao.aliyuncs.com/jisheyun/jishe.iot.admin:2025.1119.1155
image: registry.cn-qingdao.aliyuncs.com/jisheyun/jishe.iot.admin:2025.1216.1440
container_name: admin-api
hostname: admin-api
restart: always

View File

@ -27,6 +27,11 @@ services:
timeout: 10s
retries: 5
start_period: 60s
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "3"
bookie:
image: registry.cn-qingdao.aliyuncs.com/jisheyun/pulsar:4.1.1
@ -65,6 +70,11 @@ services:
timeout: 10s
retries: 5
start_period: 60s
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "3"
broker:
image: registry.cn-qingdao.aliyuncs.com/jisheyun/pulsar:4.1.1
@ -135,6 +145,11 @@ services:
timeout: 10s
retries: 5
start_period: 60s
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "3"
iotdb-standalone-service:
image: registry.cn-qingdao.aliyuncs.com/jisheyun/iotdb:2.0.5-standalone
@ -168,6 +183,11 @@ services:
- ./iotdb/logs:/iotdb/logs
networks:
- pulsar-net
logging:
driver: "json-file"
options:
max-size: "500m"
max-file: "5"
redis-service:
image: registry.cn-qingdao.aliyuncs.com/jisheyun/redis:8.0.2-alpine3.21
@ -189,6 +209,11 @@ services:
tty: true
networks:
- pulsar-net
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "3"
mysql-service:
image: registry.cn-qingdao.aliyuncs.com/jisheyun/mysql:8.4.6
@ -218,9 +243,14 @@ services:
tty: true
networks:
- pulsar-net
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "5"
admin-api-service:
image: registry.cn-qingdao.aliyuncs.com/jisheyun/jishe.iot.admin:2025.1119.1155
image: registry.cn-qingdao.aliyuncs.com/jisheyun/jishe.iot.admin:2025.1216.1440
container_name: admin-api
hostname: admin-api
restart: always
@ -248,6 +278,11 @@ services:
condition: service_healthy
networks:
- pulsar-net
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "5"
admin-web-service:
image: registry.cn-qingdao.aliyuncs.com/jisheyun/jishe.iot.ui:2025.1030.0949
@ -268,6 +303,11 @@ services:
condition: service_started
networks:
- pulsar-net
logging:
driver: "json-file"
options:
max-size: "20m"
max-file: "2"
networks:
pulsar-net:

View File

@ -31,6 +31,11 @@ services:
- ./iotdb/logs:/iotdb/logs
networks:
- pulsar-net
logging:
driver: "json-file"
options:
max-size: "200m"
max-file: "5"
redis-service:
image: registry.cn-qingdao.aliyuncs.com/jisheyun/redis:8.0.2-alpine3.21
@ -52,6 +57,11 @@ services:
tty: true
networks:
- pulsar-net
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "3"
mysql-service:
image: registry.cn-qingdao.aliyuncs.com/jisheyun/mysql:8.4.6
@ -81,9 +91,14 @@ services:
tty: true
networks:
- pulsar-net
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "5"
admin-api-service:
image: registry.cn-qingdao.aliyuncs.com/jisheyun/jishe.iot.admin:2025.1119.1155
image: registry.cn-qingdao.aliyuncs.com/jisheyun/jishe.iot.admin:2025.1216.1440
container_name: admin-api
hostname: admin-api
restart: always
@ -107,6 +122,11 @@ services:
condition: service_started
networks:
- pulsar-net
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "5"
admin-web-service:
image: registry.cn-qingdao.aliyuncs.com/jisheyun/jishe.iot.ui:2025.1030.0949
@ -127,6 +147,11 @@ services:
condition: service_started
networks:
- pulsar-net
logging:
driver: "json-file"
options:
max-size: "20m"
max-file: "2"
networks:
pulsar-net:

View File

@ -85,7 +85,7 @@ services:
- pulsar-net
admin-api-service:
image: registry.cn-qingdao.aliyuncs.com/jisheyun/jishe.iot.admin:2025.1119.1155
image: registry.cn-qingdao.aliyuncs.com/jisheyun/jishe.iot.admin:2025.1216.1440
container_name: admin-api
hostname: admin-api
restart: always

View File

@ -1 +1,5 @@
CREATE TABLE IF NOT EXISTS CTWingAepReceiveMessageEntity(time TIMESTAMP TIME, IoTDataType STRING TAG, DeviceType STRING TAG, DeviceAddress STRING TAG, SubDevice STRING TAG, PlatformTenantId STRING FIELD, ProductId STRING FIELD, ServiceId STRING FIELD, IoTPlatformDeviceOpenInfo STRING FIELD, MessageType STRING FIELD, Protocol STRING FIELD, RawMessage STRING FIELD, ReceivedPayload STRING FIELD, ReceivedTimestamps INT64 FIELD, IMSI STRING FIELD, IMEI STRING FIELD ) COMMENT 'CTWingAepReceiveMessageEntity';CREATE TABLE IF NOT EXISTS DeviceTelemetryPacketTaskInfo(time TIMESTAMP TIME, IoTDataType STRING TAG, DeviceType STRING TAG, DeviceAddress STRING TAG, SubDevice STRING TAG, IoTPlatformProductId STRING FIELD, IoTPlatformDeviceOpenInfo STRING FIELD, IoTPlatformProductName STRING FIELD, IoTPlatformAccountId STRING FIELD, AccountPhoneNumber STRING FIELD, TelemetryType INT32 FIELD, IssueRawMessage STRING FIELD, IssuePayload STRING FIELD, ResponseRawMessage STRING FIELD, ResponsePayload STRING FIELD, TelemetrySource INT32 FIELD, IoTPlatform INT32 FIELD, RetryCount INT32 FIELD, LastIssueTime TIMESTAMP FIELD, IssueStatus INT32 FIELD ) COMMENT 'DeviceTelemetryPacketTaskInfo';CREATE TABLE IF NOT EXISTS OneNETReceiveMessageEntity(time TIMESTAMP TIME, IoTDataType STRING TAG, DeviceType STRING TAG, DeviceAddress STRING TAG, SubDevice STRING TAG, ProductId STRING FIELD, IoTPlatformDeviceOpenInfo STRING FIELD, MessageType STRING FIELD, Protocol STRING FIELD, RawMessage STRING FIELD, IsEncrypted BOOLEAN FIELD, PlaintextMessage STRING FIELD, ReceivedPayload STRING FIELD, ReceivedTimestamps INT64 FIELD ) COMMENT 'OneNETReceiveMessageEntity';
CREATE TABLE IF NOT EXISTS CTWingAepReceiveMessageEntity( time TIMESTAMP TIME, IoTDataType STRING TAG, DeviceType STRING TAG, DeviceAddress STRING TAG, SubDevice STRING TAG, PlatformTenantId STRING FIELD, ProductId STRING FIELD, ServiceId STRING FIELD, IoTPlatformDeviceOpenInfo STRING FIELD, MessageType STRING FIELD, Protocol STRING FIELD, RawMessage STRING FIELD, ReceivedPayload STRING FIELD, ReceivedTimestamps INT64 FIELD, IMSI STRING FIELD, IMEI STRING FIELD ) COMMENT 'CTWingAepReceiveMessageEntity';
CREATE TABLE IF NOT EXISTS DeviceTelemetryPacketTaskInfo( time TIMESTAMP TIME, IoTDataType STRING TAG, DeviceType STRING TAG, DeviceAddress STRING TAG, SubDevice STRING TAG, IoTPlatformProductId STRING FIELD, IoTPlatformDeviceOpenInfo STRING FIELD, IoTPlatformProductName STRING FIELD, IoTPlatformAccountId STRING FIELD, AccountPhoneNumber STRING FIELD, IssueRawMessage STRING FIELD, IssuePayload STRING FIELD, ResponseRawMessage STRING FIELD, ResponsePayload STRING FIELD, TelemetrySource INT32 FIELD, IoTPlatform INT32 FIELD, RetryCount INT32 FIELD, LastIssueTime TIMESTAMP FIELD, IssueStatus INT32 FIELD ) COMMENT 'DeviceTelemetryPacketTaskInfo';
CREATE TABLE IF NOT EXISTS OneNETReceiveMessageEntity( time TIMESTAMP TIME, IoTDataType STRING TAG, DeviceType STRING TAG, DeviceAddress STRING TAG, SubDevice STRING TAG, ProductId STRING FIELD, IoTPlatformDeviceOpenInfo STRING FIELD, MessageType STRING FIELD, Protocol STRING FIELD, RawMessage STRING FIELD, IsEncrypted BOOLEAN FIELD, PlaintextMessage STRING FIELD, ReceivedPayload STRING FIELD, ReceivedTimestamps INT64 FIELD ) COMMENT 'OneNETReceiveMessageEntity';

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 18
VisualStudioVersion = 18.0.11217.181 d18.0
VisualStudioVersion = 18.0.11217.181
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.IoT.Domain", "src\JiShe.IoT.Domain\JiShe.IoT.Domain.csproj", "{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}"
EndProject
@ -291,6 +291,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DockerComposeShells", "Dock
DockerComposeShells\start-service-sub.sh = DockerComposeShells\start-service-sub.sh
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JiShe.ServicePro.Shared.DynamicAnalyzerEngine", "JiShe.ServicePro\shared\JiShe.ServicePro.Shared.DynamicAnalyzerEngine\JiShe.ServicePro.Shared.DynamicAnalyzerEngine.csproj", "{539D0149-B52C-7FE1-373D-67EC401D5B47}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JiShe.ServicePro.DynamicAnalyzerEngine", "JiShe.ServicePro\frameworks\src\JiShe.ServicePro.DynamicAnalyzerEngine\JiShe.ServicePro.DynamicAnalyzerEngine.csproj", "{6CDFFB25-15FF-19C2-D4AB-921CF40DB056}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JiShe.ServicePro.DynamicAnalyzer.Provider", "JiShe.ServicePro\frameworks\src\JiShe.ServicePro.DynamicAnalyzer.Provider\JiShe.ServicePro.DynamicAnalyzer.Provider.csproj", "{516CAE8B-3EDC-8B5C-D15C-5BF9ABF971D8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -753,6 +759,18 @@ Global
{C51F35A8-5BF8-8E2F-96B2-B62E3BCF8273}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C51F35A8-5BF8-8E2F-96B2-B62E3BCF8273}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C51F35A8-5BF8-8E2F-96B2-B62E3BCF8273}.Release|Any CPU.Build.0 = Release|Any CPU
{539D0149-B52C-7FE1-373D-67EC401D5B47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{539D0149-B52C-7FE1-373D-67EC401D5B47}.Debug|Any CPU.Build.0 = Debug|Any CPU
{539D0149-B52C-7FE1-373D-67EC401D5B47}.Release|Any CPU.ActiveCfg = Release|Any CPU
{539D0149-B52C-7FE1-373D-67EC401D5B47}.Release|Any CPU.Build.0 = Release|Any CPU
{6CDFFB25-15FF-19C2-D4AB-921CF40DB056}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6CDFFB25-15FF-19C2-D4AB-921CF40DB056}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6CDFFB25-15FF-19C2-D4AB-921CF40DB056}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6CDFFB25-15FF-19C2-D4AB-921CF40DB056}.Release|Any CPU.Build.0 = Release|Any CPU
{516CAE8B-3EDC-8B5C-D15C-5BF9ABF971D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{516CAE8B-3EDC-8B5C-D15C-5BF9ABF971D8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{516CAE8B-3EDC-8B5C-D15C-5BF9ABF971D8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{516CAE8B-3EDC-8B5C-D15C-5BF9ABF971D8}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -882,6 +900,9 @@ Global
{6A26D2DE-215B-CB11-F882-3984B2EE7AA6} = {72493AF2-CDAA-40A7-98AB-B8AA2B05965E}
{C51F35A8-5BF8-8E2F-96B2-B62E3BCF8273} = {72493AF2-CDAA-40A7-98AB-B8AA2B05965E}
{8FE7CFC6-BA2A-4717-941C-0C227EB151B9} = {2C4A6DB8-8D9E-42E6-B7C3-1EDB7B3DE22E}
{539D0149-B52C-7FE1-373D-67EC401D5B47} = {E10B1433-8E8E-4163-AC98-1058004980F9}
{6CDFFB25-15FF-19C2-D4AB-921CF40DB056} = {72493AF2-CDAA-40A7-98AB-B8AA2B05965E}
{516CAE8B-3EDC-8B5C-D15C-5BF9ABF971D8} = {72493AF2-CDAA-40A7-98AB-B8AA2B05965E}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {28315BFD-90E7-4E14-A2EA-F3D23AF4126F}

@ -1 +1 @@
Subproject commit 323492e10b2937a063c9e60b26bc40c6954503c7
Subproject commit 95a6f31a5a1546e612566198f63a2f5e6ce24748

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>

View File

@ -86,9 +86,6 @@
</ItemGroup>
<ItemGroup>
<Content Update="configs\appsettings - 复制.Development.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="configs\appsettings.Development.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>

View File

@ -26,7 +26,7 @@
"TaskThreadCount": -1
},
"Pulsar": {
"ServiceUrl": "pulsar+ssl://iot-north-mq.heclouds.com:6651", //pulsar+ssl://iot-north-mq.heclouds.com:6651 pulsar://192.168.111.174:26974
"ServiceUrl": "pulsar://192.168.111.174:26974", //pulsar+ssl://iot-north-mq.heclouds.com:6651 pulsar://192.168.111.174:26974
"WebUrl": "http://192.168.111.174:9094",
"UserName": "admin",
"TenantName": "1YMVZZkAkRArjxSD8457",
@ -39,14 +39,14 @@
"ConnectionTimeout": 30,
"OperationTimeout": 30,
"KeepAliveInterval": 30,
"TaskThreadCount": 8,
"TaskThreadCount": 1,
"IsSubscriber": true,
"DefaultPartitions": 16,
"DefaultBundles": 16,
"EnableAutoCreation": false, //Topic
"TopicMode": "Dynamic", //Dynamic
"EnableAutoCreation": true, //Topic
"TopicMode": "Static", //DynamicStatic
"EnableTopicTypeFilter": true, //Topic
"AllowedTopicTypes": [ "Dynamic" ], //Topic
"AllowedTopicTypes": [ "Static" ], //Topic
"AllowedClusters": [ "pulsar-cluster-1" ], //
"AdminRoles": [ "admin" ],
"EnableConsumerIdleCleanup": true,

View File

@ -11,19 +11,9 @@ namespace JiShe.IoT.DeviceAggregation
public class DeviceCommandForApiInput:IdInput
{
/// <summary>
/// 设备在物联网平台中发送的命令内容JSON格式
/// 设备在物联网平台中属性设置的参数键值对
/// </summary>
[Required(ErrorMessage = "命令内容不能为空")]
public string CommandContent { get; set; }
/// <summary>
/// 设备类型
/// </summary>
public DeviceTypeEnum? DeviceType { get; set; }
/// <summary>
/// 设备指令类型
/// </summary>
public DeviceTelemetryCommandTypeEnum? TelemetryType { get; set; }
public Dictionary<string,object> CommandContent { get; set; }
}
}

View File

@ -0,0 +1,22 @@
using JiShe.ServicePro.Enums;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JiShe.IoT.IoTPlatformAggregation.Dto
{
/// <summary>
/// 产品信息输入
/// </summary>
public class IoTPlatformProductInfoInput
{
/// <summary>
/// 平台类型
/// </summary>
[Required]
public IoTPlatformTypeEnum IoTPlatformType { get; set; }
}
}

View File

@ -0,0 +1,31 @@
using JiShe.ServicePro.Enums;
using Swashbuckle.AspNetCore.Annotations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JiShe.IoT.IoTPlatformAggregation.Dto
{
/// <summary>
/// 平台产品信息
/// </summary>
public class IoTPlatformProductInfoOutput
{
/// <summary>
/// 物联网平台类型
/// </summary>
public IoTPlatformTypeEnum IoTPlatformType { get; set; }
/// <summary>
/// 物联网平台对应的产品Id
/// </summary>
public string IoTPlatformProductId { get; set; }
/// <summary>
/// 产品名称
/// </summary>
public string ProductName { get; set; }
}
}

View File

@ -0,0 +1,28 @@
using JiShe.ServicePro.Enums;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JiShe.IoT.IoTPlatformAggregation.Dto
{
/// <summary>
/// 产品属性信息输入
/// </summary>
public class IoTPlatformProductPropertyInfoInput
{
/// <summary>
/// 物联网平台类型,默认没有指定
/// </summary>
[Required]
public IoTPlatformTypeEnum IoTPlatformType { get; set; }
/// <summary>
/// 物联网平台中对应的产品Id
/// </summary>
[Required]
public string IoTPlatformProductId { get; set; }
}
}

View File

@ -0,0 +1,32 @@
using JiShe.IoT.IoTPlatformAggregation.Dto;
using JiShe.ServicePro.Commons;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JiShe.IoT.IoTPlatformAggregation
{
/// <summary>
/// 平台聚合服务
/// </summary>
public interface IIoTPlatformAggregationService
{
/// <summary>
/// 获取平台产品信息
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
Task<List<IoTPlatformProductInfoOutput>> GetIoTPlatformProductInfoAsync(IoTPlatformProductInfoInput input
);
/// <summary>
/// 获取平台产品物模型属性信息
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
Task<List<SelectResult>> GetIoTPlatformProductPropertyInfoAsync(IoTPlatformProductPropertyInfoInput input
);
}
}

View File

@ -45,7 +45,10 @@ namespace JiShe.IoT.BusinessSystemAggregation
return handleResult;
}
var messageBody = handleResult.Data;
string tempMessageBody = null;
if(messageBody== null || messageBody.Commands == null || messageBody.Commands.Count <= 0)
{
return HttpDataResultExtensions.Failed("设备指令不能为空", -103, ResponeResultEnum.Fail);
}
//限定来源类型必须为业务系统
if (messageBody.SourceType != DeviceTelemetrySourceTypeEnum.BusinessSystem)
@ -60,7 +63,7 @@ namespace JiShe.IoT.BusinessSystemAggregation
return HttpDataResultExtensions.Failed("设备不存在", -1041, ResponeResultEnum.Fail);
}
var packetTaskInfo = GetDeviceTelemetryPacketTaskInfo(ioTDBOptions, input, deviceInfo.Adapt<DeviceCacheInfos>(), tempMessageBody);
var packetTaskInfo = GetDeviceTelemetryPacketTaskInfo(ioTDBOptions, input, deviceInfo.Adapt<DeviceCacheInfos>(), messageBody.Commands.Serialize());
//将指令存储IoTDB数据库和Redis发布通道
if (deviceInfo.IoTPlatform == IoTPlatformTypeEnum.OneNET)

View File

@ -6,6 +6,7 @@ using JiShe.ServicePro.DataChannelManages;
using JiShe.ServicePro.DeviceManagement.DeviceInfos;
using JiShe.ServicePro.DeviceManagement.DeviceInfos.Dto;
using JiShe.ServicePro.DeviceManagement.Permissions;
using JiShe.ServicePro.DeviceManagement.ThingModels;
using JiShe.ServicePro.Dto;
using JiShe.ServicePro.Enums;
using JiShe.ServicePro.FreeRedisProvider;
@ -29,7 +30,9 @@ namespace JiShe.IoT.DeviceAggregation
/// <param name="redisPubSubService">Redis发布订阅服务</param>
/// <param name="ioTDBDataChannelManageService">数据通道</param>
/// <param name="_ioTDBOptions">IoTDBOptions</param>
public class DeviceAggregationService(ILogger<DeviceAggregationService> logger, IDeviceAppService deviceAppService, IOneNETDeviceService oneNETDeviceService, IReliableRedisPubSubService redisPubSubService, IIoTDBDataChannelManageService ioTDBDataChannelManageService,IOptions<IoTDBOptions> _ioTDBOptions) : IoTAppService, IDeviceAggregationService
/// <param name="oneNETProductService">OneNET产品服务</param>
/// <param name="deviceThingModelService">设备端物模型服务</param>
public class DeviceAggregationService(ILogger<DeviceAggregationService> logger, IDeviceAppService deviceAppService, IOneNETDeviceService oneNETDeviceService, IReliableRedisPubSubService redisPubSubService, IIoTDBDataChannelManageService ioTDBDataChannelManageService,IOptions<IoTDBOptions> _ioTDBOptions, IOneNETProductService oneNETProductService, IDeviceThingModelManagementAppService deviceThingModelService) : IoTAppService, IDeviceAggregationService
{
IoTDBOptions ioTDBOptions = _ioTDBOptions.Value;
@ -288,47 +291,45 @@ namespace JiShe.IoT.DeviceAggregation
{
try
{
if (input.CommandContent == null || input.CommandContent.Keys.Count <=0)
{
throw new UserFriendlyException($"指令参数异常");
}
var deviceInfo = await deviceAppService.FindByIdAsync(input);
if (deviceInfo == null)
{
throw new UserFriendlyException($"设备不存在");
}
//将指令存储
var commandRequest = new OpenApiRequest()
{
Message = new ReceiveCommandInfoDto()
var receiveCommandInfoDto = new ReceiveCommandInfoDto()
{
DeviceAddress = deviceInfo.DeviceAddress,
Commands = input.CommandContent.Deserialize<Dictionary<string,object>>(),
DeviceType = input.DeviceType ?? DeviceTypeEnum.GATEWAY,//todo 设备类型 需要跟设备统一什么情况下知道具体设备类型
Commands = input.CommandContent,
DeviceType = deviceInfo.DeviceType,
SourceType = DeviceTelemetrySourceTypeEnum.AdminSystem,
TelemetryType = input.TelemetryType ?? DeviceTelemetryCommandTypeEnum.,
IoTPlatform = deviceInfo.IoTPlatform,
}.Serialize(),
};
var packetTaskInfo = GetDeviceTelemetryPacketTaskInfo(ioTDBOptions, commandRequest, deviceInfo.Adapt<DeviceCacheInfos>(), commandRequest.Message);
//数据写入遥测任务数据存储通道
if (deviceInfo.IoTPlatform == IoTPlatformTypeEnum.OneNET)
{
await ioTDBDataChannelManageService.DeviceTelemetryTaskWriterAsync(DataChannelManage.DeviceTelemetryTaskDataChannel.Writer, (DistributedMessageCenterConst.OneNETCommandIssuedEventName, packetTaskInfo));
return await DeviceCommandInfoToOneNET(deviceInfo, packetTaskInfo);
return await DeviceCommandInfoToOneNET(deviceInfo, receiveCommandInfoDto);
}
else if (deviceInfo.IoTPlatform == IoTPlatformTypeEnum.CTWing)
{
await redisPubSubService.PublishReliableAsync(DistributedMessageCenterConst.CTWingAepCommandIssuedEventName,commandRequest);
return true;
//await redisPubSubService.PublishReliableAsync(DistributedMessageCenterConst.CTWingAepCommandIssuedEventName,commandRequest);
//return true;
throw new UserFriendlyException($"发送设备指令信息失败CTWing暂未实现。");
}
else
{
throw new UserFriendlyException($"创建设备失败,未找到对应的产品配置信息。");
throw new UserFriendlyException($"发送设备指令信息失败,未找到对应的产品配置信息。");
}
}
catch (Exception)
{
throw;
}
}
@ -388,14 +389,16 @@ namespace JiShe.IoT.DeviceAggregation
{
CreateDeviceInput createDeviceInput = input.Adapt<CreateDeviceInput>();
var productInfo = await FreeSqlDbContext.Instance.Select<OneNETProductInfos>()
.Where(e => e.IoTPlatformProductId == input.IoTPlatformProductId)//此处不需要过滤产品状态,方便测试产品配置信息是否准确,避免跟车间生产搞混
.WhereIf(input.DeviceSourceTypeEnum == DeviceSourceTypeEnum.Workshop, e => e.IsEnabled == true)
.FirstAsync();
var productInfo = await oneNETProductService.GetProductInfoAsync(new IdInput<string>() { Id = input.IoTPlatformProductId });
if (productInfo == null)
{
throw new UserFriendlyException($"创建设备失败,未找到对应的产品配置信息。");
throw new UserFriendlyException($"OneNET创建设备失败未找到对应的产品配置信息。");
}
if (input.DeviceSourceTypeEnum == DeviceSourceTypeEnum.Workshop && !productInfo.IsEnabled) //车间生产推送,必须是已经启用的产品才可以
{
throw new UserFriendlyException($"车间生产推送OneNET创建设备失败产品未启用。");
}
createDeviceInput.DeviceName = input.DeviceAddress;
@ -533,34 +536,25 @@ namespace JiShe.IoT.DeviceAggregation
{
try
{
var productInfo = await FreeSqlDbContext.Instance.Select<OneNETProductInfos>()
.Where(e => e.IoTPlatformProductId == input.IoTPlatformProductId)
.FirstAsync();
if (productInfo == null)
{
throw new UserFriendlyException($"推送失败,未找到对应的产品配置信息。");
}
//检查OneNET平台设备是否已经存在
var oneNETDeviceInfoResult = await oneNETDeviceService.DeviceInfoDetailAsync(new DeviceInfoDetailInput()
{
DeviceName = input.IoTPlatformDeviceOpenInfo,
ProductId = productInfo.IoTPlatformProductId,
OneNETAccountId = productInfo.OneNETAccountId,
ProductId = input.IoTPlatformProductId,
OneNETAccountId = input.IoTPlatformAccountId,
});
if (oneNETDeviceInfoResult != null && oneNETDeviceInfoResult.Code == ServicePro.Enums.ResponeResultEnum.Success)
{
throw new UserFriendlyException($"推送失败OneNET账号{productInfo.AccountPhoneNumber}的产品下{productInfo.ProductName}已经存在该设备{input.DeviceAddress}。");
throw new UserFriendlyException($"OneNET推送失败账号产品下{input.IoTPlatformProductId}已经存在该设备{input.DeviceAddress}。");
}
//推送至OneNET平台
var pushResult = await oneNETDeviceService.CreateDeviceInfoAsync(new CreateDeviceInfoInput()
{
DeviceName = input.IoTPlatformDeviceOpenInfo,
ProductId = productInfo.IoTPlatformProductId,
OneNETAccountId = productInfo.OneNETAccountId,
ProductId = input.IoTPlatformProductId,
OneNETAccountId = input.IoTPlatformAccountId,
Description = input.DeviceAddress,
});
@ -590,22 +584,12 @@ namespace JiShe.IoT.DeviceAggregation
{
try
{
var productInfo = await FreeSqlDbContext.Instance.Select<OneNETProductInfos>()
.Where(e => e.IoTPlatformProductId == input.IoTPlatformProductId)
.FirstAsync();
if (productInfo == null)
{
throw new UserFriendlyException($"删除失败,未找到对应的产品配置信息。");
}
//删除OneNET平台设备信息
var deleteResult = await oneNETDeviceService.DeleteDeviceInfoAsync(new DeleteDeviceInfoInput()
{
DeviceName = input.IoTPlatformDeviceOpenInfo,
ProductId = productInfo.IoTPlatformProductId,
OneNETAccountId = productInfo.OneNETAccountId,
ProductId = input.IoTPlatformProductId,
OneNETAccountId = input.IoTPlatformAccountId,
});
if (deleteResult == null || deleteResult.Code != ServicePro.Enums.ResponeResultEnum.Success)
@ -634,13 +618,39 @@ namespace JiShe.IoT.DeviceAggregation
/// 发送OneNET平台设备指令
/// </summary>
/// <param name="deviceInfo"></param>
/// <param name="packetTaskInfo"></param>
/// <param name="input"></param>
/// <returns></returns>
/// <exception cref="UserFriendlyException"></exception>
public async Task<bool> DeviceCommandInfoToOneNET(DeviceManagementInfoDto deviceInfo, DeviceTelemetryPacketTaskInfo packetTaskInfo)
public async Task<bool> DeviceCommandInfoToOneNET(DeviceManagementInfoDto deviceInfo, ReceiveCommandInfoDto input)
{
try
{
//检查设备是否有配置设备端物模型信息
//如果有配置就检查指令字典中是否有SpecialCommand标识符
//如果有就需要构建 SpecialCommand 的特别指令
if (deviceInfo.IsNeedConfigDevicMdoel && deviceInfo.DeviceThingModelDataId.HasValue && input.Commands.ContainsKey(ThingModelFixedTypeConst.SpecialCommand))
{
var propertyInfo = await oneNETProductService.GetProductThingModelSpecialCommandDataTypeListAsync(new IdInput<string>() { Id = deviceInfo.IoTPlatformProductId });
if (propertyInfo == null)
{
throw new UserFriendlyException($"{nameof(DeviceCommandInfoToOneNET)} OneNET设备属性设置失败产品Id{deviceInfo.IoTPlatformProductId}未找到对应的属性信息。");
}
Dictionary<string, string> tempSpecialCommand = await deviceThingModelService.BuildThingModelSpecialCommandAsync(propertyInfo, deviceInfo.DeviceThingModelDataId.Value);
input.Commands[ThingModelFixedTypeConst.SpecialCommand] = tempSpecialCommand;
}
var commandRequest = new OpenApiRequest()
{
Message = input.Serialize(),
};
var packetTaskInfo = GetDeviceTelemetryPacketTaskInfo(ioTDBOptions, commandRequest, deviceInfo.Adapt<DeviceCacheInfos>(), input.Commands.Serialize());
await ioTDBDataChannelManageService.DeviceTelemetryTaskWriterAsync(DataChannelManage.DeviceTelemetryTaskDataChannel.Writer, (DistributedMessageCenterConst.OneNETCommandIssuedEventName, packetTaskInfo));
//检查下设备是否在线
var deviceOnlineStatus = await oneNETDeviceService.DeviceInfoDetailAsync(new DeviceInfoDetailInput()
{

View File

@ -52,8 +52,8 @@ namespace JiShe.IoT
DeviceType = $"{commandIssueInfo.DeviceType}",
DeviceAddress = commandIssueInfo.DeviceAddress,
IssueRawMessage = input.Serialize(),
IssuePayload = messageBody,
IoTDataType = IoTDBDataTypeConst.Command,
TelemetryType = (int)commandIssueInfo.TelemetryType,
TelemetrySource = (int)commandIssueInfo.SourceType,
IoTPlatform = (int)commandIssueInfo.IoTPlatform,
IoTPlatformProductId = deviceInfo.IoTPlatformProductId,
@ -61,7 +61,6 @@ namespace JiShe.IoT
IoTPlatformAccountId = deviceInfo.IoTPlatformAccountId,
AccountPhoneNumber = deviceInfo.AccountPhoneNumber,
IoTPlatformProductName = deviceInfo.IoTPlatformProductName,
IssuePayload = messageBody,
RetryCount = 0,
IssueStatus = (int)DeviceCommandIssueStatusEnum.Unprocessed,
LastIssueTime = DateTime.Now

View File

@ -0,0 +1,179 @@
using Castle.Core.Logging;
using JiShe.IoT.IoTPlatformAggregation.Dto;
using JiShe.ServicePro.Commons;
using JiShe.ServicePro.Core;
using JiShe.ServicePro.CTWingManagement.CTWingProducts;
using JiShe.ServicePro.Enums;
using JiShe.ServicePro.FreeRedisProvider;
using JiShe.ServicePro.OneNETManagement.OneNETProducts;
using Microsoft.AspNetCore.DataProtection.KeyManagement;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp;
namespace JiShe.IoT.IoTPlatformAggregation
{
/// <summary>
/// 平台聚合服务
/// </summary>
public class IoTPlatformAggregationService : IoTAppService, IIoTPlatformAggregationService
{
private readonly ILogger<IoTPlatformAggregationService> _logger;
private readonly ICTWingProductService _ctwingProductService;
private readonly IOneNETProductService _oneNetProductService;
public IoTPlatformAggregationService(ILogger<IoTPlatformAggregationService> logger,
ICTWingProductService ctwingProductService,
IOneNETProductService oneNetProductService)
{
_logger = logger;
_ctwingProductService = ctwingProductService;
_oneNetProductService = oneNetProductService;
}
/// <summary>
/// 获取平台产品信息
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public async Task<List<IoTPlatformProductInfoOutput>> GetIoTPlatformProductInfoAsync(IoTPlatformProductInfoInput input
)
{
try
{
if (input == null)
{
throw new UserFriendlyException($"{nameof(GetIoTPlatformProductInfoAsync)} 平台产品聚合服务获取产品信息失败,参数异常");
}
List<IoTPlatformProductInfoOutput> ioTPlatformProductInfoOutputs = new List<IoTPlatformProductInfoOutput>();
if (input.IoTPlatformType == IoTPlatformTypeEnum.CTWing)
{
var ctwingProductInfos = await _ctwingProductService.GetAllListAsync();
if (ctwingProductInfos == null)
{
return ioTPlatformProductInfoOutputs;
}
foreach (var ctwingProductInfo in ctwingProductInfos)
{
ioTPlatformProductInfoOutputs.Add(new IoTPlatformProductInfoOutput
{
IoTPlatformType = IoTPlatformTypeEnum.CTWing,
IoTPlatformProductId = ctwingProductInfo.IoTPlatformProductId,
ProductName = ctwingProductInfo.ProductName
});
}
}
if (input.IoTPlatformType == IoTPlatformTypeEnum.OneNET)
{
var oneNetProductInfos = await _oneNetProductService.GetAllListAsync();
if (oneNetProductInfos == null)
{
return ioTPlatformProductInfoOutputs;
}
foreach (var oneNetProductInfo in oneNetProductInfos)
{
ioTPlatformProductInfoOutputs.Add(new IoTPlatformProductInfoOutput
{
IoTPlatformType = IoTPlatformTypeEnum.OneNET,
IoTPlatformProductId = oneNetProductInfo.IoTPlatformProductId,
ProductName = oneNetProductInfo.ProductName
});
}
}
return ioTPlatformProductInfoOutputs;
}
catch (Exception)
{
throw;
}
}
/// <summary>
/// 获取平台产品物模型属性信息
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public async Task<List<SelectResult>> GetIoTPlatformProductPropertyInfoAsync(IoTPlatformProductPropertyInfoInput input)
{
try
{
if (input == null)
{
throw new UserFriendlyException($"{nameof(GetIoTPlatformProductPropertyInfoAsync)} 平台产品聚合服务获取产品属性信息失败,参数异常");
}
var key = string.Format($"{RedisConst.CachePlatformProductThingModelInfoKey}", input.IoTPlatformType);
List<SelectResult> selectResults = new List<SelectResult>();
List<IoTPlatformProductInfoOutput> ioTPlatformProductInfoOutputs = new List<IoTPlatformProductInfoOutput>();
if (input.IoTPlatformType == IoTPlatformTypeEnum.CTWing)
{
//var ctwingProductInfos = await _ctwingProductService.GetAllListAsync();
//if (ctwingProductInfos == null)
//{
// return ioTPlatformProductInfoOutputs;
//}
//foreach (var ctwingProductInfo in ctwingProductInfos)
//{
// ioTPlatformProductInfoOutputs.Add(new IoTPlatformProductInfoOutput
// {
// IoTPlatformType = IoTPlatformTypeEnum.CTWing,
// IoTPlatformProductId = ctwingProductInfo.IoTPlatformProductId,
// ProductName = ctwingProductInfo.ProductName
// });
//}
_logger.LogError($"{nameof(GetIoTPlatformProductPropertyInfoAsync)}产品聚合服务暂不支持CTWing产品物模型属性信息查询");
return selectResults;
}
if (input.IoTPlatformType == IoTPlatformTypeEnum.OneNET)
{
var oneNETAllThingModel = FreeRedisProvider.Instance.HGet<OneNETAllThingModel>(key, input.IoTPlatformProductId);
if (oneNETAllThingModel != null)
{
return OneNETAllThingModel.GetAllPropertiesSelectResult(oneNETAllThingModel.Properties);
}
var oneNetProductInfos = await _oneNetProductService.GetProductInfoAsync(new IdInput<string>() { Id = input.IoTPlatformProductId });
if (oneNetProductInfos == null || string.IsNullOrWhiteSpace(oneNetProductInfos.ThingModelInfos))
{
return selectResults;
}
oneNETAllThingModel = oneNetProductInfos.ThingModelInfos.Deserialize<OneNETAllThingModel>();
if (oneNETAllThingModel == null)
{
return selectResults;
}
await FreeRedisProvider.Instance.HSetAsync<OneNETAllThingModel>(key, input.IoTPlatformProductId, oneNETAllThingModel);
return OneNETAllThingModel.GetAllPropertiesSelectResult(oneNETAllThingModel.Properties);
}
return selectResults;
}
catch (Exception)
{
throw;
}
}
}
}

View File

@ -5,8 +5,8 @@
"IoTDBOptions": {
"UserName": "root",
"Password": "Lixiao@1980",
//"TreeModelClusterList": [ "47.110.53.196:6667", "47.110.60.222:6667", "47.110.62.104:6667" ],
//"TableModelClusterList": [ "47.110.53.196:6667", "47.110.60.222:6667", "47.110.62.104:6667" ],
//"TreeModelClusterList": [ "192.168.111.174:6667", "47.110.60.222:6667", "47.110.62.104:6667" ],
//"TableModelClusterList": [ "192.168.111.174:6667", "47.110.60.222:6667", "47.110.62.104:6667" ],
"TreeModelClusterList": [ "192.168.111.174:30710" ],
"TableModelClusterList": [ "192.168.111.174:30710" ],
"PoolSize": 32,

View File

@ -23,6 +23,7 @@
<ProjectReference Include="..\..\JiShe.ServicePro\modules\TemplateManagement\src\JiShe.ServicePro.TemplateManagement.Domain.Shared\JiShe.ServicePro.TemplateManagement.Domain.Shared.csproj" />
<ProjectReference Include="..\..\JiShe.ServicePro\modules\OneNETManagement\src\JiShe.ServicePro.OneNETManagement.Domain.Shared\JiShe.ServicePro.OneNETManagement.Domain.Shared.csproj" />
<ProjectReference Include="..\..\JiShe.ServicePro\frameworks\src\JiShe.ServicePro.Core\JiShe.ServicePro.Core.csproj" />
<ProjectReference Include="..\..\JiShe.ServicePro\shared\JiShe.ServicePro.Shared.DynamicAnalyzerEngine\JiShe.ServicePro.Shared.DynamicAnalyzerEngine.csproj" />
</ItemGroup>
@ -39,6 +40,7 @@
<PackageReference Include="JiShe.ServicePro.Core" />
<PackageReference Include="JiShe.ServicePro.CTWingManagement.Domain.Shared" />
<PackageReference Include="JiShe.ServicePro.OneNETManagement.Domain.Shared" />
<PackageReference Include="JiShe.ServicePro.Shared.DynamicAnalyzerEngine" />
</ItemGroup>
<ItemGroup>

View File

@ -50,6 +50,8 @@ namespace JiShe.IoT.EntityFrameworkCore
public DbSet<TenantConnectionString> TenantConnectionStrings { get; set; }
public DbSet<BackgroundJobRecord> BackgroundJobs { get; set; }
public DbSet<AuditLog> AuditLogs { get; set; }
public DbSet<AuditLogExcelFile> AuditLogExcelFiles { get; set; }
public DbSet<Notification> Notifications { get; set; }
public DbSet<NotificationSubscription> NotificationSubscriptions { get; set; }
public DbSet<DataDictionary> DataDictionaries { get; set; }

View File

@ -10,7 +10,7 @@ namespace JiShe.IoT.EntityFrameworkCore
{
[DependsOn(
typeof(IoTDomainModule),
typeof(AbpEntityFrameworkCoreMySQLModule),
typeof(AbpEntityFrameworkCoreMySQLPomeloModule),
typeof(BasicManagementEntityFrameworkCoreModule),
typeof(DataDictionaryManagementEntityFrameworkCoreModule),
typeof(NotificationManagementEntityFrameworkCoreModule),

View File

@ -1,3 +1,5 @@
using Microsoft.EntityFrameworkCore;
namespace JiShe.IoT.EntityFrameworkCore
{
/* This class is needed for EF Core console commands
@ -9,9 +11,9 @@ namespace JiShe.IoT.EntityFrameworkCore
IoTEfCoreEntityExtensionMappings.Configure();
var configuration = BuildConfiguration();
var serverVersion = new MySqlServerVersion(new Version(8, 4, 6));
var builder = new DbContextOptionsBuilder<IoTDbContext>()
.UseMySql(configuration.GetConnectionString("Default"), MySqlServerVersion.LatestSupportedServerVersion);
.UseMySql(configuration.GetConnectionString("Default") , serverVersion);
return new IoTDbContext(builder.Options);
}

View File

@ -6,7 +6,10 @@
<ItemGroup>
<ProjectReference Include="..\JiShe.IoT.Domain\JiShe.IoT.Domain.csproj" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.MySQL" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.MySQL.Pomelo" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.14.0" />
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="4.14.0" />
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="4.14.0" />
</ItemGroup>
<ItemGroup Condition=" '$(Configuration)' == 'Debug'" Label="Debug">

View File

@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace JiShe.IoT.Migrations
{
[DbContext(typeof(IoTDbContext))]
[Migration("20251205064351_InitialCreate")]
[Migration("20251222073841_InitialCreate")]
partial class InitialCreate
{
/// <inheritdoc />
@ -22,7 +22,7 @@ namespace JiShe.IoT.Migrations
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql)
.HasAnnotation("ProductVersion", "9.0.4")
.HasAnnotation("ProductVersion", "9.0.11")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
@ -813,7 +813,7 @@ namespace JiShe.IoT.Migrations
.HasColumnType("int")
.HasComment("旧系统授权最后修改者Id");
b.PrimitiveCollection<string>("PropertyArray")
b.Property<string>("PropertyArray")
.IsRequired()
.HasMaxLength(1024)
.HasColumnType("varchar(1024)")
@ -887,7 +887,6 @@ namespace JiShe.IoT.Migrations
.HasComment("函数解析标记默认为false 不能解析");
b.Property<string>("FunctionScript")
.IsRequired()
.HasColumnType("text")
.HasComment("脚本函数体");
@ -927,10 +926,6 @@ namespace JiShe.IoT.Migrations
.HasColumnType("int")
.HasComment("旧系统授权最后修改者Id");
b.Property<int>("ParsingSequence")
.HasColumnType("int")
.HasComment("解析顺序1234或者3412(高低位反转)");
b.Property<string>("Remark")
.HasColumnType("longtext")
.HasComment("备注");
@ -1016,7 +1011,6 @@ namespace JiShe.IoT.Migrations
.HasComment("物联网平台中对应的产品Id");
b.Property<string>("IoTPlatformRawFieldDataType")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("varchar(20)")
.HasComment("物联网平台中对应的产品物模型属性或者事件数据类型");
@ -1027,6 +1021,10 @@ namespace JiShe.IoT.Migrations
.HasColumnType("varchar(64)")
.HasComment("物联网平台中对应的产品物模型属性或者事件名称");
b.Property<Guid>("IoTPlatformThingModelDataId")
.HasColumnType("char(36)")
.HasComment("系统中平台端物模型数据Id");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit(1)")
@ -1045,6 +1043,14 @@ namespace JiShe.IoT.Migrations
.HasColumnType("char(36)")
.HasColumnName("LastModifierId");
b.Property<int>("NativeSkipNumber")
.HasColumnType("int")
.HasComment("正序跳过数量");
b.Property<int>("NativeTakeNumber")
.HasColumnType("int")
.HasComment("正序获取数量");
b.Property<int?>("OSACreatorId")
.HasColumnType("int")
.HasComment("旧系统授权创建者Id");
@ -1057,13 +1063,21 @@ namespace JiShe.IoT.Migrations
.HasColumnType("int")
.HasComment("旧系统授权最后修改者Id");
b.Property<int>("ParsingSequence")
.HasColumnType("int")
.HasComment("解析顺序1234或者3412(高低反转)");
b.Property<string>("Remark")
.HasColumnType("longtext")
.HasComment("备注");
b.Property<int>("SkipNumber")
b.Property<int?>("ReversalSkipNumber")
.HasColumnType("int")
.HasComment("跳过数量");
.HasComment("反转跳过数量");
b.Property<int?>("ReversalTakeNumber")
.HasColumnType("int")
.HasComment("反转获取数量");
b.Property<string>("StandardFieldDisplayName")
.IsRequired()
@ -1083,10 +1097,6 @@ namespace JiShe.IoT.Migrations
.HasColumnType("varchar(20)")
.HasComment("标准物模型字段值类型");
b.Property<int>("TakeNumber")
.HasColumnType("int")
.HasComment("获取数量");
b.Property<Guid?>("TenantId")
.HasColumnType("char(36)")
.HasColumnName("TenantId")
@ -1157,6 +1167,15 @@ namespace JiShe.IoT.Migrations
.HasColumnType("varchar(50)")
.HasComment("物联网平台中对应的产品Id");
b.Property<string>("IoTPlatformRawFieldDataType")
.HasMaxLength(64)
.HasColumnType("varchar(64)")
.HasComment("物联网平台中对应的产品物模型属性或者事件数据类型");
b.Property<string>("IoTPlatformRawFieldExtension")
.HasColumnType("text")
.HasComment("物联网平台中对应产品物模型标识符扩展,用于扩展结构体类型");
b.Property<string>("IoTPlatformRawFieldName")
.IsRequired()
.HasMaxLength(64)
@ -1169,6 +1188,10 @@ namespace JiShe.IoT.Migrations
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<sbyte>("IsSpecialIdentifier")
.HasColumnType("tinyint(1)")
.HasComment("是否是特殊物模型标识符");
b.Property<sbyte>("IsValueNeedConvert")
.HasColumnType("tinyint(1)")
.HasComment("是否需要值类型转换");
@ -2355,6 +2378,33 @@ namespace JiShe.IoT.Migrations
b.ToTable("AbpAuditLogActions", (string)null);
});
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogExcelFile", b =>
{
b.Property<Guid>("Id")
.HasColumnType("char(36)");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime(6)")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("char(36)")
.HasColumnName("CreatorId");
b.Property<string>("FileName")
.HasMaxLength(256)
.HasColumnType("varchar(256)")
.HasColumnName("FileName");
b.Property<Guid?>("TenantId")
.HasColumnType("char(36)")
.HasColumnName("TenantId");
b.HasKey("Id");
b.ToTable("AbpAuditLogExcelFiles", (string)null);
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b =>
{
b.Property<Guid>("Id")

View File

@ -14,6 +14,23 @@ namespace JiShe.IoT.Migrations
migrationBuilder.AlterDatabase()
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "AbpAuditLogExcelFiles",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
FileName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci")
},
constraints: table =>
{
table.PrimaryKey("PK_AbpAuditLogExcelFiles", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "AbpAuditLogs",
columns: table => new
@ -967,9 +984,8 @@ namespace JiShe.IoT.Migrations
.Annotation("MySql:CharSet", "utf8mb4"),
ScriptName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false, comment: "脚本函数名称")
.Annotation("MySql:CharSet", "utf8mb4"),
FunctionScript = table.Column<string>(type: "text", nullable: false, comment: "脚本函数体")
FunctionScript = table.Column<string>(type: "text", nullable: true, comment: "脚本函数体")
.Annotation("MySql:CharSet", "utf8mb4"),
ParsingSequence = table.Column<int>(type: "int", nullable: false, comment: "解析顺序1234或者3412(高低位反转)"),
FunctionAnalysisFlag = table.Column<sbyte>(type: "tinyint(1)", nullable: false, comment: "函数解析标记默认为false 不能解析"),
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
@ -1005,11 +1021,12 @@ namespace JiShe.IoT.Migrations
IoTPlatform = table.Column<int>(type: "int", nullable: false, comment: "物联网平台类型"),
IoTPlatformProductId = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "物联网平台中对应的产品Id")
.Annotation("MySql:CharSet", "utf8mb4"),
IoTPlatformThingModelDataId = table.Column<Guid>(type: "char(36)", nullable: false, comment: "系统中平台端物模型数据Id", collation: "ascii_general_ci"),
FiledType = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "物联网平台中对应产品物模型属性或者事件类型")
.Annotation("MySql:CharSet", "utf8mb4"),
IoTPlatformRawFieldName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false, comment: "物联网平台中对应的产品物模型属性或者事件名称")
.Annotation("MySql:CharSet", "utf8mb4"),
IoTPlatformRawFieldDataType = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, comment: "物联网平台中对应的产品物模型属性或者事件数据类型")
IoTPlatformRawFieldDataType = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "物联网平台中对应的产品物模型属性或者事件数据类型")
.Annotation("MySql:CharSet", "utf8mb4"),
StandardFieldName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false, comment: "管理后台产品标准的物模型属性或者事件名称")
.Annotation("MySql:CharSet", "utf8mb4"),
@ -1018,8 +1035,11 @@ namespace JiShe.IoT.Migrations
StandardFieldDisplayName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false, comment: "管理后台产品标准的物模型属性或者事件名称")
.Annotation("MySql:CharSet", "utf8mb4"),
IsValueNeedConvert = table.Column<sbyte>(type: "tinyint(1)", nullable: false, comment: "是否需要值类型转换"),
SkipNumber = table.Column<int>(type: "int", nullable: false, comment: "跳过数量"),
TakeNumber = table.Column<int>(type: "int", nullable: false, comment: "获取数量"),
NativeSkipNumber = table.Column<int>(type: "int", nullable: false, comment: "正序跳过数量"),
NativeTakeNumber = table.Column<int>(type: "int", nullable: false, comment: "正序获取数量"),
ParsingSequence = table.Column<int>(type: "int", nullable: false, comment: "解析顺序1234或者3412(高低反转)"),
ReversalSkipNumber = table.Column<int>(type: "int", nullable: true, comment: "反转跳过数量"),
ReversalTakeNumber = table.Column<int>(type: "int", nullable: true, comment: "反转获取数量"),
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
@ -1057,6 +1077,8 @@ namespace JiShe.IoT.Migrations
.Annotation("MySql:CharSet", "utf8mb4"),
IoTPlatformRawFieldName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false, comment: "物联网平台中对应的产品物模型属性或者事件名称")
.Annotation("MySql:CharSet", "utf8mb4"),
IoTPlatformRawFieldDataType = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true, comment: "物联网平台中对应的产品物模型属性或者事件数据类型")
.Annotation("MySql:CharSet", "utf8mb4"),
StandardFieldName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false, comment: "管理后台产品标准的物模型属性或者事件名称")
.Annotation("MySql:CharSet", "utf8mb4"),
StandardFieldValueType = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, comment: "标准物模型字段值类型")
@ -1064,6 +1086,9 @@ namespace JiShe.IoT.Migrations
StandardFieldDisplayName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false, comment: "管理后台产品标准的物模型属性或者事件名称")
.Annotation("MySql:CharSet", "utf8mb4"),
IsValueNeedConvert = table.Column<sbyte>(type: "tinyint(1)", nullable: false, comment: "是否需要值类型转换"),
IsSpecialIdentifier = table.Column<sbyte>(type: "tinyint(1)", nullable: false, comment: "是否是特殊物模型标识符"),
IoTPlatformRawFieldExtension = table.Column<string>(type: "text", nullable: true, comment: "物联网平台中对应产品物模型标识符扩展,用于扩展结构体类型")
.Annotation("MySql:CharSet", "utf8mb4"),
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
@ -2040,6 +2065,9 @@ namespace JiShe.IoT.Migrations
migrationBuilder.DropTable(
name: "AbpAuditLogActions");
migrationBuilder.DropTable(
name: "AbpAuditLogExcelFiles");
migrationBuilder.DropTable(
name: "AbpBackgroundJobs");

View File

@ -19,7 +19,7 @@ namespace JiShe.IoT.Migrations
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql)
.HasAnnotation("ProductVersion", "9.0.4")
.HasAnnotation("ProductVersion", "9.0.11")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
@ -810,7 +810,7 @@ namespace JiShe.IoT.Migrations
.HasColumnType("int")
.HasComment("旧系统授权最后修改者Id");
b.PrimitiveCollection<string>("PropertyArray")
b.Property<string>("PropertyArray")
.IsRequired()
.HasMaxLength(1024)
.HasColumnType("varchar(1024)")
@ -884,7 +884,6 @@ namespace JiShe.IoT.Migrations
.HasComment("函数解析标记默认为false 不能解析");
b.Property<string>("FunctionScript")
.IsRequired()
.HasColumnType("text")
.HasComment("脚本函数体");
@ -924,10 +923,6 @@ namespace JiShe.IoT.Migrations
.HasColumnType("int")
.HasComment("旧系统授权最后修改者Id");
b.Property<int>("ParsingSequence")
.HasColumnType("int")
.HasComment("解析顺序1234或者3412(高低位反转)");
b.Property<string>("Remark")
.HasColumnType("longtext")
.HasComment("备注");
@ -1013,7 +1008,6 @@ namespace JiShe.IoT.Migrations
.HasComment("物联网平台中对应的产品Id");
b.Property<string>("IoTPlatformRawFieldDataType")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("varchar(20)")
.HasComment("物联网平台中对应的产品物模型属性或者事件数据类型");
@ -1024,6 +1018,10 @@ namespace JiShe.IoT.Migrations
.HasColumnType("varchar(64)")
.HasComment("物联网平台中对应的产品物模型属性或者事件名称");
b.Property<Guid>("IoTPlatformThingModelDataId")
.HasColumnType("char(36)")
.HasComment("系统中平台端物模型数据Id");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit(1)")
@ -1042,6 +1040,14 @@ namespace JiShe.IoT.Migrations
.HasColumnType("char(36)")
.HasColumnName("LastModifierId");
b.Property<int>("NativeSkipNumber")
.HasColumnType("int")
.HasComment("正序跳过数量");
b.Property<int>("NativeTakeNumber")
.HasColumnType("int")
.HasComment("正序获取数量");
b.Property<int?>("OSACreatorId")
.HasColumnType("int")
.HasComment("旧系统授权创建者Id");
@ -1054,13 +1060,21 @@ namespace JiShe.IoT.Migrations
.HasColumnType("int")
.HasComment("旧系统授权最后修改者Id");
b.Property<int>("ParsingSequence")
.HasColumnType("int")
.HasComment("解析顺序1234或者3412(高低反转)");
b.Property<string>("Remark")
.HasColumnType("longtext")
.HasComment("备注");
b.Property<int>("SkipNumber")
b.Property<int?>("ReversalSkipNumber")
.HasColumnType("int")
.HasComment("跳过数量");
.HasComment("反转跳过数量");
b.Property<int?>("ReversalTakeNumber")
.HasColumnType("int")
.HasComment("反转获取数量");
b.Property<string>("StandardFieldDisplayName")
.IsRequired()
@ -1080,10 +1094,6 @@ namespace JiShe.IoT.Migrations
.HasColumnType("varchar(20)")
.HasComment("标准物模型字段值类型");
b.Property<int>("TakeNumber")
.HasColumnType("int")
.HasComment("获取数量");
b.Property<Guid?>("TenantId")
.HasColumnType("char(36)")
.HasColumnName("TenantId")
@ -1154,6 +1164,15 @@ namespace JiShe.IoT.Migrations
.HasColumnType("varchar(50)")
.HasComment("物联网平台中对应的产品Id");
b.Property<string>("IoTPlatformRawFieldDataType")
.HasMaxLength(64)
.HasColumnType("varchar(64)")
.HasComment("物联网平台中对应的产品物模型属性或者事件数据类型");
b.Property<string>("IoTPlatformRawFieldExtension")
.HasColumnType("text")
.HasComment("物联网平台中对应产品物模型标识符扩展,用于扩展结构体类型");
b.Property<string>("IoTPlatformRawFieldName")
.IsRequired()
.HasMaxLength(64)
@ -1166,6 +1185,10 @@ namespace JiShe.IoT.Migrations
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<sbyte>("IsSpecialIdentifier")
.HasColumnType("tinyint(1)")
.HasComment("是否是特殊物模型标识符");
b.Property<sbyte>("IsValueNeedConvert")
.HasColumnType("tinyint(1)")
.HasComment("是否需要值类型转换");
@ -2352,6 +2375,33 @@ namespace JiShe.IoT.Migrations
b.ToTable("AbpAuditLogActions", (string)null);
});
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogExcelFile", b =>
{
b.Property<Guid>("Id")
.HasColumnType("char(36)");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime(6)")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("char(36)")
.HasColumnName("CreatorId");
b.Property<string>("FileName")
.HasMaxLength(256)
.HasColumnType("varchar(256)")
.HasColumnName("FileName");
b.Property<Guid?>("TenantId")
.HasColumnType("char(36)")
.HasColumnName("TenantId");
b.HasKey("Id");
b.ToTable("AbpAuditLogExcelFiles", (string)null);
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b =>
{
b.Property<Guid>("Id")

View File

@ -0,0 +1,49 @@
using JiShe.IoT.DeviceAggregation;
using JiShe.IoT.DeviceAggregation.Dto;
using JiShe.IoT.IoTPlatformAggregation;
using JiShe.IoT.IoTPlatformAggregation.Dto;
using JiShe.ServicePro;
using JiShe.ServicePro.Commons;
using JiShe.ServicePro.Core;
using JiShe.ServicePro.DeviceManagement.DeviceInfos;
namespace JiShe.IoT.Controllers
{
/// <summary>
/// 平台产品聚合服务
/// </summary>
[Route("/Aggregation/IoTPlatform")]
public class IoTPlatformAggregationController : IoTController
{
private readonly IIoTPlatformAggregationService _iotPlatformAggregationService;
public IoTPlatformAggregationController(IIoTPlatformAggregationService deviceAggregationService)
{
_iotPlatformAggregationService = deviceAggregationService;
}
/// <summary>
/// 获取平台产品信息
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost(nameof(GetIoTPlatformProductInfoAsync))]
[SwaggerOperation(summary: "获取平台产品信息", Tags = new[] { "AggregationIoTPlatform" })]
public async Task<List<IoTPlatformProductInfoOutput>> GetIoTPlatformProductInfoAsync(IoTPlatformProductInfoInput input)
{
return await _iotPlatformAggregationService.GetIoTPlatformProductInfoAsync(input);
}
/// <summary>
/// 获取平台产品物模型属性信息
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost(nameof(GetIoTPlatformProductPropertyInfoAsync))]
[SwaggerOperation(summary: "获取平台产品物模型属性信息", Tags = new[] { "AggregationIoTPlatform" })]
public async Task<List<SelectResult>> GetIoTPlatformProductPropertyInfoAsync(IoTPlatformProductPropertyInfoInput input)
{
return await _iotPlatformAggregationService.GetIoTPlatformProductPropertyInfoAsync(input);
}
}
}