using JiShe.IoT.CommonServices; using JiShe.IoT.CommonServices.Dto; using JiShe.IoT.DeviceAggregation; using JiShe.IoT.DeviceAggregation.Dto; using JiShe.IoT.OneNETAggregation; using JiShe.IoT.OneNETAggregation.Dto; using JiShe.ServicePro; using JiShe.ServicePro.Commons; using JiShe.ServicePro.Core; using JiShe.ServicePro.DeviceManagement.DeivceInfos.Dto; using JiShe.ServicePro.DeviceManagement.Meters.Dto; using JiShe.ServicePro.OneNETManagement.OneNETProducts; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace JiShe.IoT.Controllers { /// /// 设备聚合服务 /// [Route("/Aggregation/Device")] public class DeviceAggregationController : IoTController { private readonly IDeviceAggregationService _deviceAggregationService; public DeviceAggregationController(IDeviceAggregationService deviceAggregationService) { _deviceAggregationService = deviceAggregationService; } /// /// 创建设备信息 /// /// /// [HttpPost(nameof(CreateAsync))] [SwaggerOperation(summary: "创建设备信息", Tags = new[] { "AggregationDevice" })] public async Task CreateAsync(CreateDeviceAggregationInput input) { return await _deviceAggregationService.CreateAsync(input); } /// /// 删除设备信息 /// [HttpPost(nameof(DeleteAsync))] [SwaggerOperation(summary: "删除设备信息", Tags = new[] { "AggregationDevice" })] public async Task DeleteAsync(IdInput input) { return await _deviceAggregationService.DeleteAsync(input); } /// /// 根据设备ID查询设备信息 /// [HttpPost(nameof(FindByIdAsync))] [SwaggerOperation(summary: "根据设备ID查询设备信息", Tags = new[] { "AggregationDevice" })] public async Task FindByIdAsync(IdInput input) { return await _deviceAggregationService.FindByIdAsync(input); } } }