From 29cf70e7b7cffea11956fd99ff559239744bb2bf Mon Sep 17 00:00:00 2001 From: wangxinhui <wangxinhui@hnkhzn.com> Date: 星期四, 12 六月 2025 21:49:18 +0800 Subject: [PATCH] 1 --- 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/ZH_AGVController.cs | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/ZH_AGVController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/ZH_AGVController.cs" index 67617af..a6305aa 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/ZH_AGVController.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/ZH_AGVController.cs" @@ -89,7 +89,7 @@ if (agvUpdateModel == null) throw new Exception("鏈幏鍙栧埌璇锋眰鍙傛暟"); agvResponseContent.ReqCode = agvUpdateModel.ReqCode; var task = _taskRepository.QueryFirst(x => agvUpdateModel.TaskCode == x.AgvTaskNum); - if (task == null) throw new Exception($"鏈壘鍒颁换鍔�,浠诲姟鍙枫�恵agvUpdateModel.TaskCode}銆�"); + if (task == null && agvUpdateModel.Method!= "begin") throw new Exception($"鏈壘鍒颁换鍔�,浠诲姟鍙枫�恵agvUpdateModel.TaskCode}銆�"); switch (agvUpdateModel.Method) { case "begin": @@ -98,7 +98,7 @@ agvResponseContent.Message = requestZH.Status ? "鎴愬姛" : "澶辫触"; return agvResponseContent; case "outbin"://鍑哄簱鏍规嵁杩欎釜淇″彿鍒ゆ柇鍙栬揣瀹屾垚 - if (task.TaskType == TaskTypeEnum.Outbound.ObjToInt()) + if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup) { var content = TakeFinish(task.CurrentAddress); if (!content.Status) throw new Exception(content.Message); @@ -112,7 +112,7 @@ break; case "getSafetySignal"://瀹夊叏淇″彿鐢宠 { - if (task.TaskType == TaskTypeEnum.Outbound.ObjToInt()) + if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup) { var content = TakeRequest(task.CurrentAddress); //if (!content.Status) throw new Exception(content.Message); @@ -136,12 +136,12 @@ Dt_StationManger dt_Station = _stationMangerRepository.QueryFirst(x => x.AGVStationCode == task.NextAddress); if (dt_Station == null) { - throw new Exception($"{task.NextAddress}AGV绔欏彴鏈畾涔�"); + throw new Exception($"{task.NextAddress}绔欏彴鏈畾涔�"); } task.CurrentAddress = dt_Station.StationCode; task.NextAddress = ""; task.TaskState = TaskStatusEnum.AGV_Finish.ObjToInt(); - task.DeviceCode = "SC01_CSJ"; + task.DeviceCode = "SC01_ZH"; var up = _taskRepository.UpdateData(task); agvResponseContent.Code = up ? "0" : "1"; agvResponseContent.Message = up ? "鎴愬姛" : "澶辫触"; -- Gitblit v1.9.3