using Microsoft.AspNetCore.Mvc;
using WCS.BLL.Services.IService;
using WCS.BLL.Services.Service;
using WCS.Model;
using WCS.Model.ApiModel;
using WCS.Model.ApiModel.SelfCheck;
using WCS.Model.ApiModel.SingleLight;
using WCS.Model.ApiModel.Stocktaking;
using WCS.Model.ApiModel.User;
using WCS.Model.WebSocketModel;
namespace WCS.WebApi.Controllers
{
///
/// 单灯单独控制亮灯接口 煤科院钻探分院项目
///
[ApiController]
[Route("[controller]")]
public class SingleLightController : ControllerBase
{
public ISingleLightService _singleLightService { get; set; }
public SingleLightController(ISingleLightService singleLightService)
{
_singleLightService = singleLightService;
}
[Route("singleLightControl")]
[HttpPost(Name = "singleLightControl")]
public async Task SingleLightControl(SingleLightControlRequest request)
{
try
{
return await _singleLightService.SingleLightControl(request);
}
catch (Exception ex)
{
return new ResponseBase()
{
Code = 300,
Message = "操作失败:" + ex.Message,
};
}
}
}
}