DeviceOfPartDataProxy.cs 1002 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class DeviceOfPartDataProxy : DataProxy
  5. {
  6. public string m_TableName;
  7. public List<PartDataInfo> m_PartInfos;
  8. public override void OnRegister()
  9. {
  10. }
  11. public PartDataInfo GetPartInfoByPartName(string partName)
  12. {
  13. return m_PartInfos.Find(t => t.partName == partName);
  14. }
  15. /// <summary>
  16. /// 从Excel文件读取流程信息
  17. /// </summary>
  18. /// <param name="tableName">表明</param>
  19. /// <param name="headCount">表头</param>
  20. /// <returns></returns>
  21. public List<PartDataInfo> ReadStepMsgInfoFromTable(string tableName)
  22. {
  23. m_TableName = tableName + GlobalConfig.excelSuffix;
  24. m_PartInfos = new List<PartDataInfo>();
  25. string tmpPath = System.IO.Path.Combine(GlobalConfig.partTablePath, m_TableName);
  26. m_PartInfos = ExcelHelper.ReadInfoFromExcel<PartDataInfo>(tmpPath, 1);
  27. return m_PartInfos;
  28. }
  29. }