| | |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using System.DirectoryServices.Protocols; |
| | | using WIDESEA_Common.CommonEnum; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_DTO; |
| | | using WIDESEA_DTO.GradingMachine; |
| | | using WIDESEA_DTO.Stock; |
| | | using WIDESEA_DTO.Task; |
| | | using WIDESEA_ITaskInfoService; |
| | |
| | | /// </summary> |
| | | /// <param name="taskDto"></param> |
| | | /// <returns></returns> |
| | | [HttpGet, HttpPost, Route("CreateTaskInbound"),AllowAnonymous] |
| | | [HttpGet, HttpPost, Route("CreateTaskInbound"), AllowAnonymous] |
| | | public async Task<WebResponseContent?> CreateTaskInboundAsync([FromBody] CreateTaskDto taskDto) |
| | | { |
| | | return await Service.CreateTaskInboundAsync(taskDto); |
| | |
| | | public async Task<WebResponseContent?> CreateTaskOutboundAsync([FromBody] CreateTaskDto taskDto) |
| | | { |
| | | return await Service.CreateTaskOutboundAsync(taskDto); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 手动创建任务 |
| | | /// </summary> |
| | | /// <param name="dto">手动创建任务参数</param> |
| | | /// <returns></returns> |
| | | [HttpGet, HttpPost, Route("CreateManualTask"), AllowAnonymous] |
| | | public async Task<WebResponseContent?> CreateManualTaskAsync([FromBody] CreateManualTaskDto dto) |
| | | { |
| | | return await Service.CreateManualTaskAsync(dto); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 手动下发任务到WCS |
| | | /// </summary> |
| | | /// <param name="dtos">下发任务参数列表</param> |
| | | /// <returns>批量下发结果</returns> |
| | | [HttpGet, HttpPost, Route("DispatchTasksToWCS"), AllowAnonymous] |
| | | public async Task<WebResponseContent?> DispatchTasksToWCSAsync([FromBody] List<DispatchTaskDto> dtos) |
| | | { |
| | | return await Service.DispatchTasksToWCSAsync(dtos); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 移库任务完成:修改库存位置与状态,修改源/目标货位状态,删除任务数据 |
| | | /// </summary> |
| | | /// <param name="taskDto"></param> |
| | | /// <returns></returns> |
| | | [HttpGet, HttpPost, Route("RelocationFinishTask"), AllowAnonymous] |
| | | public async Task<WebResponseContent?> RelocationFinishTaskAsync([FromBody] CreateTaskDto taskDto) |
| | | { |
| | | return await Service.RelocationFinishTaskAsync(taskDto); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 创建空托盘出库任务 |
| | | /// </summary> |
| | | /// <param name="taskDto"></param> |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 创建空托盘出库任务 |
| | | /// 创建空托盘入库任务 |
| | | /// </summary> |
| | | /// <param name="taskDto"></param> |
| | | /// <returns></returns> |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 空托盘出库完成 |
| | | /// </summary> |
| | | /// <param name="taskDto"></param> |
| | | /// <returns></returns> |
| | | [HttpGet, HttpPost, Route("OutboundFinishTaskTray"), AllowAnonymous] |
| | | public async Task<WebResponseContent?> OutboundFinishTaskTrayAsync([FromBody] CreateTaskDto taskDto) |
| | | { |
| | | return await Service.OutboundFinishTaskTrayAsync(taskDto); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 修改任务状态(根据任务ID修改为指定状态) |
| | | /// </summary> |
| | | /// <param name="taskDto"></param> |
| | |
| | | [HttpGet, HttpPost, Route("UpdateTaskByStatus"), AllowAnonymous] |
| | | public async Task<WebResponseContent?> UpdateTaskByStatusAsync([FromBody] UpdateTaskDto taskDto) |
| | | { |
| | | return await Service.UpdateTaskByStatusAsync(taskDto.Id, taskDto.NewStatus); |
| | | return await Service.UpdateTaskByStatusAsync(taskDto); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 创建机械手组盘任务 |
| | | /// </summary> |
| | | /// <param name="taskDto"></param> |
| | | /// <returns></returns> |
| | | [HttpGet, HttpPost, Route("CreateRobotGroupPalletTask"), AllowAnonymous] |
| | | public async Task<WebResponseContent?> CreateRobotGroupPalletTaskAsync([FromBody] StockDTO taskDto) |
| | | { |
| | | return await Service.CreateRobotGroupPalletTaskAsync(taskDto); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 创建机械手拆盘任务 |
| | | /// </summary> |
| | | /// <param name="taskDto"></param> |
| | | /// <returns></returns> |
| | | [HttpGet, HttpPost, Route("CreateRobotSplitPalletTask"), AllowAnonymous] |
| | | public async Task<WebResponseContent?> CreateRobotSplitPalletTaskAsync([FromBody] StockDTO taskDto) |
| | | { |
| | | return await Service.CreateRobotSplitPalletTaskAsync(taskDto); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 创建机械手换盘任务 |
| | | /// </summary> |
| | | /// <param name="taskDto"></param> |
| | | /// <returns></returns> |
| | | [HttpGet, HttpPost, Route("CreateRobotChangePalletTask"), AllowAnonymous] |
| | | public async Task<WebResponseContent?> CreateRobotChangePalletTaskAsync([FromBody] StockDTO taskDto) |
| | | { |
| | | return await Service.CreateRobotChangePalletTaskAsync(taskDto); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpGet, HttpPost, Route("InOrOutCompleted"), AllowAnonymous] |
| | | public async Task<WebResponseContent?> InOrOutCompletedAsync([FromBody] InputDto input) |
| | | public async Task<WebResponseContent?> InOrOutCompletedAsync([FromBody] GradingMachineInputDto input) |
| | | { |
| | | return await Service.InOrOutCompletedAsync(input); |
| | | } |
| | |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpGet, HttpPost, Route("SendLocationStatus"), AllowAnonymous] |
| | | public async Task<WebResponseContent?> SendLocationStatusAsync([FromBody] InputDto input) |
| | | public async Task<WebResponseContent?> SendLocationStatusAsync([FromBody] GradingMachineInputDto input) |
| | | { |
| | | return await Service.SendLocationStatusAsync(input); |
| | | } |
| | |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpGet, HttpPost, Route("RequestOutbound"), AllowAnonymous] |
| | | public async Task<WebResponseContent?> RequestOutboundAsync([FromBody] InputDto input) |
| | | public async Task<WebResponseContent?> RequestOutboundAsync([FromBody] GradingMachineInputDto input) |
| | | { |
| | | return await Service.RequestOutboundAsync(input); |
| | | } |
| | |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpGet, HttpPost, Route("GetPalletCodeCell"), AllowAnonymous] |
| | | public async Task<WebResponseContent?> GetPalletCodeCellAsync([FromBody] InputDto input) |
| | | public async Task<WebResponseContent?> GetPalletCodeCellAsync([FromBody] GradingMachineInputDto input) |
| | | { |
| | | return await Service.GetPalletCodeCellAsync(input); |
| | | } |
| | | |
| | | #region 极卷库任务模块 |
| | | |
| | | /// <summary> |
| | | /// 出入库申请 |
| | | /// </summary> |
| | | /// <param name="applyInOutDto">请求参数</param> |
| | | /// <returns></returns> |
| | | [HttpPost("ApplyInOut"), AllowAnonymous] |
| | | public async Task<AGVResponse> ApplyInOutAsync([FromBody] ApplyInOutDto applyInOutDto) |
| | | { |
| | | return await Service.ApplyInOutAsync(applyInOutDto); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 手动出库完成反馈给AGV |
| | | /// </summary> |
| | | /// <param name="outTaskCompleteDto">请求参数</param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("OutTaskComplete"), AllowAnonymous] |
| | | public async Task<WebResponseContent> OutTaskComplete([FromBody] OutTaskCompleteDto outTaskCompleteDto) |
| | | { |
| | | return await Service.OutTaskComplete(outTaskCompleteDto); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 输送线申请进入 |
| | | /// </summary> |
| | | /// <param name="applyEnterDto">请求参数</param> |
| | | /// <returns></returns> |
| | | [HttpPost("ApplyEnter"), AllowAnonymous] |
| | | public async Task<AGVResponse?> ApplyEnterAsync([FromBody] ApplyEnterDto applyEnterDto) |
| | | { |
| | | return await Service.ApplyEnterAsync(applyEnterDto); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 取放货完成 |
| | | /// </summary> |
| | | /// <param name="taskCompleteDto">请求参数</param> |
| | | /// <returns></returns> |
| | | [HttpPost("TaskComplete"), AllowAnonymous] |
| | | public async Task<AGVResponse?> TaskCompleteAsync([FromBody] TaskCompleteDto taskCompleteDto) |
| | | { |
| | | return await Service.TaskCompleteAsync(taskCompleteDto); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 任务取消 |
| | | /// </summary> |
| | | /// <param name="taskCancelDto">请求参数</param> |
| | | /// <returns></returns> |
| | | [HttpPost("TaskCancel"), AllowAnonymous] |
| | | public async Task<AGVResponse?> TaskCancelAsync([FromBody] TaskCancelDto taskCancelDto) |
| | | { |
| | | return await Service.TaskCancelAsync(taskCancelDto); |
| | | } |
| | | |
| | | #endregion 极卷库任务模块 |
| | | } |
| | | } |
| | | } |