using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using WIDESEA_Core; using WIDESEA_Core.BaseController; using WIDESEA_DTO.Stock; 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("GenerateInboundTask")] public WebResponseContent GenerateInboundTask(string stationCode, int inboundType, string palletCode) { return Service.GenerateInboundTask(stationCode, inboundType, palletCode); } [HttpGet, Route("TaskCompleted"), AllowAnonymous] public WebResponseContent TaskCompleted(int taskNum) { return Service.TaskCompleted(taskNum); } [HttpPost, Route("GenerateOutboundTask")] public WebResponseContent GenerateOutboundTask(int id, [FromBody] List stockSelectViews) { return Service.GenerateOutboundTask(id, stockSelectViews); } [HttpPost, Route("GenerateOutboundTasks")] public WebResponseContent GenerateOutboundTasks([FromBody] int[] keys) { return Service.GenerateOutboundTask(keys); } [HttpPost, Route("PalletOutboundTask")] public WebResponseContent PalletOutboundTask(string roadwayNo, string endStation) { return Service.PalletOutboundTask(roadwayNo, endStation); } [HttpPost, Route("InboundRequest")] public WebResponseContent InboundRequest(string stationCode, string palletCode) { return Service.InboundRequest(stationCode, palletCode); } [HttpGet, Route("IsRelocations"),AllowAnonymous] public WebResponseContent IsRelocations(int TaskNum, string SourceAddress) { return Service.IsRelocations(TaskNum, SourceAddress); } [HttpGet, Route("GenerateInventoryInformation"), AllowAnonymous] public WebResponseContent GenerateInventoryInformation(string SourceAddress, string PalletCode) { return Service.GenerateInventoryInformation(SourceAddress, PalletCode); } [HttpPost, Route("ManualOutbound"), AllowAnonymous] public WebResponseContent ManualOutbound([FromBody] SaveModel saveModel) { return Service.ManualOutbound(saveModel); } [HttpPost, Route("Empty_outbound"), AllowAnonymous] public WebResponseContent Empty_outbound(string SourceAddress) { return Service.Empty_outbound(SourceAddress); } [HttpPost, Route("Queryinventory"), AllowAnonymous] public WebResponseContent Queryinventory(string palletCode) { return Service.Queryinventory(palletCode); } [HttpGet, Route("RelocationTaskCompleted"), AllowAnonymous] public WebResponseContent RelocationTaskCompleted(string PalletCode, string SourceAddress, string TargetAddress) { return Service.RelocationTaskCompleted(PalletCode, SourceAddress, TargetAddress); } } }