| | |
| | | { |
| | | |
| | | } |
| | | 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; |
| | | } |
| | | } |
| | | } |
| | | } |