From 7e1117448739eb1906c6f07eb4d59ad20cdff4e9 Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <1247017146@qq.com>
Date: 星期三, 16 四月 2025 16:22:14 +0800
Subject: [PATCH] 去除Redis

---
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs |   18 ++++++------------
 1 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs
index 3479aa7..6dc3b07 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs
@@ -132,9 +132,9 @@
                             }
                         }
 
-                        if (childDeviceCode == "1670")
+                        if (childDeviceCode == "1670"||childDeviceCode=="1666"||childDeviceCode=="1548"||childDeviceCode=="1448")
                         {
-                            Platform platform = _platFormRepository.QueryFirst(x => x.PLCCode == conveyorLine.DeviceCode && x.PlatCode == childDeviceCode && x.Status == "Active");
+                            Platform platform = _platFormRepository.QueryFirst(x => x.DeviceCode == conveyorLine.DeviceCode && x.PlatCode == childDeviceCode && x.Status == "Active");
                             if (platform != null)
                             {
                                 if (command.HasPallet != 1)
@@ -244,14 +244,10 @@
                 Dt_Task? newTask = _taskService.UpdatePosition(task.TaskNum, task.CurrentAddress);
                 if (newTask != null)
                 {
-
-                    //conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTaskNum, newTask.TaskNum, childDeviceCode);
-                    //conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, newTask.NextAddress, childDeviceCode);
-                    //conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineBarcode, command.ConveyorLineBarcode, childDeviceCode);
                     ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(newTask);
-                    //taskCommand.InteractiveSignal = command.InteractiveSignal;
                     conveyorLine.SendCommand(taskCommand, childDeviceCode);
                     conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode);
+                    _taskService.UpdateData(newTask);
                 }
             }
         }
@@ -268,8 +264,6 @@
             var task = _taskService.QueryExecutingTaskByBarcode(command.ConveyorLineBarcode, childDeviceCode);
             if (task != null && task.TaskState != (int)TaskInStatusEnum.Line_InFinish)
             {
-                //ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true);
-
                 WebResponseContent content = _taskService.UpdateTaskStatusToNext(task);
 
                 if (content.Status)
@@ -351,6 +345,7 @@
                         ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(newTask);
                         conveyorLine.SendCommand(taskCommand, childDeviceCode);
                         conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode);
+                        _taskService.UpdateData(newTask);
                     }
                 }
                 else
@@ -361,7 +356,6 @@
                     conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode);
                     _taskService.UpdateTaskStatusToNext(task);
                 }
-
             }
         }
 
@@ -489,8 +483,8 @@
                 }
                 var wmsIpAddress = wmsBase + requestTrayOutTask;
 
-                var device = _deviceInfoRepository.QueryData(x => x.DeviceStatus == "1" && x.DeviceRemark == platform.Id.ToString());
-                var deviceCode = device.Select(x => x.DeviceCode).ToList();
+                //var device = _deviceInfoRepository.QueryData(x => x.DeviceStatus == "1" && x.DeviceRemark == platform.Id.ToString());
+                //var deviceCode = device.Select(x => x.DeviceCode).ToList();
                 List<string> strings = platform.Location.Split(',').ToList();
 
                 var result = await HttpHelper.PostAsync(wmsIpAddress, new { Position = childDeviceCode, Tag = (int)taskType, AreaCdoe = platform.Stacker, AreaCdoes = strings, platform.ProductionLine }.ToJsonString());

--
Gitblit v1.9.3