Current.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Linq;
  5. using System.Reflection.Emit;
  6. using System.Text;
  7. using SqlSugar;
  8. using WCS.Data;
  9. using WCS.Data.Models;
  10. namespace WCS_Client.Frm
  11. {
  12. public class Current
  13. {
  14. public static List<WCS_TASK> TaskSet = new List<WCS_TASK>();
  15. /// <summary>
  16. /// plc列表
  17. /// </summary>
  18. public static List<WCS_PLC> PlcSet = new List<WCS_PLC>();
  19. public static void RefreshData(bool isRefreshTask = false)
  20. {
  21. TryCachHelper.TryExecute((db) =>
  22. {
  23. if (isRefreshTask)
  24. {
  25. TaskSet = db.Queryable<WCS_TASK>().ToList();
  26. }
  27. foreach (var plc in PlcSet)
  28. {
  29. plc.WCS_DBSet = db.Queryable<WCS_DBDEFINITION>().Where(v => v.DB_PLCNAME == plc.PLC_NAME).ToList();
  30. }
  31. });
  32. }
  33. private static List<ConvDbInfo> GetConvDBInfo(WCS_PLC plc, WCS_EQUIPMENTINFO item)
  34. {
  35. List<ConvDbInfo> equDBInfoSet = new List<ConvDbInfo>();
  36. return equDBInfoSet;
  37. }
  38. }
  39. }