From 0cbe01e1241f9af562d86dc79b5f0949ada81dba Mon Sep 17 00:00:00 2001
From: huanghongfeng <huanghongfeng@hnkhzn.com>
Date: 星期三, 22 十月 2025 09:20:08 +0800
Subject: [PATCH] 1

---
 代码管理/WCS/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs |   58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 54 insertions(+), 4 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs"
index db4b58e..bd5e5f3 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs"
@@ -6,6 +6,7 @@
 using System.Threading.Tasks;
 using WIDESEA_Common.Log;
 using WIDESEAWCS_Common.TaskEnum;
+using WIDESEAWCS_Core;
 using WIDESEAWCS_Core.Helper;
 using WIDESEAWCS_DTO.Enum;
 using WIDESEAWCS_ISystemServices;
@@ -43,12 +44,36 @@
         {
             try
             {
-
-
                 CommonConveyorLine conveyorLine = (CommonConveyorLine)context.JobDetail.JobDataMap.Get("JobParams");
                 if (conveyorLine != null)
                 {
-                    AQMConveyorRgvommand aQMConveyor=AQMCommand(conveyorLine, "AQM001");
+                    //鏍规嵁璁惧鏌ユ壘鍑哄搴旂殑绔欏彴淇℃伅
+                    /*List<AGVStation> aGVStations = _agvStationService.GetYljSide(conveyorLine.DeviceCode);
+                    foreach (var Stations in aGVStations)
+                    {
+                        PlatformStatus aQMConveyor = StoticCommand(conveyorLine, Stations.ChildPosiDeviceCode);
+                        if(aQMConveyor.HCJ_GoodsStatus==0)    //鍙繘琛屾斁璐�
+                        {
+                            WebResponseContent webResponseContent = new WebResponseContent();
+                            //鏍规嵁绫诲瀷鏌ユ壘浠诲姟
+                            if (Stations.Station_material== (int)RGVEquipment.AbnormalOutbound)
+                            {
+                                //鏌ユ壘鏄惁鏈夊紓甯告惉杩愪换鍔�
+                                webResponseContent = _taskService.UpdateDeliveryAddress(Stations.HCJStorageaddress.ToString(), 1);   //杩橀渶瑕佷紶鍏ュ湴鍧�
+                            }
+                            else
+                            {
+                                //鍑哄簱绔欏彴鐨勪换鍔�
+                                webResponseContent = _taskService.UpdateDeliveryAddress(Stations.HCJStorageaddress.ToString(), 2);
+                            }
+
+
+                        }
+                    }*/
+
+
+
+                    /*
                     //瀹夊叏闂ㄥ紑闂ㄧ敵璇�+瀹夊叏闂ㄧ姸鎬�  1
                     if(aQMConveyor.DoorRequest==1)
                     {
@@ -71,7 +96,7 @@
                         //璇诲彇DBW8=1,DBW6=1,DBW10=1,DBW4=1,绗﹀悎鍚庯紝杩涜鍐欏叆鍒囨崲鐘舵�丏BW0=3
                         AQMReturnnormal aQMReturnnormal=AQMStoticCommand(conveyorLine, "AQM001");   //鍒ゆ柇
 
-                    }
+                    }*/
                 }
             }
             catch (Exception ex)
@@ -137,5 +162,30 @@
             return conveyorLine.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == PLCmanipula && x.DeviceProParamName == DeviceProParamName && x.DeviceProParamType == DeviceProParamType);
         }
 
+        public PlatformStatus StoticCommand(CommonConveyorLine conveyorLine, string kladder)
+        {
+            PlatformStatus conveyorRgvCommand = new PlatformStatus();
+            List<DeviceProDTO> deviceProDTO6 = conveyorLine.DeviceProDTOs
+                .Where(x => x.DeviceChildCode == kladder
+                            && x.DeviceProParamType == "ReadDeviceCommand")
+                .ToList();
+            foreach (var item in deviceProDTO6)
+            {
+                var paramName = item.DeviceProParamName;
+                var propertyInfo = typeof(PlatformStatus).GetProperty(paramName);
+
+                if (propertyInfo != null)
+                {
+                    if (item.DeviceDataType == "int")
+                    {
+                        var value = conveyorLine.Communicator.Read<short>(item.DeviceProAddress);
+                        propertyInfo.SetValue(conveyorRgvCommand, value);
+                    }
+                }
+            }
+            return conveyorRgvCommand;
+        }
+
+
     }
 }

--
Gitblit v1.9.3