From ea7c07f651759bec6e5a7a528cf4b2ba9216b124 Mon Sep 17 00:00:00 2001 From: helongyang <647556386@qq.com> Date: 星期四, 12 六月 2025 18:34:23 +0800 Subject: [PATCH] 1 --- 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/ZH_AGVController.cs | 8 ++++---- 1 files changed, 4 insertions(+), 4 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..3890544 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": @@ -133,15 +133,15 @@ { var content = PutFinish(task.NextAddress); if (!content.Status) throw new Exception(content.Message); - Dt_StationManger dt_Station = _stationMangerRepository.QueryFirst(x => x.AGVStationCode == task.NextAddress); + Dt_StationManger dt_Station = _stationMangerRepository.QueryFirst(x => x.StationCode == 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