123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186 |
- 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.SCCore;
- using Aitex.Core.UI.ControlDataContext;
- using Aitex.Sorter.Common;
- using Aitex.Sorter.RT.Module.DBRecorder;
- using MECF.Framework.Common.CommonData;
- using MECF.Framework.Common.DBCore;
- using MECF.Framework.Common.IOCore;
- using VirgoCommon;
- namespace MECF.Framework.Common.DataCenter
- {
- [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Multiple)]
- public class QueryDataService : IQueryDataService
- {
- public Dictionary<string, object> PollData(IEnumerable<string> keys)
- {
- return DATA.PollData(keys);
- }
- public string GetConfigFileContent()
- {
- return SC.GetConfigFileContent();
- }
- 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 = 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 = 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<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<LeakCheckResultItem> GetHistoryLeakCheck(string Module)
- {
- return LeakCheckResultManager.Instance.GetHistoryLeakCheck(Module);
- }
- }
- }
|