using Microsoft.AspNetCore.Mvc; using System; using System.CodeDom; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using WIDESEA_Core; using WIDESEA_Core.Enums; using WIDESEA_DTO; using WIDESEA_DTO.WMS; using WIDESEA_Model.Models; namespace WIDESEA_StoragIntegrationServices { public partial class WCSService { public async Task CallPalletCodeAsync(RequestTaskDto json) { WebResponseContent content = new WebResponseContent(); try { // stockInfo = _pa.QueryFirst(X => X.Wheels_Type == "x"); //if (stockInfo == null) throw new Exception("库内无满足条件的库存可出库"); // 创建新任务实例 //var task = new Dt_Task //{ // CurrentAddress = stockInfo.LocationInfo.RoadwayNo, // Grade = 1, // Roadway = stockInfo.LocationInfo.RoadwayNo, // TargetAddress = ToAddress, // Dispatchertime = DateTime.Now, // MaterialNo = "", // NextAddress = ToAddress, // OrderNo = null, // PalletCode = input.PalletCode, // SourceAddress = input.Position, // TaskState = (int)TaskOutStatusEnum.OutNew, // TaskType = (int)TaskOutboundTypeEnum.Outbound, // TaskNum = await _taskRepository.GetTaskNo(), // Creater = "Systeam" //}; WMSTaskDTO taskDTO = new WMSTaskDTO() { }; return content.OK(); } catch (Exception ex) { return content.Error($"失败:{ex.Message}"); } } } }