沈斌
2018-01-24 be5e76a4e01b9ec36768c880fcc0e5d9b3795c05
updated
3 files deleted
2 files modified
9 ■■■■ changed files
create_daily_data.js patch | view | raw | blame | history
create_data.js 2 ●●● patch | view | raw | blame | history
create_minutely_data.js 7 ●●●● patch | view | raw | blame | history
create_monthly_data.js patch | view | raw | blame | history
create_yearly_data.js patch | view | raw | blame | history
create_daily_data.js
create_data.js
@@ -21,7 +21,7 @@
            fetchDeviceMinutelyData(start, end, days, (i+1)*(j+1)*(k+1));
        }
    }
}
function fetchDeviceMinutelyData(start, end, d, t) {
    pool.getConnection(function (err, conn) {
create_minutely_data.js
@@ -50,12 +50,7 @@
                    time: moment(moment(start, 'YYYY-MM-DD HH:mm:00').valueOf() + 8*60*60*1000).toDate()
                };
            }
            devices[mac][key] = val;
            if(devices[mac]["ext"] == null) {
                devices[mac]["ext"] = {};
            }
            devices[mac]["ext"][key] = [data.min_val, data.max_val]
            devices[mac][key] = [val, data.min_val, data.max_val];
        });
        var device_data = [];
create_monthly_data.js
create_yearly_data.js