This commit is contained in:
ChenYi 2025-10-31 14:13:22 +08:00
parent a8dbb90021
commit 1f2f6ce981
6 changed files with 97 additions and 2 deletions

View File

@ -33,5 +33,7 @@ namespace JiShe.IoT.BusinessSystemAggregation
/// <param name="input"></param> /// <param name="input"></param>
/// <returns></returns> /// <returns></returns>
Task<HttpDataResult> BatchCreateDeviceInfoAsync(OpenApiRequest input); Task<HttpDataResult> BatchCreateDeviceInfoAsync(OpenApiRequest input);
Task<string> BatchCreateDeviceInfoAsync2(OpenApiRequest input);
} }
} }

View File

@ -1,4 +1,5 @@
using JiShe.IoT.DeviceAggregation.Dto; using JiShe.IoT.DeviceAggregation.Dto;
using JiShe.ServicePro;
using JiShe.ServicePro.Core; using JiShe.ServicePro.Core;
using JiShe.ServicePro.DeviceManagement.DeviceInfos; using JiShe.ServicePro.DeviceManagement.DeviceInfos;
using Volo.Abp; using Volo.Abp;
@ -75,5 +76,9 @@ namespace JiShe.IoT.DeviceAggregation
/// <param name="input"></param> /// <param name="input"></param>
/// <returns></returns> /// <returns></returns>
Task<bool> BatchCreateDeviceBusinessSystemAsync(BatchCreateDeviceAggregationInput input); Task<bool> BatchCreateDeviceBusinessSystemAsync(BatchCreateDeviceAggregationInput input);
Task<HttpDataResult> BatchCreateDeviceInfoAsync();
Task<string> BatchCreateDeviceInfoAsync2();
} }
} }

View File

@ -221,5 +221,23 @@ namespace JiShe.IoT.BusinessSystemAggregation
return HttpDataResultExtensions.Failed($"查询设备数据失败,发送异常:{ex.Message}", -106); return HttpDataResultExtensions.Failed($"查询设备数据失败,发送异常:{ex.Message}", -106);
} }
} }
/// <summary>
/// 业务系统批量新增设备数据Msg 字段为 BatchCreateDeviceInfoInput 实体
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public async Task<string> BatchCreateDeviceInfoAsync2(OpenApiRequest input)
{
try
{
return "新增设备成功";
}
catch (Exception ex)
{
return ex.Message;
}
}
} }
} }

View File

@ -439,6 +439,40 @@ namespace JiShe.IoT.DeviceAggregation
} }
} }
/// <summary>
/// 业务系统批量新增设备数据Msg 字段为 BatchCreateDeviceInfoInput 实体
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public async Task<HttpDataResult> BatchCreateDeviceInfoAsync()
{
try
{
return HttpDataResultExtensions.Success("新增设备成功");
}
catch (Exception ex)
{
return HttpDataResultExtensions.Failed($"查询设备数据失败,发送异常:{ex.Message}", -106);
}
}
/// <summary>
/// 业务系统批量新增设备数据Msg 字段为 BatchCreateDeviceInfoInput 实体
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public async Task<string> BatchCreateDeviceInfoAsync2()
{
try
{
return "新增设备成功";
}
catch (Exception ex)
{
return ex.Message;
}
}
/// <summary> /// <summary>
/// OneNET设备批量创建 /// OneNET设备批量创建
/// </summary> /// </summary>

View File

@ -45,5 +45,15 @@ namespace JiShe.IoT.Controllers
{ {
return await _businessSystemAggregationService.BatchCreateDeviceInfoAsync(input); return await _businessSystemAggregationService.BatchCreateDeviceInfoAsync(input);
} }
/// <summary>
/// 业务系统批量新增设备数据
/// </summary>
[HttpPost(nameof(BatchCreateDeviceInfoAsync2))]
[SwaggerOperation(summary: "业务系统批量新增设备数据", Tags = new[] { "AggregationBusiness" })]
public async Task<string> BatchCreateDeviceInfoAsync2(OpenApiRequest input)
{
return await _businessSystemAggregationService.BatchCreateDeviceInfoAsync2(input);
}
} }
} }

View File

@ -1,5 +1,6 @@
using JiShe.IoT.DeviceAggregation; using JiShe.IoT.DeviceAggregation;
using JiShe.IoT.DeviceAggregation.Dto; using JiShe.IoT.DeviceAggregation.Dto;
using JiShe.ServicePro;
using JiShe.ServicePro.Core; using JiShe.ServicePro.Core;
using JiShe.ServicePro.DeviceManagement.DeviceInfos; using JiShe.ServicePro.DeviceManagement.DeviceInfos;
@ -86,5 +87,30 @@ namespace JiShe.IoT.Controllers
return _deviceAggregationService.DeviceCommandForApiAsync(input); return _deviceAggregationService.DeviceCommandForApiAsync(input);
} }
/// <summary>
/// 发送设备指令信息
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost(nameof(DeviceCommandForApiAsync))]
[SwaggerOperation(summary: "发送设备指令信息", Tags = new[] { "AggregationDevice" })]
public Task<HttpDataResult> BatchCreateDeviceInfoAsync()
{
return _deviceAggregationService.BatchCreateDeviceInfoAsync();
}
/// <summary>
/// 发送设备指令信息
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost(nameof(BatchCreateDeviceInfoAsync2))]
[SwaggerOperation(summary: "发送设备指令信息", Tags = new[] { "AggregationDevice" })]
public Task<string> BatchCreateDeviceInfoAsync2()
{
return _deviceAggregationService.BatchCreateDeviceInfoAsync2();
}
} }
} }