chart.get.helper.js 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. $(function () {
  2. "use strict";
  3. BWA.Chart = BWA.Chart || {};
  4. // 실시간 에너지 사용량 화면에서 사용하고 있으며 빌딩ID를 0으로 주면 해당 사이트의 모든 빌딩의 합산을 주는 코드 내가 추가했다. 2015 03 30 hcLee
  5. function PointHistoryGet(siteId) {
  6. this.siteId = siteId;
  7. this.apiUri = 'BemsMonitoringPointHistory/Location';
  8. }
  9. function FormulaGet(siteId) {
  10. this.siteId = siteId;
  11. this.apiUri = 'BemsFormula/Calculation';
  12. }
  13. // 제어를 위한 API 2015 08 05 hcLee
  14. /*
  15. function ControlPoint(siteId) {
  16. this.siteId = siteId;
  17. this.apiUri = 'BemsFormula/ControlPoint';
  18. }*/
  19. //hcLee 2015 03 26
  20. function PointHistoryServiceTypeGet(siteId) {
  21. this.siteId = siteId;
  22. //this.apiUri = 'BemsFormula/ServiceType';
  23. //this.apiUri = 'BemsFormula/Calculation';
  24. this.apiUri = 'BemsMonitoringPointHistory/ServiceType';
  25. }
  26. //실내환경분석용
  27. function PointHistory_ZoneTempHumiGet(siteId) {
  28. this.siteId = siteId;
  29. this.apiUri = 'BemsMonitoringPointHistory/Location_ZoneTempHumi';
  30. }
  31. function PointHistory_RunTimeGet(siteId) {
  32. this.siteId = siteId;
  33. this.apiUri = 'BemsMonitoringPointHistory/FacilityRunTime';
  34. }
  35. //냉동기 가동시간 분석용
  36. function PointHistory_RuntimeREFRIGERATORGet(siteId) {
  37. this.siteId = siteId;
  38. this.apiUri = 'BemsMonitoringPointHistory/RuntimeREFRIGERATOR';
  39. }
  40. //보일러 가동시간 분석용
  41. function PointHistory_RuntimeBOILERGet(siteId) {
  42. this.siteId = siteId;
  43. this.apiUri = 'BemsMonitoringPointHistory/RuntimeBOILER';
  44. }
  45. //월별에너지사용금액
  46. function PointHistory_MonthMoneyGet(siteId) {
  47. this.siteId = siteId;
  48. this.apiUri = 'BemsMonitoringPointHistory/MonthMoney';
  49. }
  50. //월별에너지사용금액//
  51. function PointHistory_CurrentValueGet(siteId) {
  52. this.siteId = siteId;
  53. this.apiUri = 'BemsMonitoringPointHistory/CurrentValueFrom15min';
  54. }
  55. //가상설비, 일반설비 데이터 2019.05.****************
  56. function VirtualNormalPointHistory_CurrentValueGet(siteId) {
  57. this.siteId = siteId;
  58. this.apiUri = 'BemsMonitoringPointHistory/VirtualNormalFacilityData';
  59. }
  60. //예측 데이터 2020.05.****************
  61. function ForecastingPointHistory_DayAheadValueGet(siteId) {
  62. this.siteId = siteId;
  63. this.apiUri = 'BemsMonitoringPointHistory/ForecastingDayAheadData';
  64. }
  65. function ForecastingPointHistory_HourAheadValueGet(siteId) {
  66. this.siteId = siteId;
  67. this.apiUri = 'BemsMonitoringPointHistory/ForecastingHourAheadData';
  68. }
  69. //예측 데이터 2020.05.****************
  70. //축열조 시뮬레이터 관련 데이터 2020.08.****************
  71. function IceThermalStorage_SimulationValueGet(siteId) {
  72. this.siteId = siteId;
  73. this.apiUri = 'BemsMonitoringPointHistory/IceThermalStorageSimulation';
  74. }
  75. //축열조 시뮬레이터 관련 데이터 2020.08.****************
  76. function PointHistory_LCCViewGet(siteId) {
  77. this.siteId = siteId;
  78. this.apiUri = 'BemsMonitoringPointHistory/LCCView';
  79. }
  80. function PointHistory_LCCViewPreSumGet(siteId) {
  81. this.siteId = siteId;
  82. this.apiUri = 'BemsMonitoringPointHistory/LCCViewPreSum';
  83. }
  84. function FmsHouseStockGet(siteId) {
  85. this.siteId = siteId;
  86. this.apiUri = 'BemsMonitoringPointHistory/FmsHouseStock';
  87. }
  88. function apiGet(parameters) {
  89. if (parameters == undefined) return;
  90. if (_.has(parameters, 'SiteId') === false) {
  91. parameters.SiteId = this.siteId;
  92. }
  93. if (_.has(parameters, 'EndDate') === false) {
  94. parameters.EndDate = this.StartDate;
  95. }
  96. parameters.StartDate = $G.dateTime(parameters.StartDate);
  97. parameters.EndDate = $G.dateTime(parameters.EndDate);
  98. return BemsWebApplication.api.get(this.apiUri, parameters);
  99. };
  100. BWA.Chart.FormulaGet = FormulaGet;
  101. BWA.Chart.PointHistoryGet = PointHistoryGet;
  102. BWA.Chart.PointHistory_ZoneTempHumiGet = PointHistory_ZoneTempHumiGet;
  103. BWA.Chart.PointHistory_RunTimeGet = PointHistory_RunTimeGet;
  104. BWA.Chart.PointHistory_RuntimeREFRIGERATORGet = PointHistory_RuntimeREFRIGERATORGet;
  105. BWA.Chart.PointHistory_RuntimeBOILERGet = PointHistory_RuntimeBOILERGet;
  106. //hcLee 2015 03 26
  107. BWA.Chart.PointHistoryServiceTypeGet = PointHistoryServiceTypeGet;
  108. //hcLee 2015 08 05
  109. //BWA.Chart.ControlPoint = ControlPoint; // Post만 하는 경우는 필요없다// promises.push(BWA.api.post('BemsFormula/ControlPoint', null, param));
  110. BWA.Chart.FmsHouseStockGet = FmsHouseStockGet;
  111. BWA.Chart.PointHistory_LCCViewPreSumGet = PointHistory_LCCViewPreSumGet;
  112. BWA.Chart.PointHistory_LCCViewGet = PointHistory_LCCViewGet;
  113. BWA.Chart.PointHistory_MonthMoneyGet = PointHistory_MonthMoneyGet;
  114. BWA.Chart.PointHistory_CurrentValueGet = PointHistory_CurrentValueGet;
  115. BWA.Chart.VirtualNormalPointHistory_CurrentValueGet = VirtualNormalPointHistory_CurrentValueGet;
  116. BWA.Chart.ForecastingPointHistory_DayAheadValueGet = ForecastingPointHistory_DayAheadValueGet;
  117. BWA.Chart.ForecastingPointHistory_HourAheadValueGet = ForecastingPointHistory_HourAheadValueGet;
  118. BWA.Chart.IceThermalStorage_SimulationValueGet = IceThermalStorage_SimulationValueGet;
  119. //ControlPoint.prototype.apiGet = // promises.push(BWA.api.post('BemsFormula/ControlPoint', null, param));
  120. FmsHouseStockGet.prototype.apiGet =
  121. PointHistory_LCCViewPreSumGet.prototype.apiGet =
  122. PointHistory_LCCViewGet.prototype.apiGet =
  123. PointHistory_CurrentValueGet.prototype.apiGet =
  124. VirtualNormalPointHistory_CurrentValueGet.prototype.apiGet =
  125. PointHistory_MonthMoneyGet.prototype.apiGet =
  126. PointHistory_RuntimeBOILERGet.prototype.apiGet = //2015 06 08
  127. PointHistory_RuntimeREFRIGERATORGet.prototype.apiGet = //2015 06 08
  128. PointHistory_ZoneTempHumiGet.prototype.apiGet = PointHistoryServiceTypeGet.prototype.apiGet =
  129. PointHistory_RunTimeGet.prototype.apiGet =
  130. PointHistoryGet.prototype.apiGet = FormulaGet.prototype.apiGet = apiGet;
  131. ForecastingPointHistory_DayAheadValueGet.prototype.apiGet = ForecastingPointHistory_HourAheadValueGet.prototype.apiGet = apiGet;
  132. IceThermalStorage_SimulationValueGet.prototype.apiGet = apiGet;
  133. VirtualNormalPointHistory_CurrentValueGet.prototype.apiGet = apiGet;
  134. ////hcLee 2015 03 26
  135. });