123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195 |
- using System;
- using System.Collections.Generic;
- using System.Data;
- using Aitex.Core.RT.Event;
- using Aitex.Core.RT.IOCore;
- 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;
- using VirgoCommon;
- 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 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 string GetConfigFileContent( )
- {
- string result = null;
- Invoke(svc => { result = svc.GetConfigFileContent(); });
- 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<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<LeakCheckResultItem> GetHistoryLeakCheck(string Module)
- {
- List<LeakCheckResultItem> result = null;
- Invoke(svc =>
- {
- result = svc.GetHistoryLeakCheck(Module);
- });
- return result;
- }
- }
- }
|