From f2b85c65234e0dcdd3fcce4dafbe16933b7f1b48 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期日, 30 十一月 2025 04:22:51 +0800
Subject: [PATCH] 出入库流程代码更新
---
项目代码/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs | 36 ++++++++++++++++++++++++++++++++++--
1 files changed, 34 insertions(+), 2 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs"
index 6a3c278..53a6ca1 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs"
@@ -1,4 +1,5 @@
-锘縰sing Microsoft.AspNetCore.Authorization;
+锘縰sing Autofac.Core;
+using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.Text;
@@ -43,7 +44,38 @@
_taskRepository = taskRepository;
_routerRepository = routerRepository;
}
+ /// <summary>
+ /// AGV浠诲姟鏇存柊
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost, HttpGet, Route("Callback"), AllowAnonymous]
+ public WebResponseContent? Callback([FromBody]AgvUpdateDTO agvUpdateDTO)
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ var task = _taskRepository.QueryFirst(x => agvUpdateDTO.ContainerCode==x.PalletCode) ?? throw new Exception($"鏈壘鍒版枡绠便�恵agvUpdateDTO.ContainerCode}銆戜换鍔�");
+ switch (agvUpdateDTO.MissionStatus)
+ {
+ case nameof(AGVStatusEnum.PICKER_RECEIVE):
+ _taskService.UpdateTask(task, TaskStatusEnum.AGV_TakeFinish);
+ break;
+ case nameof(AGVStatusEnum.PICKER_SEND):
+ //WebResponseContent responseContent = _taskService.AgvTaskFlow(task.PalletCode);
+ //if (!responseContent.Status) throw new Exception($"{responseContent.Message}");
+ _taskService.TaskCompleted(task.TaskNum);
+ break;
+ default:
+ break;
+ }
+ content.OK();
+ }
+ catch (Exception ex)
+ {
+ content.Error(ex.Message);
+ }
+ return content;
+ }
-
}
}
--
Gitblit v1.9.3