From 645d3e1db096836cfc544d24f664031d922883e7 Mon Sep 17 00:00:00 2001 From: ChenYi <296215406@outlook.com> Date: Fri, 31 Oct 2025 14:36:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IBusinessSystemAggregationService.cs | 2 ++ .../BusinessSystemAggregationService.cs | 18 ++++++++++++++++++ .../DeviceAggregationService.cs | 2 +- .../BusinessSystemAggregationController.cs | 11 +++++++++++ 4 files changed, 32 insertions(+), 1 deletion(-) diff --git a/src/JiShe.IoT.Application.Contracts/BusinessSystemAggregation/IBusinessSystemAggregationService.cs b/src/JiShe.IoT.Application.Contracts/BusinessSystemAggregation/IBusinessSystemAggregationService.cs index d17add6..a255e5d 100644 --- a/src/JiShe.IoT.Application.Contracts/BusinessSystemAggregation/IBusinessSystemAggregationService.cs +++ b/src/JiShe.IoT.Application.Contracts/BusinessSystemAggregation/IBusinessSystemAggregationService.cs @@ -35,5 +35,7 @@ namespace JiShe.IoT.BusinessSystemAggregation Task BatchCreateDeviceInfoAsync(OpenApiRequest input); Task BatchCreateDeviceInfoAsync2(OpenApiRequest input); + + Task BatchCreateDeviceInfoAsync3(OpenApiRequest input); } } diff --git a/src/JiShe.IoT.Application/BusinessSystemAggregation/BusinessSystemAggregationService.cs b/src/JiShe.IoT.Application/BusinessSystemAggregation/BusinessSystemAggregationService.cs index 54dd0d6..df6a59e 100644 --- a/src/JiShe.IoT.Application/BusinessSystemAggregation/BusinessSystemAggregationService.cs +++ b/src/JiShe.IoT.Application/BusinessSystemAggregation/BusinessSystemAggregationService.cs @@ -239,5 +239,23 @@ namespace JiShe.IoT.BusinessSystemAggregation return ex.Message; } } + + + /// + /// 业务系统批量新增设备数据,Msg 字段为 BatchCreateDeviceInfoInput 实体 + /// + /// + /// + public async Task BatchCreateDeviceInfoAsync3(OpenApiRequest input) + { + try + { + return HandleOpenApiRequest(null, null); + } + catch (Exception ex) + { + return HandleOpenApiRequest(null, null); + } + } } } diff --git a/src/JiShe.IoT.Application/DeviceAggregation/DeviceAggregationService.cs b/src/JiShe.IoT.Application/DeviceAggregation/DeviceAggregationService.cs index e1bfb3c..2bcda85 100644 --- a/src/JiShe.IoT.Application/DeviceAggregation/DeviceAggregationService.cs +++ b/src/JiShe.IoT.Application/DeviceAggregation/DeviceAggregationService.cs @@ -448,7 +448,7 @@ namespace JiShe.IoT.DeviceAggregation { try { - return HttpDataResultExtensions.Success("新增设备成功"); + return HandleOpenApiRequest(null, null); } catch (Exception ex) { diff --git a/src/JiShe.IoT.HttpApi/Controllers/BusinessSystemAggregationController.cs b/src/JiShe.IoT.HttpApi/Controllers/BusinessSystemAggregationController.cs index 7278477..6bf05fb 100644 --- a/src/JiShe.IoT.HttpApi/Controllers/BusinessSystemAggregationController.cs +++ b/src/JiShe.IoT.HttpApi/Controllers/BusinessSystemAggregationController.cs @@ -55,5 +55,16 @@ namespace JiShe.IoT.Controllers { return await _businessSystemAggregationService.BatchCreateDeviceInfoAsync2(input); } + + + /// + /// 业务系统批量新增设备数据 + /// + [HttpPost(nameof(BatchCreateDeviceInfoAsync3))] + [SwaggerOperation(summary: "业务系统批量新增设备数据", Tags = new[] { "AggregationBusiness" })] + public async Task BatchCreateDeviceInfoAsync3(OpenApiRequest input) + { + return await _businessSystemAggregationService.BatchCreateDeviceInfoAsync3(input); + } } }