From efaf0b8aeb26aca6536a4b384c912cc3cac4d070 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期六, 15 三月 2025 16:07:45 +0800
Subject: [PATCH] 成品代码,其他仓优化,前端优化界面增加

---
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/CTU_AGVController .cs |   31 ++++++++++++++++++++++++++++---
 1 files changed, 28 insertions(+), 3 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 8b17b85..0a5c229 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"
@@ -107,10 +107,35 @@
                 var task = _taskRepository.QueryFirst(x => agvUpdateModel.TaskCode == x.AgvTaskNum);
                 if (task == null) throw new Exception($"鏈壘鍒颁换鍔�,浠诲姟鍙枫�恵agvUpdateModel.TaskCode}銆�");
 
-                if (agvUpdateModel.Method == "end")
+                switch (agvUpdateModel.Method)
                 {
-                    if (task.TaskType == TaskTypeEnum.Outbound.ObjToInt() || task.TaskType == TaskTypeEnum.OutEmpty.ObjToInt() || task.TaskType == TaskTypeEnum.OutAllocate.ObjToInt()) PutFinish(task.NextAddress);
-                    _taskService.TaskCompleted(task.TaskNum);
+                    case "end":
+                        if (task.TaskType == TaskTypeEnum.Outbound.ObjToInt() || task.TaskType == TaskTypeEnum.OutEmpty.ObjToInt() || task.TaskType == TaskTypeEnum.OutAllocate.ObjToInt() || task.TaskType == TaskTypeEnum.OutProduct.ObjToInt())
+                            PutFinish(task.NextAddress);
+                        _taskService.TaskCompleted(task.TaskNum);
+                        break;
+                    case "applyToAgv":
+                        //鏇存敼鎴愬搧鍏ュ簱AGV鍙栬揣浠诲姟鐘舵��
+                        if (task.TaskType == TaskTypeEnum.InProduct.ObjToInt())
+                        {
+                            _taskService.UpdateTask(task,TaskStatusEnum.AGV_WaitToExecute);
+                        }
+                        break;
+                    case "applyFromAgv":
+                        //鏇存敼鎴愬搧鍑篈GV鏀捐揣浠诲姟鐘舵��
+                        if (task.TaskType == TaskTypeEnum.OutProduct.ObjToInt())
+                        {
+                            _taskService.UpdateTask(task, TaskStatusEnum.AGV_WaitToExecute);
+                        }
+                        break;
+                    case "outbin":
+                        if (task.TaskType == TaskTypeEnum.OutProduct.ObjToInt())
+                        {
+                            TakeFinish(task.CurrentAddress);
+                        }
+                        break;
+                    default:
+                        break;
                 }
                 agvResponseContent.Code = "0";
                 agvResponseContent.Message = "鎴愬姛";

--
Gitblit v1.9.3