| | |
| | | using WIDESEA_DTO; |
| | | using static WIDESEA_DTO.RequestTaskDto; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers; |
| | | |
| | |
| | | /// <param name="saveModel">任务号</param> |
| | | /// <returns>成功或失败</returns> |
| | | [HttpGet, Route("CompleteTaskAsync"), AllowAnonymous] |
| | | //[TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] // 5秒节流 |
| | | public async Task<WebResponseContent> CompleteTaskAsync(int taskNum) |
| | | { |
| | | return await _taskService.CompleteAsync(taskNum); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 任务完成 |
| | | /// </summary> |
| | | /// <param name="saveModel">任务号</param> |
| | | /// <returns>成功或失败</returns> |
| | | //[HttpGet, Route("CompleteTaskByStation"), AllowAnonymous] |
| | | //public async Task<WebResponseContent> CompleteTaskByStation(int taskNum) |
| | | //{ |
| | | // return await _taskService.CompleteTaskByStation(taskNum); |
| | | //} |
| | | |
| | | /// <summary> |
| | | /// 检查是否需要进行移库 |
| | |
| | | /// <param name="taskNum">任务号</param> |
| | | /// <returns>任务</returns> |
| | | [HttpGet, Route("TransferCheckAsync"), AllowAnonymous] |
| | | [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] // 5秒节流 |
| | | public async Task<WebResponseContent> TransferCheckAsync(int taskNum) |
| | | { |
| | | return new WebResponseContent().OK(data: await _locationService.TransferCheckAsync(taskNum)); |
| | |
| | | /// <param name="input">请求数据</param> |
| | | /// <returns></returns> |
| | | [HttpPost, AllowAnonymous, Route("RequestTaskAsync")] |
| | | [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] // 5秒节流 |
| | | public async Task<WebResponseContent> RequestTaskAsync([FromBody] RequestTaskDto input) |
| | | { |
| | | return await Service.RequestTaskAsync(input); |
| | |
| | | /// <param name="input">请求数据</param> |
| | | /// <returns></returns> |
| | | [HttpPost, AllowAnonymous, Route("RequestInTask")] |
| | | [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] // 5秒节流 |
| | | public async Task<WebResponseContent> RequestInTask([FromBody] RequestTaskDto input) |
| | | { |
| | | return await Service.RequestInTask(input); |
| | |
| | | /// <param name="input">请求数据</param> |
| | | /// <returns></returns> |
| | | [HttpPost, AllowAnonymous, Route("RequestLocationTaskAsync")] |
| | | [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] // 5秒节流 |
| | | public async Task<WebResponseContent> UpdateExistingTask([FromBody] RequestTaskDto input) |
| | | { |
| | | return await Service.UpdateExistingTask(input); |
| | |
| | | /// <param name="input">请求数据</param> |
| | | /// <returns></returns> |
| | | [HttpPost, AllowAnonymous, Route("RequestTrayInTaskAsync")] |
| | | [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] // 5秒节流 |
| | | public async Task<WebResponseContent> RequestTrayInTaskAsync([FromBody] RequestTaskDto input) |
| | | { |
| | | return await Service.RequestTrayInTaskAsync(input); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 空托盘&满盘出库请求 |
| | | /// 空托盘满盘出库请求 |
| | | /// </summary> |
| | | /// <param name="input">请求数据</param> |
| | | /// <param name="request">请求数据</param> |
| | | /// <returns></returns> |
| | | [HttpPost, AllowAnonymous, Route("RequestTrayOutTaskAsync")] |
| | | [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] // 5秒节流 |
| | | public async Task<WebResponseContent> RequestTrayOutTaskAsync([FromBody] RequestOutTaskDto request) |
| | | { |
| | | return await Service.RequestTrayOutTaskAsync(request.Position, request.Tag, request.AreaCdoe, request.Roadways); |
| | | return await Service.RequestTrayOutTaskAsync(request.Position, request.Tag, request.AreaCdoe, request.AreaCdoes, request.ProductionLine); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="input">请求数据</param> |
| | | /// <returns></returns> |
| | | [HttpPost, AllowAnonymous, Route("UpdateTaskStatus")] |
| | | [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] // 5秒节流 |
| | | public async Task<WebResponseContent> UpdateTaskStatus([FromBody] UpdateStatusDto input) |
| | | { |
| | | return await Service.UpdateTaskStatus(input.TaskNum, input.TaskState); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取高温可出库库存 |
| | | /// </summary> |
| | | /// <param name="input">请求数据</param> |
| | | /// <returns></returns> |
| | | [HttpGet, AllowAnonymous, Route("StockCheckingAsync")] |
| | | [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] // 5秒节流 |
| | | public WebResponseContent StockCheckingAsync() |
| | | { |
| | | return Service.StockCheckingAsync(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 创建指定任务 |
| | | /// </summary> |
| | | /// <param name="locationCode">货位号</param> |
| | | /// <param name="palletCode">托盘号</param> |
| | | /// <returns></returns> |
| | | [HttpGet, AllowAnonymous, Route("CreateAndSendOutboundTask")] |
| | | [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] // 5秒节流 |
| | | public async Task<WebResponseContent> CreateAndSendOutboundTask(string locationCode, string palletCode) |
| | | { |
| | | return await Service.CreateAndSendOutboundTask(locationCode, palletCode); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 静置NG入库 |
| | | /// </summary> |
| | | /// <param name="locationCode">货位号</param> |
| | | /// <param name="palletCode">托盘号</param> |
| | | /// <returns></returns> |
| | | [HttpPost, AllowAnonymous, Route("RequestInBoundTaskNG")] |
| | | [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] // 5秒节流 |
| | | public async Task<WebResponseContent> RequestInBoundTaskNG([FromBody] RequestTaskDto input) |
| | | { |
| | | return await Service.CreateAndSendInboundTask(input.PalletCode, input.Position); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 常温补空托盘至分容 |
| | | /// </summary> |
| | | /// <param name="input">请求数据</param> |
| | | /// <returns></returns> |
| | | [HttpPost, AllowAnonymous, Route("GetFROutTrayToCW")] |
| | | [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 15 })] // 5秒节流 |
| | | public async Task<WebResponseContent> GetFROutTrayToCW([FromBody] RequestTaskDto input) |
| | | { |
| | | return await Service.GetFROutTrayToCW(input); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// DTS火警出库 |
| | | /// </summary> |
| | | /// <param name="input">请求数据</param> |
| | | /// <returns></returns> |
| | | [HttpPost, AllowAnonymous, Route("EmergencyTask")] |
| | | public WebResponseContent EmergencyTask([FromBody] object input) |
| | | { |
| | | return Service.EmergencyTask(input); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// CW3 出库至包装 |
| | | /// </summary> |
| | | /// <param name="input">请求数据</param> |
| | | /// <returns></returns> |
| | | [HttpPost, AllowAnonymous, Route("RequestOutTaskToBZAsync")] |
| | | [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] // 5秒节流 |
| | | public async Task<WebResponseContent> RequestOutTaskToBZAsync([FromBody] RequestTaskDto input) |
| | | { |
| | | return await Service.RequestOutTaskToBZAsync(input); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 分容空框入库改为直接出库 |
| | | /// </summary> |
| | | /// <param name="input">请求数据</param> |
| | | /// <returns></returns> |
| | | [HttpPost, AllowAnonymous, Route("SetEmptyOutbyInToOutAsync")] |
| | | [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] // 5秒节流 |
| | | public async Task<WebResponseContent> SetEmptyOutbyInToOutAsync([FromBody] RequestTaskDto input) |
| | | { |
| | | return await Service.SetEmptyOutbyInToOutAsync(input); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 分容空框出库改为直接出库 |
| | | /// </summary> |
| | | /// <param name="input">请求数据</param> |
| | | /// <returns></returns> |
| | | [HttpPost, AllowAnonymous, Route("SetEmptyOutbyInToOutOneAsync")] |
| | | [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] // 5秒节流 |
| | | public async Task<WebResponseContent> SetEmptyOutbyInToOutOneAsync([FromBody] RequestTaskDto input) |
| | | { |
| | | return await Service.SetEmptyOutbyInToOutOneAsync(input); |
| | | } |
| | | [HttpPost, AllowAnonymous, Route("GetTaskInfo")] |
| | | public WebResponseContent GetTaskInfo() |
| | | { |
| | | return Service.GetTaskInfo(); |
| | | } |
| | | [HttpPost, AllowAnonymous, Route("GetStockInfo")] |
| | | public WebResponseContent GetStockInfo() |
| | | { |
| | | return Service.GetStockInfo(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取库存信息 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost, AllowAnonymous, Route("GetStockQuantity")] |
| | | public WebResponseContent GetStockQuantity() |
| | | { |
| | | return Service.GetStockQuantity(); |
| | | } |
| | | [HttpPost, AllowAnonymous, Route("Getproductionvolume")] |
| | | public WebResponseContent Getproductionvolume() |
| | | { |
| | | return Service.Getproductionvolume(); |
| | | } |
| | | [HttpPost, AllowAnonymous, Route("Getoutput")] |
| | | public WebResponseContent Getoutput() |
| | | { |
| | | return Service.Getoutput(); |
| | | } |
| | | |
| | | [HttpPost, AllowAnonymous, Route("GetTimeoutgetPageData")] |
| | | public WebResponseContent GetTimeout() |
| | | { |
| | | return Service.GetTimeout(); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 产量统计 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost,AllowAnonymous,Route("GetproductionstatisticsgetPageData")] |
| | | public WebResponseContent Getproductionstatistics() |
| | | { |
| | | return Service.Getproductionstatistics(); |
| | | } |
| | | } |