chart.get.helper.js 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  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. function PointHistory_LCCViewGet(siteId) {
  61. this.siteId = siteId;
  62. this.apiUri = 'BemsMonitoringPointHistory/LCCView';
  63. }
  64. function PointHistory_LCCViewPreSumGet(siteId) {
  65. this.siteId = siteId;
  66. this.apiUri = 'BemsMonitoringPointHistory/LCCViewPreSum';
  67. }
  68. function FmsHouseStockGet(siteId) {
  69. this.siteId = siteId;
  70. this.apiUri = 'BemsMonitoringPointHistory/FmsHouseStock';
  71. }
  72. function apiGet(parameters) {
  73. if (parameters == undefined) return;
  74. if (_.has(parameters, 'SiteId') === false) {
  75. parameters.SiteId = this.siteId;
  76. }
  77. if (_.has(parameters, 'EndDate') === false) {
  78. parameters.EndDate = this.StartDate;
  79. }
  80. parameters.StartDate = $G.dateTime(parameters.StartDate);
  81. parameters.EndDate = $G.dateTime(parameters.EndDate);
  82. return BemsWebApplication.api.get(this.apiUri, parameters);
  83. };
  84. BWA.Chart.FormulaGet = FormulaGet;
  85. BWA.Chart.PointHistoryGet = PointHistoryGet;
  86. BWA.Chart.PointHistory_ZoneTempHumiGet = PointHistory_ZoneTempHumiGet;
  87. BWA.Chart.PointHistory_RunTimeGet = PointHistory_RunTimeGet;
  88. BWA.Chart.PointHistory_RuntimeREFRIGERATORGet = PointHistory_RuntimeREFRIGERATORGet;
  89. BWA.Chart.PointHistory_RuntimeBOILERGet = PointHistory_RuntimeBOILERGet;
  90. //hcLee 2015 03 26
  91. BWA.Chart.PointHistoryServiceTypeGet = PointHistoryServiceTypeGet;
  92. //hcLee 2015 08 05
  93. //BWA.Chart.ControlPoint = ControlPoint; // Post만 하는 경우는 필요없다// promises.push(BWA.api.post('BemsFormula/ControlPoint', null, param));
  94. BWA.Chart.FmsHouseStockGet = FmsHouseStockGet;
  95. BWA.Chart.PointHistory_LCCViewPreSumGet = PointHistory_LCCViewPreSumGet;
  96. BWA.Chart.PointHistory_LCCViewGet = PointHistory_LCCViewGet;
  97. BWA.Chart.PointHistory_MonthMoneyGet = PointHistory_MonthMoneyGet;
  98. BWA.Chart.PointHistory_CurrentValueGet = PointHistory_CurrentValueGet;
  99. BWA.Chart.VirtualNormalPointHistory_CurrentValueGet = VirtualNormalPointHistory_CurrentValueGet;
  100. //ControlPoint.prototype.apiGet = // promises.push(BWA.api.post('BemsFormula/ControlPoint', null, param));
  101. FmsHouseStockGet.prototype.apiGet =
  102. PointHistory_LCCViewPreSumGet.prototype.apiGet =
  103. PointHistory_LCCViewGet.prototype.apiGet =
  104. PointHistory_CurrentValueGet.prototype.apiGet =
  105. VirtualNormalPointHistory_CurrentValueGet.prototype.apiGet =
  106. PointHistory_MonthMoneyGet.prototype.apiGet =
  107. PointHistory_RuntimeBOILERGet.prototype.apiGet = //2015 06 08
  108. PointHistory_RuntimeREFRIGERATORGet.prototype.apiGet = //2015 06 08
  109. PointHistory_ZoneTempHumiGet.prototype.apiGet = PointHistoryServiceTypeGet.prototype.apiGet =
  110. PointHistory_RunTimeGet.prototype.apiGet =
  111. PointHistoryGet.prototype.apiGet = FormulaGet.prototype.apiGet = apiGet;
  112. ////hcLee 2015 03 26
  113. });