From 5eeed44ad21748ed7560a8c688d4e2d2f03555c8 Mon Sep 17 00:00:00 2001 From: 刘磊 <1161824510@qq.com> Date: 星期二, 05 八月 2025 12:47:13 +0800 Subject: [PATCH] 同步 --- 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/AGV/Partial/confirmToContinueTask.cs | 21 ++++++++++++++------- 1 files changed, 14 insertions(+), 7 deletions(-) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/AGV/Partial/agvCallback.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/AGV/Partial/confirmToContinueTask.cs" similarity index 64% copy from "\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/AGV/Partial/agvCallback.cs" copy to "\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/AGV/Partial/confirmToContinueTask.cs" index 8627d4f..2f7e0c1 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/AGV/Partial/agvCallback.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/AGV/Partial/confirmToContinueTask.cs" @@ -21,7 +21,7 @@ /// </summary> /// <param name="taskRespon"></param> /// <returns></returns> - public WebResponseContent agvCallback(object taskRespon) + public WebResponseContent confirmToContinueTask(object taskRespon) { WebResponseContent content = new WebResponseContent(); try @@ -32,8 +32,11 @@ 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寮�濮嬫墽琛� { @@ -45,16 +48,20 @@ { 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) { - return content.Error($"AGV鍥炶皟寮傚父:{ex.Message}"); + LogFactory.GetLog("AGV缁х画浠诲姟寮傚父").Info(true, $"\r\r--------------------------------------"); + LogFactory.GetLog("AGV缁х画浠诲姟寮傚父").Info(true, ex.Message); + return content.Error($"AGV缁х画浠诲姟寮傚父:{ex.Message}"); } } } -- Gitblit v1.9.3