From d11b1f9c98e8765d3cee15abd4474b0e05a5acbc Mon Sep 17 00:00:00 2001 From: wangxinhui <wangxinhui@hnkhzn.com> Date: 星期六, 01 三月 2025 10:33:56 +0800 Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn --- 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/CTU_AGVController .cs | 25 ++++++++++++++++++++++++- 1 files changed, 24 insertions(+), 1 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/CTU_AGVController .cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/CTU_AGVController .cs" index f7a2020..8b17b85 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/CTU_AGVController .cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/CTU_AGVController .cs" @@ -29,6 +29,29 @@ _taskService = taskService; _taskRepository = taskRepository; } + [HttpPost, HttpGet, Route("AGVFinish"), AllowAnonymous] + public WebResponseContent AGVFinish(string barcode) + { + WebResponseContent content = new WebResponseContent(); + try + { + var task = _taskRepository.QueryFirst(x => x.PalletCode == barcode); + if (task == null) throw new Exception($"鏈壘鍒颁换鍔�,鎵樼洏鍙枫�恵barcode}銆�"); + AgvUpdateDTO updateDTO = new AgvUpdateDTO() + { + TaskCode = task.AgvTaskNum, + Method = "end" + }; + var agvResponseContent = CtuCallback(updateDTO); + if (agvResponseContent.Code == "1") throw new Exception(agvResponseContent.Message); + content.OK(); + } + catch (Exception ex) + { + content.Error(ex.Message); + } + return content; + } #region 瀹夊叏淇″彿鐢宠 /// <summary> @@ -86,7 +109,7 @@ if (agvUpdateModel.Method == "end") { - if (task.TaskType == TaskTypeEnum.Outbound.ObjToInt()) PutFinish(task.NextAddress); + if (task.TaskType == TaskTypeEnum.Outbound.ObjToInt() || task.TaskType == TaskTypeEnum.OutEmpty.ObjToInt() || task.TaskType == TaskTypeEnum.OutAllocate.ObjToInt()) PutFinish(task.NextAddress); _taskService.TaskCompleted(task.TaskNum); } agvResponseContent.Code = "0"; -- Gitblit v1.9.3