ÎļþÃû´Ó ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/AGV/Partial/agvCallback.cs ÐÞ¸Ä |
| | |
| | | /// </summary> |
| | | /// <param name="taskRespon"></param> |
| | | /// <returns></returns> |
| | | public WebResponseContent agvCallback(object taskRespon) |
| | | public WebResponseContent taskResult(object taskRespon) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | |
| | | throw new Exception("AGVè°ç¨æ¥å£å¤±è´¥ï¼æ 请æ±åæ°"); |
| | | } |
| | | |
| | | LogFactory.GetLog("AGVåè°åæ°").Info(true, $"\r\r--------------------------------------"); |
| | | LogFactory.GetLog("AGVåè°åæ°").Info(true, taskRespon.ToString()); |
| | | |
| | | var task = _taskRepository.QueryFirst(x => x.AGVtaskId == taskResult.task_id); |
| | | if (task == null) throw new Exception($"æªç¥ä»»å¡{taskResult.task_id}"); |
| | | if (task == null) throw new Exception($"æªç¥ä»»å¡:{taskResult.task_id}"); |
| | | |
| | | if (taskResult.result.ToLower() == "task_execute") //AGVå¼å§æ§è¡ |
| | | { |
| | |
| | | { |
| | | task.TaskState = (int)TaskStatusEnum.Completed; |
| | | |
| | | //_taskRepository. |
| | | //_stockInfoRepository.QueryFirst(x => x.LocationCode == task.SourceAddress); |
| | | |
| | | _taskRepository.Update(task); |
| | | WebResponseContent responseContent = _taskService.CompleteAsync((int)task.TaskNum).Result; |
| | | if (!responseContent.Status) |
| | | { |
| | | throw new Exception(responseContent.Message); |
| | | } |
| | | //_taskRepository.Update(task); |
| | | } |
| | | return content.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | LogFactory.GetLog("AGVåè°å¼å¸¸").Info(true, $"\r\r--------------------------------------"); |
| | | LogFactory.GetLog("AGVåè°å¼å¸¸").Info(true, ex.Message); |
| | | return content.Error($"AGVåè°å¼å¸¸:{ex.Message}"); |
| | | } |
| | | } |