[Frontend] [首頁] baja語法: 取電表kwh計算總額時,取差值累加

This commit is contained in:
wanli 2022-12-08 13:38:53 +08:00
parent b704d183e7
commit 3d7fd0690e

View File

@ -237,8 +237,8 @@ function getElectricMeterHourDataByBaja(devicePath, company, startDateTime, endD
var _index = 0;
require(['baja!'], function (baja) {//TPE_B1_EE_E4_R2F_NA_WHT_N1_KWH
console.log("local:|foxs:|history:/" + company + "/" + devicePath + "?peroid=timerange;start=" + startDateTime + ".000+08:00;end=" + endDateTime + ".000+08:00;|bql:history:HistoryRollup.rollup(baja:RelTime '3600000')");
baja.Ord.make("local:|foxs:|history:/" + company + "/" + devicePath + "?peroid=timerange;start=" + startDateTime + ".000+08:00;end=" + endDateTime + ".000+08:00;|bql:history:HistoryRollup.rollup(baja:RelTime '3600000')").get()
console.log("local:|foxs:|history:/" + company + "/" + devicePath + "?peroid=timerange;start=" + startDateTime + ".000+08:00;end=" + endDateTime + ".000+08:00;delta=true|bql:history:HistoryRollup.rollup(baja:RelTime '3600000')");
baja.Ord.make("local:|foxs:|history:/" + company + "/" + devicePath + "?peroid=timerange;start=" + startDateTime + ".000+08:00;end=" + endDateTime + ".000+08:00;delta=true|bql:history:HistoryRollup.rollup(baja:RelTime '3600000')").get()
.then(function (table) {
return table.cursor({
each: function (record) {
@ -278,8 +278,8 @@ function getElectricMeterDayDataByBaja(devicePath, company, startDateTime, endDa
var _index = 0;
require(['baja!'], function (baja) {//TPE_B1_EE_E4_R2F_NA_WHT_N1_KWH
console.log("local:|foxs:|history:/" + company + "/" + devicePath + "?peroid=timerange;start=" + startDateTime + ".000+08:00;end=" + endDateTime + ".000+08:00;|bql:history:HistoryRollup.rollup(baja:RelTime '86400000')");
baja.Ord.make("local:|foxs:|history:/" + company + "/" + devicePath + "?peroid=timerange;start=" + startDateTime + ".000+08:00;end=" + endDateTime + ".000+08:00;|bql:history:HistoryRollup.rollup(baja:RelTime '86400000')").get()
console.log("local:|foxs:|history:/" + company + "/" + devicePath + "?peroid=timerange;start=" + startDateTime + ".000+08:00;end=" + endDateTime + ".000+08:00;delta=true|bql:history:HistoryRollup.rollup(baja:RelTime '86400000')");
baja.Ord.make("local:|foxs:|history:/" + company + "/" + devicePath + "?peroid=timerange;start=" + startDateTime + ".000+08:00;end=" + endDateTime + ".000+08:00;delta=true|bql:history:HistoryRollup.rollup(baja:RelTime '86400000')").get()
.then(function (table) {
table.cursor({
each: function (record) {