From 26807a70f3e2c7780ad82cbb12721ea0134a032e Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期三, 15 一月 2025 14:24:21 +0800
Subject: [PATCH] AGV储位绑定重发

---
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/AGV/AGV_CSJExtend.cs |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/AGV/AGV_CSJExtend.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/AGV/AGV_CSJExtend.cs"
index a56bf1b..c3ae198 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/AGV/AGV_CSJExtend.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/AGV/AGV_CSJExtend.cs"
@@ -11,6 +11,7 @@
 using WIDESEAWCS_Model.Models;
 using static Dm.net.buffer.ByteArrayBuffer;
 using WIDESEAWCS_QuartzJob;
+using WIDESEAWCS_DTO.Agv;
 
 namespace WIDESEAWCS_Tasks
 {
@@ -71,6 +72,24 @@
                     }
                 }
                 _taskService.UpdateData(newTasks);
+                //鍑哄簱缁戝畾鏌ヨ
+                Dt_Task outBound = _taskService.Db.Queryable<Dt_Task>().Where(x => x.TaskState == TaskStatusEnum.Exception.ObjToInt() && nameof(AGV_CSJJob).Contains(x.DeviceCode) && x.TaskType==TaskTypeEnum.Outbound.ObjToInt()).ToList().OrderBy(x => x.Grade).ThenBy(x=>x.CreateDate).First();
+                if (outBound != null)
+                {
+                    AgvPodBerthAndMatDTO andMatDTO = new AgvPodBerthAndMatDTO()
+                    {
+                        ReqCode = Guid.NewGuid().ToString().Replace("-", ""),
+                        PositionCode=outBound.TargetAddress
+                    };
+                    WebResponseContent content = _taskService.AgvPodBerthAndMat(andMatDTO);
+                    if (content.Status)
+                    {
+                        outBound.TaskState = TaskStatusEnum.AGV_Execute.ObjToInt();
+                        outBound.ExceptionMessage = "";
+                        //agvTask.Remark = content.Data.ObjToString();
+                        _taskService.UpdateTask(outBound, TaskStatusEnum.AGV_Execute);
+                    }
+                }
             }
             catch (Exception ex)
             {

--
Gitblit v1.9.3