first commit -push

This commit is contained in:
dungtt
2025-10-15 15:15:53 +07:00
parent 674ae395be
commit a9577c5756
885 changed files with 74595 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using RobotNet.RobotManager.Services.OpenACS;
using RobotNet.RobotShares.OpenACS;
using RobotNet.Shares;
namespace RobotNet.RobotManager.Controllers;
[Route("api/[controller]")]
[ApiController]
[Authorize]
public class TrafficACSRequestController(TrafficACS TrafficACS, Services.RobotManager RobotManager) : ControllerBase
{
[HttpPost]
public async Task<MessageResult<bool>> UpdateTrafficSetting([FromBody] TrafficACSRequestModel model)
=> model.Type switch
{
TrafficRequestType.IN => await TrafficACS.RequestIn(model.RobotId, model.ZoneId),
TrafficRequestType.OUT => await TrafficACS.RequestOut(model.RobotId, model.ZoneId),
_ => await TrafficACS.RequestOut(model.RobotId, model.ZoneId),
};
[HttpGet]
public RobotACSLockedDto[] GetRobotLocked() => RobotManager.GetRobotACSLocked();
}