ClsResVdsBLL.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using System;
  2. using System.Linq;
  3. using Core.Mes.Client.Comm.Tool;
  4. using Core.StlMes.Client.LgClassModel;
  5. using CoreFS.CA06;
  6. namespace Core.StlMes.Client.LgResMgt
  7. {
  8. public class ClsResVdsBLL
  9. {
  10. /// <summary>
  11. /// 获取StlVdsOptinfoEntity 的实体类
  12. /// </summary>
  13. /// <param name="strStoveNo">电炉号</param>
  14. /// <param name="ob"></param>
  15. /// <param name="stationcode">工序点 如VD01</param>
  16. /// <returns></returns>
  17. public static StlVdsOptinfoEntity GetStlVdsOptinfoEntity(string strStoveNo, OpeBase ob, string stationcode)
  18. {
  19. try
  20. {
  21. var list =
  22. EntityHelper.GetData<StlVdsOptinfoEntity>(
  23. "Core.LgMes.Server.LgDeviceManager.PerformanceManage.SelectStlVdsOptinfoEntity",
  24. new object[] {strStoveNo}, ob);
  25. if ((list == null) || (list.Count <= 0))
  26. return new StlVdsOptinfoEntity
  27. {
  28. StoveNo = strStoveNo,
  29. Disposaltime = "01",
  30. Stationcode = stationcode
  31. };
  32. return list.FirstOrDefault();
  33. }
  34. catch (Exception ex)
  35. {
  36. return new StlVdsOptinfoEntity {StoveNo = strStoveNo};
  37. }
  38. }
  39. }
  40. }