HistoryBLL.cs 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. using LeaRun.Application.Service.PipeNetworkManage;
  2. using LeaRun.Util.WebControl;
  3. using System.Collections.Generic;
  4. using System;
  5. using System.Data;
  6. using LeaRun.Application.Entity.PipeNetworkManage;
  7. namespace LeaRun.Application.Busines.PipeNetworkManage
  8. {
  9. /// <summary>
  10. /// 版 本 6.1
  11. /// Copyright (c) 2013-2016 上海力软信息技术有限公司
  12. /// 创 建:administrator
  13. /// 日 期:2017-08-05 09:35
  14. /// 描 述:历史记录模板
  15. /// </summary>
  16. public class HistoryBLL
  17. {
  18. private HistoryService service = new HistoryService();
  19. #region 获取数据
  20. /// <summary>
  21. /// 查询设备历史记录
  22. /// </summary>
  23. /// <param name="deviceId">设备ID</param>
  24. /// <param name="startT">开始时间</param>
  25. /// <param name="endT">结束时间</param>
  26. /// <returns></returns>
  27. public string GetEntityList(string deviceId, string startT, string endT, Pagination pagination)
  28. {
  29. return service.GetGridData(deviceId, startT, endT, pagination);
  30. }
  31. /// <summary>
  32. /// 查询设备历史记录
  33. /// </summary>
  34. /// <param name="deviceId">设备ID</param>
  35. /// <param name="startT">开始时间</param>
  36. /// <param name="endT">结束时间</param>
  37. /// <returns></returns>
  38. public DataTable GetHistoryData(string deviceId, string startT, string endT)
  39. {
  40. return service.GetHistoryData(deviceId,startT,endT);
  41. }
  42. /// <summary>
  43. /// 凌晨流量Json
  44. /// </summary>
  45. /// <param name="tablename"></param>
  46. /// <param name="dtStart"></param>
  47. /// <param name="devName"></param>
  48. /// <param name="lineType"></param>
  49. /// <param name="datas"></param>
  50. /// <param name="size"></param>
  51. /// <returns></returns>
  52. public string GetDaybreakJsonData(MeterEntity entity, DateTime dtStart, string lineType, List<string> datas, int size, int flowType)
  53. {
  54. return service.GetDaybreakJsonData(entity, dtStart,lineType,datas,size,flowType);
  55. }
  56. /// <summary>
  57. /// 获取K线数据
  58. /// </summary>
  59. /// <param name="devId"></param>
  60. /// <param name="start"></param>
  61. /// <param name="end"></param>
  62. /// <param name="interval"></param>
  63. /// <returns></returns>
  64. public string GetFlowKData(string devId, string start, string end, string interval)
  65. {
  66. return service.GetFlowKData(devId,start,end,interval);
  67. }
  68. /// <summary>
  69. /// 获取某一段时间的流量
  70. /// </summary>
  71. /// <param name="entity"></param>
  72. /// <param name="dtStart"></param>
  73. /// <param name="dtEnd"></param>
  74. /// <param name="datas"></param>
  75. /// <returns></returns>
  76. public string GetInsData(MeterEntity entity, string dtStart, string dtEnd)
  77. {
  78. return service.GetInsData(entity,dtStart,dtEnd);
  79. }
  80. /// <summary>
  81. /// 获取某一段时间的流量
  82. /// </summary>
  83. /// <param name="entity"></param>
  84. /// <param name="dtStart"></param>
  85. /// <param name="dtEnd"></param>
  86. /// <param name="datas"></param>
  87. /// <returns></returns>
  88. public string GetInsData(MeterEntity entity, string dtStart, string dtEnd, List<string> datas)
  89. {
  90. return service.GetInsData(entity, dtStart, dtEnd, datas);
  91. }
  92. #endregion
  93. }
  94. }