using WcsMain.Common; using WcsMain.DataBase.TableEntity; using WcsMain.ExtendMethod; using WcsMain.Constant.WcsAttribute.AutoFacAttribute; using WcsMain.ApiClient.Shuttle.Dto; namespace WcsMain.ApiClient.Shuttle; /// /// 四向车库 /// [Component] public class ShuttleWebApiAction(ShuttleBaseWebApi webApiPost) { /// /// 四向车库执行移库任务 /// /// /// public string ExecuteMoveTask(AppWmsTask wmsTask) { ContainerTaskResqust containerTaskResqust = new() { RequestId = Guid.NewGuid().ToString(), Key = "", WmsTaskId = wmsTask.TaskId, FromCellNo = wmsTask.Origin, TaskType = "3", ToCell = wmsTask.Destination, PalletNo = wmsTask.VehicleNo }; var response = webApiPost.HttpPost(containerTaskResqust, CommonData.AppApiBaseInfos.GetAddress("ContainerOutMoveApiAddress") ?? ""); var responseData = response.ResponseEntity; if (!response.IsSend || responseData == null) { return "请求失败,网络故障"; } if (responseData.Code == "200") { return string.Empty; } return responseData.Message ?? "请求失败,未知异常"; } /// /// 发送出库任务 /// /// /// /// /// /// public string ExecuteOutTask(string? taskId, string? origin, string? destination, string? vehicleNo) { ContainerTaskResqust containerTaskResqust = new() { RequestId = Guid.NewGuid().ToString(), Key = "", WmsTaskId = taskId, FromCellNo = origin, TaskType = "2", ToCell = destination, PalletNo = vehicleNo }; var response = webApiPost.HttpPost(containerTaskResqust, CommonData.AppApiBaseInfos.GetAddress("ContainerOutMoveApiAddress") ?? ""); var responseData = response.ResponseEntity; if (!response.IsSend || responseData == null) { return "请求失败,网络故障"; } if (responseData.Code == "200") { return string.Empty; } return responseData.Message ?? "请求失败,未知异常"; } }