using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using WIDESEA_Common.CommonEnum;
using WIDESEA_Core;
using WIDESEA_Core.Attributes;
using WIDESEA_Core.BaseController;
using WIDESEA_DTO.Stock;
using WIDESEA_DTO.Task;
using WIDESEA_ITaskInfoService;
using WIDESEA_Model.Models;
namespace WIDESEA_WMSServer.Controllers.TaskInfo
{
///
/// 任务
///
[Route("api/Task")]
[ApiController]
public class TaskController : ApiBaseController
{
public TaskController(ITaskService service) : base(service)
{
}
[HttpPost, Route("PalletOutboundTask"), AllowAnonymous, MethodParamsValidate]
public async Task PalletOutboundTask(string endStation, string palletCode = "")
{
var result = await Service.PalletOutboundTask(endStation, palletCode);
return result;
}
///
/// 生成出库任务
///
///
///
[HttpPost, HttpGet, Route("GenerateOutboundTasks"), AllowAnonymous]
public async Task GenerateOutboundTasks([FromBody] GenerateOutboundTasksDto data)
{
return await Service.GenerateOutboundTasksAsync(data.taskIds,data.outboundPlatform);
}
}
}