| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390 | using System;using System.Collections.Generic;using System.Data;using Aitex.Core.Common;using Aitex.Core.RT.Event;using Aitex.Core.RT.IOCore;using Aitex.Core.RT.SCCore;using Aitex.Core.UI.ControlDataContext;using Aitex.Core.Util;using Aitex.Core.WCF;using Aitex.Sorter.Common;using MECF.Framework.Common.CommonData;using MECF.Framework.Common.IOCore;namespace MECF.Framework.Common.DataCenter{    public class QueryDataClient : Singleton<QueryDataClient>    {        public bool InProcess { get; set; }        private IQueryDataService _service;        public IQueryDataService Service        {            get            {                if (_service == null)                {                    if (InProcess)                        _service = new QueryDataService();                    else                        _service = new QueryDataServiceClient();                }                return _service;            }        }    }    public class QueryDataServiceClient : ServiceClientWrapper<IQueryDataService>, IQueryDataService    {        public QueryDataServiceClient()            : base("Client_IQueryDataService", "QueryDataService")        {        }        public Dictionary<string, object> PollData(IEnumerable<string> keys)        {            Dictionary<string, object> result = null;            Invoke(svc => { result = svc.PollData(keys); });            return result;        }        public Dictionary<string, object> PollConfig(IEnumerable<string> keys)        {            Dictionary<string, object> result = null;            Invoke(svc => { result = svc.PollConfig(keys); });            return result;        }        public Dictionary<string, object> PollConfigByModule(string module, IEnumerable<string> keys)        {            Dictionary<string, object> result = null;            Invoke(svc => { result = svc.PollConfigByModule(module, keys); });            return result;        }        public object GetData(string key)        {            object result = null;            Invoke(svc => { result = svc.GetData(key); });            return result;        }        public object GetConfig(string key)        {            object result = null;            Invoke(svc => { result = svc.GetConfig(key); });            return result;        }        public object GetConfigByModule(string module, string key)        {            object result = null;            Invoke(svc => { result = svc.GetConfigByModule(module, key); });            return result;        }        public string GetConfigFileContent()        {            string result = null;            Invoke(svc => { result = svc.GetConfigFileContent(); });            return result;        }        public string GetFileContent(string fileName)        {            string result = null;            Invoke(svc => { result = svc.GetFileContent(fileName); });            return result;        }        public string GetConfigFileDispenseByModule(string module)        {            string result = null;            Invoke(svc => { result = svc.GetConfigFileDispenseByModule(module); });            return result;        }        public List<string> GetFileListByFolderBrowser(string folderBrowser)        {            List<string> result = null;            Invoke(svc => { result = svc.GetFileListByFolderBrowser(folderBrowser); });            return result;        }        public string GetConfigFileContentByModule(string module)        {            string result = null;            Invoke(svc => { result = svc.GetConfigFileContentByModule(module); });            return result;        }        public List<SCConfigItem> GetConfigItemList()        {            List<SCConfigItem> result = null;            Invoke(svc => { result = svc.GetConfigItemList(); });            return result;        }        public List<WaferTypeInfo> GetConfigWaferTypes()        {            List<WaferTypeInfo> result = null;            Invoke(svc => { result = svc.GetConfigWaferTypes(); });            return result;        }        public List<EventItem> QueryDBEvent(string sql)        {            List<EventItem> result = null;            Invoke(svc => { result = svc.QueryDBEvent(sql); });            return result;        }        public List<HistoryCarrierData> QueryDBCarrier(string sql)        {            List<HistoryCarrierData> result = null;            Invoke(svc => { result = svc.QueryDBCarrier(sql); });            return result;        }        public List<HistoryStatisticsOCRData> QueryDBOCRStatistics(string sql)        {            List<HistoryStatisticsOCRData> result = null;            Invoke(svc => { result = svc.QueryDBOCRStatistics(sql); });            return result;        }        public List<HistoryOCRData> QueryDBOCRHistory(string sql)        {            List<HistoryOCRData> result = null;            Invoke(svc => { result = svc.QueryDBOCRHistory(sql); });            return result;        }        public List<HistoryFfuDiffPressureData> QueryDBFfuDiffPressureStatistics(string sql)        {            List<HistoryFfuDiffPressureData> result = null;            Invoke(svc => { result = svc.QueryDBFfuDiffPressureStatistics(sql); });            return result;        }        public List<StatsStatisticsData> QueryStatsDBStatistics(string sql)        {            List<StatsStatisticsData> result = null;            Invoke(svc => { result = svc.QueryStatsDBStatistics(sql); });            return result;        }        public List<HistoryProcessData> QueryDBProcess(string sql)        {            List<HistoryProcessData> result = null;            Invoke(svc => { result = svc.QueryDBProcess(sql); });            return result;        }        public List<HistoryWaferData> QueryDBWafer(string sql)        {            List<HistoryWaferData> result = null;            Invoke(svc => { result = svc.QueryDBWafer(sql); });            return result;        }        public List<HistoryMoveData> QueryDBMovement(string sql)        {            List<HistoryMoveData> result = null;            Invoke(svc => { result = svc.QueryDBMovement(sql); });            return result;        }        public List<HistoryJobMoveData> QueryDBJobMovementByJobGuid(string jobGuid)        {            List<HistoryJobMoveData> result = null;            Invoke(svc => { result = svc.QueryDBJobMovementByJobGuid(jobGuid); });            return result;        }        public List<HistoryJobMoveData> QueryDBJobMovementByJobGuidAndStationName(string jobGuid, string stationName)        {            List<HistoryJobMoveData> result = null;            Invoke(svc => { result = svc.QueryDBJobMovementByJobGuidAndStationName(jobGuid, stationName); });            return result;        }        public List<HistoryDataItem> GetOneDayHistoryData(IEnumerable<string> keys, DateTime begin, string module)        {            List<HistoryDataItem> result = null;            Invoke(svc => { result = svc.GetOneDayHistoryData(keys, begin, module); });            return result;        }        public List<HistoryDataItem> GetHistoryDataFromStartToEnd(IEnumerable<string> keys, DateTime begin, DateTime end, string module)        {            List<HistoryDataItem> result = null;            Invoke(svc => { result = svc.GetHistoryDataFromStartToEnd(keys, begin, end, module); });            return result;        }        public DataTable QueryData(string sql)        {            DataTable result = null;            Invoke(svc => { result = svc.QueryData(sql); });            return result;        }        public List<HistoryDataItem> GetHistoryData(IEnumerable<string> keys, string recipeRunGuid, string module)        {            List<HistoryDataItem> result = null;            Invoke(svc => { result = svc.GetHistoryData(keys, recipeRunGuid, module); });            return result;        }        public List<NotifiableIoItem> GetDiList(string key)        {            List<NotifiableIoItem> result = null;            Invoke(svc => { result = svc.GetDiList(key); });            return result;        }        public List<NotifiableIoItem> GetDoList(string key)        {            List<NotifiableIoItem> result = null;            Invoke(svc => { result = svc.GetDoList(key); });            return result;        }        public List<NotifiableIoItem> GetAiList(string key)        {            List<NotifiableIoItem> result = null;            Invoke(svc => { result = svc.GetAiList(key); });            return result;        }        public List<NotifiableIoItem> GetAoList(string key)        {            List<NotifiableIoItem> result = null;            Invoke(svc => { result = svc.GetAoList(key); });            return result;        }        public List<WaferHistoryWafer> GetWaferHistoryWafers(string id)        {            List<WaferHistoryWafer> result = null;            Invoke(svc => { result = svc.GetWaferHistoryWafers(id); });            return result;        }        public WaferHistoryRecipe GetWaferHistoryRecipe(string id)        {            WaferHistoryRecipe result = null;            Invoke(svc => { result = svc.GetWaferHistoryRecipe(id); });            return result;        }        public List<WaferHistoryRecipe> GetWaferHistoryRecipes(string id)        {            List<WaferHistoryRecipe> result = null;            Invoke(svc => { result = svc.GetWaferHistoryRecipes(id); });            return result;        }        public List<WaferHistoryMovement> GetWaferHistoryMovements(string id)        {            List<WaferHistoryMovement> result = null;            Invoke(svc => { result = svc.GetWaferHistoryMovements(id); });            return result;        }        public List<WaferHistoryLot> QueryWaferHistoryLotsBySql(string sql)        {            List<WaferHistoryLot> result = null;            Invoke(svc => { result = svc.QueryWaferHistoryLotsBySql(sql); });            return result;        }        public List<WaferHistoryLot> GetWaferHistoryLots(DateTime startTime, DateTime endTime, string keyWord)        {            List<WaferHistoryLot> result = null;            Invoke(svc => { result = svc.GetWaferHistoryLots(startTime, endTime, keyWord); });            return result;        }                public string GetTypedConfigContent(string type, string contentPath)        {            string result = null;            Invoke(svc => { result = svc.GetTypedConfigContent(type, contentPath); });            return result;        }        public void SetTypedConfigContent(string type, string contentPath, string content)        {                         Invoke(svc => {  svc.SetTypedConfigContent(type, contentPath, content); });                     }        public List<WaferHistorySecquence> GetWaferHistorySecquences(string id)        {            List<WaferHistorySecquence> result = null;            Invoke(svc => { result = svc.GetWaferHistorySecquences(id); });            return result;        }        public List<string> GetExpertLayoutRecipeContent(string chamberId, string recipeFile)        {            List<string> result = null;            Invoke(svc => { result = svc.GetExpertLayoutRecipeContent(chamberId, recipeFile); });            return result;        }        public List<string> GetLayoutRecipeContent(/*string chamberId, */string recipeContent, string slotCount, string cassetteSlotCount)        {            List<string> result = null;            Invoke(svc => { result = svc.GetLayoutRecipeContent(/*chamberId, */recipeContent, slotCount, cassetteSlotCount); });            return result;        }        public List<string> GetLayoutExpertRecipeContent(string recipeContent, string slotCount, string cassetteSlotCount)        {            List<string> result = null;            Invoke(svc => { result = svc.GetLayoutExpertRecipeContent(/*chamberId, */recipeContent, slotCount, cassetteSlotCount); });            return result;        }        public string GetInterlockConfigContent()        {            string result = null;            Invoke(svc => { result = svc.GetInterlockConfigContent(); });            return result;        }        public string GetInterlockUserDefineConfigContent()        {            string result = null;            Invoke(svc => { result = svc.GetInterlockUserDefineConfigContent(); });            return result;        }        public void SetInterlockConfigContent(string content)        {            Invoke(svc => { svc.SetInterlockConfigContent(content); });        }        public List<RecipeHistory> QueryByRecipePathHistory(string RecipePath, int row = 20)        {            List<RecipeHistory> result = null;            Invoke(svc => { result = svc.QueryByRecipePathHistory(RecipePath, row); });            return result;        }        public bool ClearByRecipePathHistory(string RecipePath)        {            bool result = false;            Invoke(svc => { result = svc.ClearByRecipePathHistory(RecipePath); });            return result;        }        public string GetFileXmlContent(string fileName, string diretory)        {            string result = string.Empty;            Invoke(svc => { result = svc.GetFileXmlContent(fileName, diretory); });            return result;        }    }}
 |