From 5a8b16b77cbbbe8137603ba9381f81f95f58135f Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期三, 27 八月 2025 11:23:07 +0800
Subject: [PATCH] 代码提交

---
 项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/成品仓/ConveyorLineJob_CPA.cs |   24 +++++++++---------------
 1 files changed, 9 insertions(+), 15 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/ConveyorLineJob_CPA.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/ConveyorLineJob_CPA.cs"
index 1fb0fa4..2584f47 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/ConveyorLineJob_CPA.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/ConveyorLineJob_CPA.cs"
@@ -67,9 +67,8 @@
             {
                 OtherDevice device = (OtherDevice)value;
                 List<string> deviceStations = device.DeviceProDTOs.Select(x => x.DeviceChildCode).ToList();
-                //鑾峰彇鏈夊崗璁殑杈撻�佺嚎-z
+                //鑾峰彇鏈夊崗璁殑杈撻�佺嚎
                 List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StationDeviceCode == device.DeviceCode);
-                //璁╂瘡涓緭閫佺嚎鍚姩-z
                 foreach (var item in stationMangers.Where(x => deviceStations.Contains(x.StationCode)))
                 {
                     DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(R_ConveyorLineCPDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
@@ -83,22 +82,17 @@
                             Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNo && x.NextAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.Line_Executing.ObjToInt() && x.DeviceCode == device.DeviceCode);
                             if (task != null)
                             {
-                                string local = "";
                                 //鍒嗛厤璐т綅
-                                if (task.HeightType==1)
+                                string? local = _taskService.RequestAssignLocation(task.TaskNum, task.Roadway);
+                                if (!string.IsNullOrEmpty(local))
                                 {
-                                    local = "SC02_CP-001-064-001-01";
+                                    task.CurrentAddress = item.StackerCraneStationCode;
+                                    task.TargetAddress = local;
+                                    task.NextAddress = local;
+                                    task.DeviceCode = item.StackerCraneCode;
+                                    _taskService.UpdateTask(task, TaskStatusEnum.SC_Execute);
+                                    WriteInfo(item.StationName, $"浠诲姟鍙�:{task.TaskNum}杩涜鍫嗗灈鏈哄叆搴�");
                                 }
-                                else if (task.HeightType == 2)
-                                {
-                                    local = "SC02_CP-001-063-001-01";
-                                }
-                                task.CurrentAddress = item.StackerCraneStationCode;
-                                task.TargetAddress= local;
-                                task.NextAddress = local;
-                                task.DeviceCode = item.StackerCraneCode;
-                                _taskService.UpdateTask(task, TaskStatusEnum.SC_Execute);
-                                WriteInfo(item.StationName, $"浠诲姟鍙�:{task.TaskNum}杩涜鍫嗗灈鏈哄叆搴�");
                             }
                         }
                         else if (conveyorLineInfoRead != null && conveyorLineInfoRead.Command == 4 && conveyorLineInfoRead.TaskNo <= 0 && item.StationType == StationTypeEnum.StationType_OnlyOutbound.ObjToInt()) //浜屾ゼ绾夸綋鍑哄簱绔欏彴

--
Gitblit v1.9.3