1
This commit is contained in:
48
WCS.WebApi/Controllers/SingleLightController.cs
Normal file
48
WCS.WebApi/Controllers/SingleLightController.cs
Normal file
@ -0,0 +1,48 @@
|
||||
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
|
||||
{
|
||||
/// <summary>
|
||||
/// 单灯单独控制亮灯接口 煤科院钻探分院项目
|
||||
/// </summary>
|
||||
[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<ResponseBase> SingleLightControl(SingleLightControlRequest request)
|
||||
{
|
||||
try
|
||||
{
|
||||
return await _singleLightService.SingleLightControl(request);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new ResponseBase()
|
||||
{
|
||||
Code = 300,
|
||||
Message = "操作失败:" + ex.Message,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user