测试
This commit is contained in:
parent
a8dbb90021
commit
1f2f6ce981
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -220,6 +220,24 @@ 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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>
|
||||||
|
|||||||
@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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;
|
||||||
|
|
||||||
@ -85,6 +86,31 @@ 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();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user