using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using WIDESEAWCS_Core; using WIDESEAWCS_Core.BaseController; using WIDESEAWCS_DTO.SerialPort; using WIDESEAWCS_DTO.TaskInfo; using WIDESEAWCS_ITaskInfoService; using WIDESEAWCS_Model.Models; namespace WIDESEAWCS_Server.Controllers.SerialPort { [Route("api/[controller]")] [ApiController] public class ProcessController : ApiBaseController { public ProcessController(IProcessServer service) : base(service) { } [HttpGet, Route("GetSleeveandStep"), AllowAnonymous] public WebResponseContent GetSleeveandStep() { return Service.GetSleeveandStep(); } /// /// 根据id来判断是添加还是更新 /// /// /// [HttpPost, Route("AddOrUpdateProcess"), AllowAnonymous] public WebResponseContent AddOrUpdateProcess([FromBody] AddProcessDTO addProcessDTO) { return Service.AddOrUpdateProcess(addProcessDTO); } /// /// 获取当前任务工作步骤 /// /// /// /// [HttpGet, Route("Getcircuit"), AllowAnonymous] public WebResponseContent Getcircuit(string group, string takeid) { return Service.Getcircuit(group,takeid); } /// /// 下一步 /// /// /// /// [HttpPost, Route("Nextprocess"), AllowAnonymous] public WebResponseContent Nextprocess([FromBody] SetpDTO setpDTO, bool flag) { return Service.Nextprocess(setpDTO, flag); } /// /// 上一步 /// /// /// [HttpPost, Route("PreviousProcess"), AllowAnonymous] public WebResponseContent PreviousProcess([FromBody] SetpDTO setpDTO) { return Service.PreviousProcess(setpDTO); } /// /// 读取当前工艺步骤的扭力值与次数 /// /// /// /// [HttpPost, Route("GetValueandNumber"), AllowAnonymous] public WebResponseContent GetValueandNumber(string grop, int setnum) { return Service.GetValueandNumber(grop, setnum); } } }