From c5cf76657ef4bda557a445b56466a85db0b2662d Mon Sep 17 00:00:00 2001
From: 647556386 <647556386@qq.com>
Date: 星期五, 14 三月 2025 18:05:52 +0800
Subject: [PATCH] 新增物料出库详情单页面

---
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/板材仓/StackerCraneJob_BC.cs |   34 +++++++++++++++++++++++++---------
 1 files changed, 25 insertions(+), 9 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 c3c448e..8fb228b 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"
@@ -194,8 +194,15 @@
                                 return WebResponseContent.Instance.Error($"鏈壘鍒拌矾鐢变俊鎭�,{task.NextAddress}");
                             }
                         }
-
-                        _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute, deviceCode: stationManger.StationDeviceCode, currentAddress: stationManger.StationCode, nextAddress: router.NextPosi, targetAddress: router.NextPosi);
+                        if (task.TargetAddress.Contains("SCUTL-001"))
+                        {
+                            _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute, deviceCode: stationManger.StationDeviceCode, currentAddress: stationManger.StationCode, nextAddress: router.NextPosi, targetAddress: router.NextPosi);
+                        }
+                        else
+                        {
+                            _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute, deviceCode: stationManger.StationDeviceCode, currentAddress: stationManger.StationCode, nextAddress: "1102", targetAddress: "1102");
+                        }
+                        
                     }
                     else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup || task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.RelocationGroup)
                     {
@@ -329,13 +336,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