| | |
| | | var ResultData = HttpHelper.PostAsync(WMSInterfaceAddress.ConveyorLineRequestInbound, lineDTO.ToJson(), headers: new Dictionary<string, string>()); |
| | | if (ResultData.Result == null) throw new Exception($"åWMS请æ±å
¥åºè¶
æ¶"); |
| | | |
| | | content = JsonConvert.DeserializeObject<WebResponseContent>(ResultData.Result); |
| | | return JsonConvert.DeserializeObject<WebResponseContent>(ResultData.Result); |
| | | |
| | | #endregion |
| | | |
| | | #region 产线ç³è¯·å
¥åºä»»å¡ |
| | | if (content != null && content.Status)//ä»»å¡è½¬æ¢ |
| | | { |
| | | var task = JsonConvert.DeserializeObject<Dt_Task>(content.Data.ToJson()); |
| | | if (task != null) |
| | | { |
| | | List<int> TaskNums = new List<int>(); |
| | | List<Dt_Router> routers = _routerService.QueryNextRoutes(task.CurrentAddress, task.TargetAddress); |
| | | if (routers.Count > 0) |
| | | { |
| | | task.NextAddress = routers.FirstOrDefault().ChildPosi; |
| | | } |
| | | task.WMSId = task.TaskId; |
| | | task.Creater = "WMS"; |
| | | task.Dispatchertime = null; |
| | | task.CreateDate = DateTime.Now; |
| | | BaseDal.AddData(task); |
| | | TaskNums.Add(task.TaskNum); |
| | | _taskExecuteDetailService.AddTaskExecuteDetail(TaskNums, "æ¥æ¶WMSä»»å¡"); |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | return content; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | var ResultData = HttpHelper.PostAsync(WMSInterfaceAddress.StackerCraneRequestInbound, lineDTO.ToJson(), headers: new Dictionary<string, string>()); |
| | | if (ResultData.Result == null) throw new Exception($"åWMS请æ±å
¥åºåé
è´§ä½è¶
æ¶!ä»»å¡å·:{task.TaskNum}"); |
| | | content = JsonConvert.DeserializeObject<WebResponseContent>(ResultData.Result); |
| | | if (!content.Status) throw new Exception(content.Message); |
| | | if (content.Status) |
| | | { |
| | | var receiveWMSInfo = JsonConvert.DeserializeObject<ReceiveWMSInfo>(content.Data.ToJson()); |
| | | task.SourceIsPickPlace = receiveWMSInfo.SourceIsPickPlace; |
| | | task.TargetIsPickPlace = receiveWMSInfo.TargetIsPickPlace; |
| | | task.TargetAddress = receiveWMSInfo.TargetAddress; |
| | | task.NextAddress = task.TargetAddress; |
| | | task.ExceptionMessage = null; |
| | | } |
| | | else |
| | | task.ExceptionMessage = content.Message; |
| | | |
| | | var receiveWMSInfo = JsonConvert.DeserializeObject<ReceiveWMSInfo>(content.Data.ToJson()); |
| | | task.IsPickPlace = receiveWMSInfo.IsPickPlace; |
| | | task.TargetAddress = receiveWMSInfo.TargetAddress; |
| | | task.NextAddress = task.TargetAddress; |
| | | BaseDal.UpdateData(task); |
| | | } |
| | | catch (Exception ex) |