QueryDataService.cs 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ServiceModel;
  4. using Aitex.Core.UI.ControlDataContext;
  5. using Aitex.Core.RT.DataCenter;
  6. using Aitex.Core.RT.ConfigCenter;
  7. using Aitex.Core.RT.Event;
  8. using Aitex.Triton160.Common;
  9. using Aitex.Triton160.Common.Interface;
  10. using Aitex.Triton160.RT.Module;
  11. namespace Aitex.Triton160.RT.WCF
  12. {
  13. [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode=ConcurrencyMode.Multiple)]
  14. public class QueryDataService : IQueryDataService
  15. {
  16. public Dictionary<string, object> PollData(IEnumerable<string> keys)
  17. {
  18. return DATA.PollData(keys);
  19. }
  20. public string GetConfigFileContent(string fileName)
  21. {
  22. return CONFIG.GetFileContent(fileName);
  23. }
  24. public Dictionary<string, object> PollConfig(IEnumerable<string> keys)
  25. {
  26. return CONFIG.PollConfig(keys);
  27. }
  28. public object GetData(string key)
  29. {
  30. return DATA.Poll(key);
  31. }
  32. public object GetConfig(string key)
  33. {
  34. return CONFIG.Poll(key);
  35. }
  36. public List<EventItem> QueryDBEvent(string sql)
  37. {
  38. return EV.QueryDBEvent(sql);
  39. }
  40. public Dictionary<string, object> PollHardwareConfig(IEnumerable<string> keys)
  41. {
  42. return CONFIG.PollConfig(keys);
  43. }
  44. public List<string> GetHistoryRecipeList(DateTime from, DateTime to)
  45. {
  46. return DataLogManager.Instance.GetHistoryRecipeList(from, to);
  47. }
  48. public List<DataLogItem> GetHistoryDataLogList(DateTime from, DateTime to, string recipeName, string lot)
  49. {
  50. return DataLogManager.Instance.GetHistoryDataLogList(from, to, recipeName, lot);
  51. }
  52. public List<HistoryDataItem> GetHistoryData(IEnumerable<string> keys, string recipeRunGuid)
  53. {
  54. return DataLogManager.Instance.GetHistoryData(keys, recipeRunGuid);
  55. }
  56. public List<LeakCheckResultItem> GetHistoryLeakCheck()
  57. {
  58. return LeakCheckResultManager.Instance.GetHistoryLeakCheck();
  59. }
  60. }
  61. }