From 3a1a5e58e9ac1b4a8449601db8c6608897877746 Mon Sep 17 00:00:00 2001
From: helongyang <647556386@qq.com>
Date: 星期五, 21 三月 2025 11:26:12 +0800
Subject: [PATCH] 界面更新

---
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/板材仓/StackerCraneJob_BC.cs |   27 +++++++++++++++++++--------
 1 files changed, 19 insertions(+), 8 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/StackerCraneJob_BC.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/StackerCraneJob_BC.cs"
index 397c4a8..4056894 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/StackerCraneJob_BC.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/StackerCraneJob_BC.cs"
@@ -120,6 +120,8 @@
                                     task.Dispatchertime = DateTime.Now;
                                     task.ExceptionMessage = "";
                                     _taskService.UpdateTask(task, TaskStatusEnum.SC_Executing);
+                                    //寤舵椂1s
+                                    Thread.Sleep(1000);
                                 }
                             }
                         }
@@ -200,7 +202,7 @@
                         }
                         else
                         {
-                            _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute, deviceCode: stationManger.StationDeviceCode, currentAddress: stationManger.StationCode, nextAddress: router.NextPosi, targetAddress: "1102");
+                            _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute, deviceCode: stationManger.StationDeviceCode, currentAddress: stationManger.StationCode, nextAddress: "1102", targetAddress: "1102");
                         }
                         
                     }
@@ -336,13 +338,22 @@
                 else
                 {
                     Dt_Task reloTask = _mapper.Map<Dt_Task>(taskDTO);
-                    reloTask.TaskState = TaskStatusEnum.SC_Execute.ObjToInt();
-                    reloTask.CurrentAddress = taskDTO.SourceAddress;
-                    reloTask.NextAddress = taskDTO.TargetAddress;
-                    reloTask.DeviceCode = task.DeviceCode;
-                    reloTask.TaskType = TaskTypeEnum.Relocation.ObjToInt();
-                    int taskId = _taskRepository.AddData(reloTask);
-                    reloTask.TaskId = taskId;
+                    //鍒ゆ柇绉诲簱璐т綅浠诲姟鏄惁宸插瓨鍦紝濡傚瓨鍦ㄥ厛鎵ц
+                    Dt_Task existTask = _taskService.QueryStackerExistTask(reloTask.PalletCode, reloTask.SourceAddress);
+                    if (existTask != null)
+                    {
+                        return existTask;
+                    }
+                    else
+                    {
+                        reloTask.TaskState = TaskStatusEnum.SC_Execute.ObjToInt();
+                        reloTask.CurrentAddress = taskDTO.SourceAddress;
+                        reloTask.NextAddress = taskDTO.TargetAddress;
+                        reloTask.DeviceCode = task.DeviceCode;
+                        reloTask.TaskType = TaskTypeEnum.Relocation.ObjToInt();
+                        int taskId = _taskRepository.AddData(reloTask);
+                        reloTask.TaskId = taskId;
+                    }
                     return reloTask;
 
                 }

--
Gitblit v1.9.3