|
|
|
@ -0,0 +1,56 @@
|
|
|
|
|
using Infrastructure.Data;
|
|
|
|
|
using IoT.Shared.Application.Domain.Entities;
|
|
|
|
|
using Microsoft.AspNetCore.Http;
|
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace Platform.Areas.IoTCenter.Controllers
|
|
|
|
|
{
|
|
|
|
|
[Area("IoTCenter")]
|
|
|
|
|
public class AjaxController : IoT.Shared.Areas.IoTCenter.Controlls.AjaxBaseController
|
|
|
|
|
{
|
|
|
|
|
private readonly IRepository<Area> _areaRepo;
|
|
|
|
|
private readonly IRepository<Building> _buildingRepo;
|
|
|
|
|
private readonly IRepository<Role> _roleRepo;
|
|
|
|
|
|
|
|
|
|
public AjaxController(IServiceProvider services,
|
|
|
|
|
ILogger<AjaxController> logger,
|
|
|
|
|
IHttpContextAccessor httpContxt,
|
|
|
|
|
IRepository<IoTProductCategory> categoryRepo,
|
|
|
|
|
IRepository<IoTProduct> productRepo,
|
|
|
|
|
IRepository<Organ> organRepo,
|
|
|
|
|
IRepository<BuildingIoTGateway> buildingIoTGatewayRepo,
|
|
|
|
|
IRepository<OrganIoTScene> organSceneRepo,
|
|
|
|
|
IRepository<IoTGateway> nodeRepo,
|
|
|
|
|
IRepository<IoTScene> sceneRepo,
|
|
|
|
|
IRepository<IoTCommand> commandRepo,
|
|
|
|
|
IRepository<IoTDevice> deviceRepo,
|
|
|
|
|
IRepository<IoTData> dataRepo,
|
|
|
|
|
IRepository<IoTApi> apiRepo,
|
|
|
|
|
IRepository<IoTSceneTigger> sceneTiggerRepo,
|
|
|
|
|
IRepository<Area> areaRepo,
|
|
|
|
|
IRepository<Building> buildingRepo,
|
|
|
|
|
IRepository<Role> roleRepo)
|
|
|
|
|
: base(services,
|
|
|
|
|
logger,
|
|
|
|
|
httpContxt,
|
|
|
|
|
categoryRepo,
|
|
|
|
|
productRepo,
|
|
|
|
|
organRepo,
|
|
|
|
|
buildingIoTGatewayRepo,
|
|
|
|
|
organSceneRepo,
|
|
|
|
|
nodeRepo,
|
|
|
|
|
sceneRepo,
|
|
|
|
|
commandRepo,
|
|
|
|
|
deviceRepo,
|
|
|
|
|
dataRepo,
|
|
|
|
|
apiRepo,
|
|
|
|
|
sceneTiggerRepo)
|
|
|
|
|
{
|
|
|
|
|
this._areaRepo = areaRepo;
|
|
|
|
|
this._buildingRepo = buildingRepo;
|
|
|
|
|
this._roleRepo = roleRepo;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|