From 0e674f770d785bfd24b5034456c2502dcc6671d2 Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期二, 17 六月 2025 16:56:50 +0800
Subject: [PATCH] 代码提交

---
 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/Dt_StationManagerService.cs |   69 +++++++++++++++-------------------
 1 files changed, 30 insertions(+), 39 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/Dt_StationManagerService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/Dt_StationManagerService.cs"
index 7713499..7e888ec 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/Dt_StationManagerService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/Dt_StationManagerService.cs"
@@ -52,49 +52,40 @@
         {
             
         }
-        public class Station_materialList
-        {
-            /// <summary>
-            /// 涓嬫枡浣�-銆嬨�嬩笂鏂欐垨瀛樻斁
-            /// </summary>
-            public static List<int> BoardLoadList = new List<int>() { (int)AgvStationEnum.BoardLoad, (int)AgvStationEnum.PadUse };
-
-            /// <summary>
-            /// 涓婃枡锛屼笅鏂欙紝鍨澘浣跨敤锛屽灚鏉垮洖鏀�
-            /// </summary>
-            public static List<int> UsebitsList = new List<int>() { (int)AgvStationEnum.BoardUnload,(int)AgvStationEnum.PadRecycle};
-
-
-            public static List<string> StationareaList = new List<string>() {"1003","1004" , "1005","1006","1007" };
-        }
-        public List<Dt_StationManager> QuerypLatform(string deviceNo,List<string> task)
-        {
-            return BaseDal.QueryData(x=>x.DeviceCode == deviceNo && x.stationEnable==1 && Station_materialList.UsebitsList.Contains(x.stationMaterial) && !task.Contains(x.stationName)).ToList();
-        }
-        
-        public List<Dt_StationManager> QuerypLatformarer(string deviceNo)
-        {
-            return BaseDal.QueryData((x => x.DeviceCode == deviceNo && x.stationEnable == 1 && Station_materialList.BoardLoadList.Contains(x.stationMaterial)), x=>x.stationMaterial).ToList();
-        }
-
-        public List<Dt_StationManager> QuerypLatformmaterial(int Station_Area)
-        {
-            return BaseDal.QueryData(x => x.stationArea == Station_Area && x.stationEnable == 1 && (x.stationMaterial == (int)AgvStationEnum.BoardStore || x.stationMaterial == (int)AgvStationEnum.PadStore) ).ToList();
-        }
-
-        public List<Dt_StationManager> QuerypStation_Area(int Station_Area)
-        {
-            return BaseDal.QueryData(x => x.stationArea == Station_Area && x.stationEnable == 1 && x.stationMaterial == (int)AgvStationEnum.PadStore).ToList();
-        }
-
-        public List<Dt_StationManager> QuerypStation_Area2(string Station_remark)
-        {
-            return BaseDal.QueryData(x => Station_remark.Contains(x.stationRemark) && x.stationEnable == 1 && x.stationMaterial == (int)AgvStationEnum.PadStore).ToList();
-        }
 
         public List<Dt_StationManager> GetAllStationByDeviceCode(string DeviceCode)
         {
             return BaseDal.QueryData(x => x.DeviceCode == DeviceCode && x.stationEnable == 1).ToList();
         }
+
+        public List<Dt_StationManager> QueryPlatform(Dt_StationManager station, List<string> tasks)
+        {
+            if (station.stationArea == 3 && station.stationMaterial == 7)
+            {
+                return BaseDal.QueryData(x => x.stationArea == station.stationArea && x.stationEnable == 1 && x.stationMaterial == (int)AgvStationEnum.BoardLoad && !tasks.Contains(x.stationName) && !station.stationName.Contains(x.stationName)).OrderBy(y => y.stationMaterial).ToList();
+            }
+            switch (station.stationMaterial)
+            {
+                case (int)AgvStationEnum.BoardUnload:
+                    if (station.stationArea == 3)
+                    {
+                        return BaseDal.QueryData(x => x.stationArea == station.stationArea && x.stationEnable == 1 && (x.stationMaterial == (int)AgvStationEnum.BlankingBuffer|| x.stationMaterial == (int)AgvStationEnum.BoardLoad) && !tasks.Contains(x.stationName) && !station.stationName.Contains(x.stationName)).OrderBy(y=>y.stationMaterial).ToList();
+                    }
+                    else
+                    {
+                        return BaseDal.QueryData(x => x.stationArea == station.stationArea && x.stationEnable == 1 && x.stationMaterial == (int)AgvStationEnum.BlankingBuffer && !tasks.Contains(x.stationName) && !station.stationName.Contains(x.stationName)).ToList();
+                    }
+                case (int)AgvStationEnum.BoardStore:
+                    return BaseDal.QueryData(x => x.stationArea == station.stationArea && x.stationEnable == 1 && x.stationMaterial == (int)AgvStationEnum.BoardLoad && !tasks.Contains(x.stationName) && !station.stationName.Contains(x.stationName)).ToList();
+
+                case (int)AgvStationEnum.PadRecycle:
+                    return BaseDal.QueryData(x => x.stationArea == station.stationArea && x.stationEnable == 1 && (x.stationMaterial == (int)AgvStationEnum.PadStore || x.stationMaterial == (int)AgvStationEnum.PadUse) && !tasks.Contains(x.stationName) && !station.stationName.Contains(x.stationName)).OrderBy(y=>y.stationMaterial).ToList();
+
+                case (int)AgvStationEnum.PadStore:
+                    return BaseDal.QueryData(x => x.stationArea == station.stationArea && x.stationEnable == 1 && x.stationMaterial == (int)AgvStationEnum.PadUse && !tasks.Contains(x.stationName) && !station.stationName.Contains(x.stationName)).ToList();
+                default:
+                    return null;
+            }
+        }
     }
 }

--
Gitblit v1.9.3