| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331 | 
							- using System;
 
- using System.Collections.Generic;
 
- using System.Data;
 
- using System.ServiceModel;
 
- using Aitex.Core.RT.ConfigCenter;
 
- using Aitex.Core.RT.DataCenter;
 
- using Aitex.Core.RT.Event;
 
- using Aitex.Core.RT.IOCore;
 
- using Aitex.Core.RT.Log;
 
- using Aitex.Core.RT.SCCore;
 
- using Aitex.Core.RT.RecipeCenter;
 
- using Aitex.Core.UI.ControlDataContext;
 
- using Aitex.Core.Util;
 
- using Aitex.Sorter.Common;
 
- using Aitex.Sorter.RT.Module.DBRecorder;
 
- using MECF.Framework.Common.DBCore;
 
- using MECF.Framework.Common.IOCore;
 
- using MECF.Framework.Common.SCCore;
 
- using MECF.Framework.Common.CommonData;
 
- namespace MECF.Framework.Common.DataCenter
 
- {
 
-     [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Multiple)]
 
-     public class QueryDataService : IQueryDataService
 
-     {
 
-         public Dictionary<string, object> PollData(IEnumerable<string> keys)
 
-         {
 
-             try
 
-             {
 
-                 var result = DATA.PollData(keys);
 
-                 return result;
 
-             }
 
-             catch (Exception ex)
 
-             {
 
-                 LOG.Write(ex);
 
-             }
 
-             return null;
 
-         }
 
-         public string GetConfigFileContent()
 
-         {
 
-             return SC.GetConfigFileContent();
 
-         }
 
-         public string GetFileContent(string fileName)
 
-         {
 
-             return ConfigManager.Instance.GetRootFileContent(fileName);
 
-         }
 
-         public string GetConfigFileDispenseByModule(string module)
 
-         {
 
-             return ConfigManager.Instance.GetFileContent(module);
 
-         }
 
-         public List<string> GetFileListByFolderBrowser(string folderBrowser)
 
-         {
 
-             return ConfigManager.Instance.GetFileListByFolderBrowser(folderBrowser);
 
-         }
 
-         public string GetConfigFileContentByModule(string module)
 
-         {
 
-             return SC.GetConfigFileContent(module);
 
-         }
 
-         public List<SCConfigItem> GetConfigItemList()
 
-         {
 
-             return SC.GetItemList();
 
-         }
 
-         public object GetConfigByModule(string module, string key)
 
-         {
 
-             return CONFIG.Poll(module, key);
 
-         }
 
-         public Dictionary<string, object> PollConfigByModule(string module, IEnumerable<string> keys)
 
-         {
 
-             return CONFIG.PollConfig(module, keys);
 
-         }
 
-         public Dictionary<string, object> PollConfig(IEnumerable<string> keys)
 
-         {
 
-             return CONFIG.PollConfig(keys);
 
-         }
 
-         public object GetData(string key)
 
-         {
 
-             return DATA.Poll(key);
 
-         }
 
-         public object GetConfig(string key)
 
-         {
 
-             return CONFIG.Poll(key);
 
-         }
 
-         public List<NotifiableIoItem> GetDiList(string key)
 
-         {
 
-             var ret = IO.GetDiList(key);
 
-             List<NotifiableIoItem> result = new List<NotifiableIoItem>();
 
-             ret.ForEach(x => result.Add(new NotifiableIoItem()
 
-             {
 
-                 Address = x.Addr,
 
-                 Name = x.Name,
 
-                 Description = x.Description,
 
-                 Index = x.Index,
 
-                 BoolValue = x.Value,
 
-                 Provider = x.Provider,
 
-                 BlockOffset = x.BlockOffset,
 
-                 BlockIndex = x.Index,
 
-             }));
 
-             return result;
 
-         }
 
-         public List<NotifiableIoItem> GetDoList(string key)
 
-         {
 
-             var ret = IO.GetDoList(key);
 
-             List<NotifiableIoItem> result = new List<NotifiableIoItem>();
 
-             ret.ForEach(x => result.Add(new NotifiableIoItem()
 
-             {
 
-                 Address = x.Addr,
 
-                 Name = x.Name,
 
-                 Description = x.Description,
 
-                 Index = x.Index,
 
-                 BoolValue = x.Value,
 
-                 Provider = x.Provider,
 
-                 BlockOffset = x.BlockOffset,
 
-                 BlockIndex = x.Index,
 
-             }));
 
-             return result;
 
-         }
 
-         public List<NotifiableIoItem> GetAiList(string key)
 
-         {
 
-             var ret = IO.GetAiList(key);
 
-             List<NotifiableIoItem> result = new List<NotifiableIoItem>();
 
-             ret.ForEach(x => result.Add(new NotifiableIoItem()
 
-             {
 
-                 Address = x.Addr,
 
-                 Name = x.Name,
 
-                 Description = x.Description,
 
-                 Index = x.Index,
 
-                 ShortValue = (short)x.Value,
 
-                 Provider = x.Provider,
 
-                 BlockOffset = x.BlockOffset,
 
-                 BlockIndex = x.Index,
 
-             }));
 
-             return result;
 
-         }
 
-         public List<NotifiableIoItem> GetAoList(string key)
 
-         {
 
-             var ret = IO.GetAoList(key);
 
-             List<NotifiableIoItem> result = new List<NotifiableIoItem>();
 
-             ret.ForEach(x => result.Add(new NotifiableIoItem()
 
-             {
 
-                 Address = x.Addr,
 
-                 Name = x.Name,
 
-                 Description = x.Description,
 
-                 Index = x.Index,
 
-                 ShortValue = (short)x.Value,
 
-                 Provider = x.Provider,
 
-                 BlockOffset = x.BlockOffset,
 
-                 BlockIndex = x.Index,
 
-             }));
 
-             return result;
 
-         }
 
-         public List<EventItem> QueryDBEvent(string sql)
 
-         {
 
-             return EV.QueryDBEvent(sql);
 
-         }
 
-         public List<HistoryCarrierData> QueryDBCarrier(string sql)
 
-         {
 
-             return CarrierDataRecorder.QueryDBCarrier(sql);
 
-         }
 
-         public List<HistoryStatisticsOCRData> QueryDBOCRStatistics(string sql)
 
-         {
 
-             return OCRDataRecorder.QueryDBOCRStatistics(sql);
 
-         }
 
-         public List<HistoryFfuDiffPressureData> QueryDBFfuDiffPressureStatistics(string sql)
 
-         {
 
-             return FfuDiffPressureDataRecorder.FfuDiffPressureHistory(sql);
 
-         }
 
-         public List<HistoryOCRData> QueryDBOCRHistory(string sql)
 
-         {
 
-             return OCRDataRecorder.QueryDBOCRHistory(sql);
 
-         }
 
-         public List<StatsStatisticsData> QueryStatsDBStatistics(string sql)
 
-         {
 
-             List<StatsStatisticsData> statsStatisticsDatas = new List<StatsStatisticsData>();
 
-             return StatsDataRecorder.QueryStatsStatistics(sql);
 
-         }
 
-         public List<HistoryProcessData> QueryDBProcess(string sql)
 
-         {
 
-             return ProcessDataRecorder.QueryDBProcess(sql);
 
-         }
 
-         public List<HistoryWaferData> QueryDBWafer(string sql)
 
-         {
 
-             return WaferDataRecorder.QueryDBWafer(sql);
 
-         }
 
-         public List<HistoryMoveData> QueryDBMovement(string sql)
 
-         {
 
-             return WaferMoveHistoryRecorder.QueryDBMovement(sql);
 
-         }
 
-         public List<HistoryJobMoveData> QueryDBJobMovementByJobGuid(string jobGuid)
 
-         {
 
-             return JobMoveHistoryRecorder.QueryJobMovement(jobGuid);
 
-         }
 
-         public List<HistoryJobMoveData> QueryDBJobMovementByJobGuidAndStationName(string jobGuid, string stationName)
 
-         {
 
-             return JobMoveHistoryRecorder.QueryJobMovement(jobGuid, stationName);
 
-         }
 
-         public List<HistoryDataItem> GetHistoryData(IEnumerable<string> keys, string recipeRunGuid, string module)
 
-         {
 
-             return ProcessDataRecorder.GetHistoryData(keys, recipeRunGuid, module);
 
-         }
 
-         public List<HistoryDataItem> GetOneDayHistoryData(IEnumerable<string> keys, DateTime begin, string module)
 
-         {
 
-             return ProcessDataRecorder.GetOneDayHistoryData(keys, begin, module);
 
-         }
 
-         public List<HistoryDataItem> GetHistoryDataFromStartToEnd(IEnumerable<string> keys, DateTime begin, DateTime end, string module)
 
-         {
 
-             return ProcessDataRecorder.GetHistoryDataFromStartToEnd(keys, begin, end, module);
 
-         }
 
-         public DataTable QueryData(string sql)
 
-         {
 
-             return DataQuery.Query(sql);
 
-         }
 
-         public List<WaferHistoryWafer> GetWaferHistoryWafers(string id)
 
-         {
 
-             return WaferDataRecorder.GetWaferHistoryWafers(id);
 
-         }
 
-         public WaferHistoryRecipe GetWaferHistoryRecipe(string id)
 
-         {
 
-             return RecipeDataRecorder.GetWaferHistoryRecipe(id);
 
-         }
 
-         public List<WaferHistoryRecipe> GetWaferHistoryRecipes(string id)
 
-         {
 
-             return RecipeDataRecorder.GetWaferHistoryRecipes(id);
 
-         }
 
-         public List<WaferHistorySecquence> GetWaferHistorySecquences(string id)
 
-         {
 
-             return RecipeDataRecorder.GetWaferHistorySecquences(id);
 
-         }
 
-         public List<WaferHistoryMovement> GetWaferHistoryMovements(string id)
 
-         {
 
-             return WaferMoveHistoryRecorder.GetWaferHistoryMovements(id);
 
-         }
 
-         public List<WaferHistoryLot> QueryWaferHistoryLotsBySql(string sql)
 
-         {
 
-             return CarrierDataRecorder.QueryWaferHistoryLotsBySql(sql);
 
-         }
 
-         public List<WaferHistoryLot> GetWaferHistoryLots(DateTime startTime, DateTime endTime, string keyWord)
 
-         {
 
-             return CarrierDataRecorder.GetWaferHistoryLots(startTime, endTime, keyWord);
 
-         }
 
-         
 
-         public string GetTypedConfigContent(string type, string contentPath)
 
-         {
 
-             return TypedConfigManager.Instance.GetTypedConfigContent(type, contentPath);
 
-         }
 
-         public void SetTypedConfigContent(string type, string contentPath, string content)
 
-         {
 
-             TypedConfigManager.Instance.SetTypedConfigContent(type, contentPath, content);
 
-         }
 
-         public List<string> GetExpertLayoutRecipeContent(string chamberId, string recipeFile)
 
-         {
 
-             return RecipeFileManager.Instance.ExpertLayoutRecipeParse(chamberId, recipeFile);
 
-         }
 
-         public List<string> GetLayoutRecipeContent(/*string chamberId, */string recipeContent, string slotCount, string cassetteSlotCount)
 
-         {
 
-             return RecipeFileManager.Instance.LayoutRecipeParse(/*chamberId, */recipeContent, slotCount, cassetteSlotCount);
 
-         }
 
-         public List<string> GetLayoutExpertRecipeContent(/*string chamberId, */string recipeContent, string slotCount, string cassetteSlotCount)
 
-         {
 
-             return RecipeFileManager.Instance.LayoutExpertRecipeParse(/*chamberId, */recipeContent, slotCount, cassetteSlotCount);
 
-         }
 
-         public string GetInterlockConfigContent()
 
-         {
 
-             return Singleton<InterlockManager>.Instance.GetInterlockConfigContent();
 
-         }
 
-         public string GetInterlockUserDefineConfigContent()
 
-         {
 
-             return Singleton<InterlockManager>.Instance.GetInterlockUserDefineConfigContent();
 
-         }
 
-         public void SetInterlockConfigContent(string content)
 
-         {
 
-             Singleton<InterlockManager>.Instance.SetInterlockConfigContent(content);
 
-         }
 
-         public List<RecipeHistory> QueryByRecipePathHistory(string RecipePath, int row = 20)
 
-         {
 
-             return RecipeEditHistoryRecorder.QueryByRecipePathHistory(RecipePath, 20);
 
-         }
 
-         public bool ClearByRecipePathHistory(string RecipePath)
 
-         {
 
-             return RecipeEditHistoryRecorder.ClearByRecipePathHistory(RecipePath);
 
-         }
 
-     }
 
- }
 
 
  |