38 lines
1009 B
C#
38 lines
1009 B
C#
using Microsoft.AspNetCore.Mvc;
|
|
using WcsMain.ApiServe.ControllerFilter.ExceptionFilter;
|
|
using WcsMain.ApiServe.Controllers.Dto;
|
|
using WcsMain.ApiServe.Controllers.Dto.WcsDto.PLC;
|
|
using WcsMain.ApiServe.Service.WcsService;
|
|
using WcsMain.DataBase.TableEntity;
|
|
|
|
namespace WcsMain.ApiServe.Controllers.WcsController;
|
|
|
|
[Route("api/wcs/plc")]
|
|
[ApiController]
|
|
[WcsExceptionFilter]
|
|
public class PlcController(PlcService plcService) : ControllerBase
|
|
{
|
|
|
|
private readonly PlcService _plcService = plcService;
|
|
|
|
/// <summary>
|
|
/// 查询plc
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet("getPlc")]
|
|
public WcsApiResponse<List<AppPLC>> GetPlc()
|
|
{
|
|
return _plcService.GetPlc();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 添加或者修改配置项
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <returns></returns>
|
|
[HttpPost("editePlc")]
|
|
public WcsApiResponse EditePlc([FromBody] EditePLCRequest request)
|
|
{
|
|
return _plcService.EditePlc(request);
|
|
}
|
|
} |