NBHistoryBLL.cs 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. using LeaRun.Application.Entity.NBManage;
  2. using LeaRun.Application.Service.NBManage;
  3. using LeaRun.Util.WebControl;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Data;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. namespace LeaRun.Application.Busines.NBManage
  11. {
  12. /*----------------------------------------------------------------
  13. // 版 本 1.0
  14. // Copyright (c) 山东潍微科技股份有限公司
  15. // 创建人:王理民
  16. // 日期:2018-03-19 15:47:44
  17. // 描述:
  18. // 修改人:
  19. // 最后一次修改日期:2018-03-19 15:47:44
  20. //----------------------------------------------------------------*/
  21. public class NBHistoryBLL
  22. {
  23. NBHistoryService service = new NBHistoryService();
  24. //查询历史记录
  25. public DataTable GetHistory(string where, Pagination pagination)
  26. {
  27. DataTable items = service.GetHistory(where,pagination);
  28. return items;
  29. }
  30. public List<AreaInfoEntity> GetAreaList()
  31. {
  32. return service.GetAreaList();
  33. }
  34. public List<NBHistoryEntity> GetExceptionUse(Pagination pagination, string thisDate, string lastDate, string moreUsed, string lessUsed, string areaId)
  35. {
  36. return service.GetExceptionUse(pagination, thisDate, lastDate, moreUsed, lessUsed, areaId);
  37. }
  38. public List<BldgInfoEntity> GetBldgByArea(string areaId)
  39. {
  40. return service.getBldgListByAreaId(areaId);
  41. }
  42. public List<ApmtInfoEntity> GetApmtByBldg(string bldgId)
  43. {
  44. return service.getApmtListByBldgId(bldgId);
  45. }
  46. public List<NBUserEntity> GetUserByApmt(string apmtId)
  47. {
  48. return service.getRoomListByBldgId(apmtId);
  49. }
  50. public List<NBMeterEntity> GetDeviceByRoom(string roomId)
  51. {
  52. return service.GetDeviceByRoom(roomId);
  53. }
  54. //查询区间用量
  55. public DataTable GetSectionUse(string where, string order, Pagination pagination, string start, string end)
  56. {
  57. return service.GetSectionUse(where, order, pagination, start, end);
  58. }
  59. //查询月用量
  60. public List<NBHistoryEntity> GetMonthUse(string where, string order, Pagination pagination, string start, string end)
  61. {
  62. List<NBHistoryEntity> items = service.GetMonthUse(where, order, pagination, start, end);
  63. return items;
  64. }
  65. //零用量统计
  66. public List<NBHistoryEntity> GetZeroUse(string where, string order, Pagination pagination, string start, string end)
  67. {
  68. List<NBHistoryEntity> items = service.GetZeroUse(where, order, pagination, start, end);
  69. return items;
  70. }
  71. /// <summary>
  72. /// 获取平台数据
  73. /// </summary>
  74. /// <param name="devideId"></param>
  75. /// <param name="thisDate"></param>
  76. /// <param name="lastDate"></param>
  77. /// <returns></returns>
  78. public DataTable GetPlatformRecord(string queryType, string queryValue, string thisDate = "", string lastDate = "", string isButton = "")
  79. {
  80. return service.GetPlatformRecord(queryType, queryValue, thisDate, lastDate, isButton);
  81. }
  82. /// <summary>
  83. /// 获取实时数据
  84. /// </summary>
  85. /// <param name="pagination"></param>
  86. /// <param name="areaID"></param>
  87. /// <returns></returns>
  88. public DataTable GetRealTimeData(Pagination pagination, string areaID)
  89. {
  90. return service.GetRealTimeData(pagination,areaID);
  91. }
  92. #region 2022-02-25 数据库
  93. /// <summary>
  94. /// 获取实时数据
  95. /// </summary>
  96. /// <param name="pagination"></param>
  97. /// <param name="areaID"></param>
  98. /// <returns></returns>
  99. public DataTable GetRealTimeDataBySql(Pagination pagination, string areaID)
  100. {
  101. return service.GetRealTimeDataBySql(pagination, areaID);
  102. }
  103. #endregion
  104. public string GetNBMeterHisData(string meterAddr, string beginDate)
  105. {
  106. return service.GetNBMeterHisData(meterAddr, beginDate);
  107. }
  108. }
  109. }