@golemio/energetics 1.2.8-dev.955836630 → 1.2.8-dev.959608514
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/db/migrations/postgresql/20230803154128-bigint-timestamptz.js +53 -0
- package/db/migrations/postgresql/sqls/20230803154128-bigint-timestamptz-down.sql +397 -0
- package/db/migrations/postgresql/sqls/20230803154128-bigint-timestamptz-up.sql +397 -0
- package/dist/integration-engine/transformations/VpalacMeasurementTransformation.d.ts +1 -1
- package/dist/integration-engine/transformations/VpalacMeasurementTransformation.js +1 -1
- package/dist/integration-engine/transformations/VpalacMeasurementTransformation.js.map +1 -1
- package/dist/schema-definitions/providers/EnergeticsVpalac.js +2 -2
- package/dist/schema-definitions/providers/EnergeticsVpalac.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var dbm;
|
|
4
|
+
var type;
|
|
5
|
+
var seed;
|
|
6
|
+
var fs = require('fs');
|
|
7
|
+
var path = require('path');
|
|
8
|
+
var Promise;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* We receive the dbmigrate dependency from dbmigrate initially.
|
|
12
|
+
* This enables us to not have to rely on NODE_PATH.
|
|
13
|
+
*/
|
|
14
|
+
exports.setup = function(options, seedLink) {
|
|
15
|
+
dbm = options.dbmigrate;
|
|
16
|
+
type = dbm.dataType;
|
|
17
|
+
seed = seedLink;
|
|
18
|
+
Promise = options.Promise;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
exports.up = function(db) {
|
|
22
|
+
var filePath = path.join(__dirname, 'sqls', '20230803154128-bigint-timestamptz-up.sql');
|
|
23
|
+
return new Promise( function( resolve, reject ) {
|
|
24
|
+
fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
|
|
25
|
+
if (err) return reject(err);
|
|
26
|
+
console.log('received data: ' + data);
|
|
27
|
+
|
|
28
|
+
resolve(data);
|
|
29
|
+
});
|
|
30
|
+
})
|
|
31
|
+
.then(function(data) {
|
|
32
|
+
return db.runSql(data);
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
exports.down = function(db) {
|
|
37
|
+
var filePath = path.join(__dirname, 'sqls', '20230803154128-bigint-timestamptz-down.sql');
|
|
38
|
+
return new Promise( function( resolve, reject ) {
|
|
39
|
+
fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
|
|
40
|
+
if (err) return reject(err);
|
|
41
|
+
console.log('received data: ' + data);
|
|
42
|
+
|
|
43
|
+
resolve(data);
|
|
44
|
+
});
|
|
45
|
+
})
|
|
46
|
+
.then(function(data) {
|
|
47
|
+
return db.runSql(data);
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
exports._meta = {
|
|
52
|
+
"version": 1
|
|
53
|
+
};
|
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
-- drop dependant views
|
|
2
|
+
DROP VIEW IF EXISTS v_consumption_energy_buildings_w_data;
|
|
3
|
+
DROP VIEW IF EXISTS v_consumption_energy_consumption;
|
|
4
|
+
|
|
5
|
+
DROP VIEW IF EXISTS v_consumption_energy_consumption_month_p_f;
|
|
6
|
+
DROP VIEW IF EXISTS v_consumption_energy_consumption_month_el_f;
|
|
7
|
+
DROP VIEW IF EXISTS v_consumption_energy_consumption_month_v_f;
|
|
8
|
+
DROP VIEW IF EXISTS v_consumption_vrtbovsky_palac;
|
|
9
|
+
|
|
10
|
+
DROP VIEW IF EXISTS v_consumption_energy_vrtbovsky_palac_last_update;
|
|
11
|
+
DROP VIEW IF EXISTS v_vpalac_apartments_daily_consumption;
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
-- alter timestamp
|
|
15
|
+
ALTER TABLE vpalac_measurement ALTER COLUMN time_measurement TYPE bigint USING extract(epoch FROM time_measurement) * 1000;
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
-- rebuild dependant views
|
|
19
|
+
|
|
20
|
+
-- v_consumption_energy_consumption source
|
|
21
|
+
|
|
22
|
+
CREATE OR REPLACE VIEW v_consumption_energy_consumption
|
|
23
|
+
AS SELECT "substring"(consumption_energy_consumption.addr::text, 2, "position"(btrim(consumption_energy_consumption.addr::text, '/'::text), '/'::text) - 1)::character varying(255) AS building_address_code,
|
|
24
|
+
"right"(consumption_energy_consumption.addr::text, char_length(consumption_energy_consumption.addr::text) - "position"(btrim(consumption_energy_consumption.addr::text, '/'::text), '/'::text) - 1)::character varying(255) AS devicetype,
|
|
25
|
+
consumption_energy_consumption.time_utc,
|
|
26
|
+
consumption_energy_consumption.value,
|
|
27
|
+
consumption_energy_consumption.addr,
|
|
28
|
+
consumption_energy_consumption.var,
|
|
29
|
+
consumption_energy_consumption.type,
|
|
30
|
+
consumption_energy_consumption.commodity,
|
|
31
|
+
consumption_energy_consumption.unit,
|
|
32
|
+
consumption_energy_consumption.meter
|
|
33
|
+
FROM consumption_energy_consumption
|
|
34
|
+
UNION ALL
|
|
35
|
+
SELECT ((( SELECT btrim(consumption_energy_buildings.building_address_code::text) AS btrim
|
|
36
|
+
FROM consumption_energy_buildings
|
|
37
|
+
WHERE consumption_energy_buildings.building_name::text = 'Vrtbovský palác'::text)))::character varying(255) AS building_address_code,
|
|
38
|
+
mt.met_nazev::character varying(255) AS devicetype,
|
|
39
|
+
to_timestamp((m.time_measurement / 1000)::double precision)::timestamp without time zone AS time_utc,
|
|
40
|
+
m.value::numeric(30,15) AS value,
|
|
41
|
+
NULL::character varying(255) AS addr,
|
|
42
|
+
me.var_id::character varying(255) AS var,
|
|
43
|
+
NULL::character varying(255) AS type,
|
|
44
|
+
NULL::character varying(255) AS commodity,
|
|
45
|
+
NULL::character varying(255) AS unit,
|
|
46
|
+
NULL::character varying(255) AS meter
|
|
47
|
+
FROM vpalac_measurement m
|
|
48
|
+
JOIN vpalac_measuring_equipment me ON me.var_id = m.var_id
|
|
49
|
+
JOIN vpalac_meter_type mt ON mt.met_id = me.met_id;
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
-- v_consumption_energy_buildings_w_data source
|
|
53
|
+
|
|
54
|
+
CREATE OR REPLACE VIEW v_consumption_energy_buildings_w_data
|
|
55
|
+
AS SELECT consumption_energy_buildings.id,
|
|
56
|
+
consumption_energy_buildings.building_name,
|
|
57
|
+
consumption_energy_buildings.description,
|
|
58
|
+
consumption_energy_buildings.building_address_code,
|
|
59
|
+
consumption_energy_buildings.building_label,
|
|
60
|
+
consumption_energy_buildings.current_note,
|
|
61
|
+
consumption_energy_buildings.main_use,
|
|
62
|
+
consumption_energy_buildings.secondary_use,
|
|
63
|
+
consumption_energy_buildings.year_of_construction,
|
|
64
|
+
consumption_energy_buildings.method_of_protection,
|
|
65
|
+
consumption_energy_buildings.built_up_area,
|
|
66
|
+
consumption_energy_buildings.heated_bulding_volume,
|
|
67
|
+
consumption_energy_buildings.students_count,
|
|
68
|
+
consumption_energy_buildings.employees_count,
|
|
69
|
+
consumption_energy_buildings.classrooms_count,
|
|
70
|
+
consumption_energy_buildings.beds_count,
|
|
71
|
+
consumption_energy_buildings.eno_id,
|
|
72
|
+
consumption_energy_buildings.csu_code,
|
|
73
|
+
consumption_energy_buildings.ku_code,
|
|
74
|
+
consumption_energy_buildings.allotment_number,
|
|
75
|
+
consumption_energy_buildings.registration_unit,
|
|
76
|
+
consumption_energy_buildings.gas_consumption_normatives,
|
|
77
|
+
consumption_energy_buildings.heat_consumption_normatives,
|
|
78
|
+
consumption_energy_buildings.water_consumption_normatives,
|
|
79
|
+
consumption_energy_buildings.electricity_consumption_normatives_per_person,
|
|
80
|
+
consumption_energy_buildings.electricity_consumption_normatives,
|
|
81
|
+
consumption_energy_buildings.energetic_management,
|
|
82
|
+
consumption_energy_buildings.opening_hours,
|
|
83
|
+
consumption_energy_buildings.weekend_opening_hours,
|
|
84
|
+
consumption_energy_buildings.latitude,
|
|
85
|
+
consumption_energy_buildings.longitude,
|
|
86
|
+
consumption_energy_buildings.address_street,
|
|
87
|
+
consumption_energy_buildings.address_house_number,
|
|
88
|
+
consumption_energy_buildings.address_city,
|
|
89
|
+
consumption_energy_buildings.address_country,
|
|
90
|
+
consumption_energy_buildings.address_mail,
|
|
91
|
+
consumption_energy_buildings.address_phone,
|
|
92
|
+
consumption_energy_buildings.address_web_address,
|
|
93
|
+
consumption_energy_buildings.penb_penbnumber,
|
|
94
|
+
consumption_energy_buildings.penb_issue_date,
|
|
95
|
+
consumption_energy_buildings.penb_total_building_envelope_area,
|
|
96
|
+
consumption_energy_buildings.penb_volume_factor_of_avshape,
|
|
97
|
+
consumption_energy_buildings.penb_total_energy_reference_area,
|
|
98
|
+
consumption_energy_buildings.penb_total_provided_energy,
|
|
99
|
+
consumption_energy_buildings.penb_total_provided_energy_category,
|
|
100
|
+
consumption_energy_buildings.penb_primary_non_renewable_energy,
|
|
101
|
+
consumption_energy_buildings.penb_primary_non_renewable_energy_category,
|
|
102
|
+
consumption_energy_buildings.penb_building_envelope,
|
|
103
|
+
consumption_energy_buildings.penb_building_envelope_category,
|
|
104
|
+
consumption_energy_buildings.penb_heating,
|
|
105
|
+
consumption_energy_buildings.penb_heating_category,
|
|
106
|
+
consumption_energy_buildings.penb_cooling,
|
|
107
|
+
consumption_energy_buildings.penb_cooling_category,
|
|
108
|
+
consumption_energy_buildings.penb_ventilation,
|
|
109
|
+
consumption_energy_buildings.penb_ventilation_category,
|
|
110
|
+
consumption_energy_buildings.penb_humidity_adjustment,
|
|
111
|
+
consumption_energy_buildings.penb_humidity_adjustment_category,
|
|
112
|
+
consumption_energy_buildings.penb_warm_water,
|
|
113
|
+
consumption_energy_buildings.penb_warm_water_category,
|
|
114
|
+
consumption_energy_buildings.penb_lighting,
|
|
115
|
+
consumption_energy_buildings.penb_lighting_category,
|
|
116
|
+
consumption_energy_buildings.energy_audits_energy_audit,
|
|
117
|
+
consumption_energy_buildings.energy_audits_earegistration_number,
|
|
118
|
+
consumption_energy_buildings.energy_audits_created_at,
|
|
119
|
+
consumption_energy_buildings.building_envelope_side_wall_prevailing_construction,
|
|
120
|
+
consumption_energy_buildings.building_envelope_side_wall_area,
|
|
121
|
+
consumption_energy_buildings.building_envelope_side_wall_heat_insulation,
|
|
122
|
+
consumption_energy_buildings.building_envelope_side_wall_year_of_adjustment,
|
|
123
|
+
consumption_energy_buildings.building_envelope_side_wall_technical_condition,
|
|
124
|
+
consumption_energy_buildings.building_envelope_filling_of_hole_construction,
|
|
125
|
+
consumption_energy_buildings.building_envelope_filling_of_hole_area,
|
|
126
|
+
consumption_energy_buildings.building_envelope_filling_of_hole_year_of_adjustment,
|
|
127
|
+
consumption_energy_buildings.building_envelope_filling_of_hole_technical_condition,
|
|
128
|
+
consumption_energy_buildings.building_envelope_roof_construction,
|
|
129
|
+
consumption_energy_buildings.building_envelope_roof_area,
|
|
130
|
+
consumption_energy_buildings.building_envelope_roof_thermal_insulation,
|
|
131
|
+
consumption_energy_buildings.building_envelope_roof_year_of_adjustment,
|
|
132
|
+
consumption_energy_buildings.building_envelope_roof_technical_condition,
|
|
133
|
+
consumption_energy_buildings.building_envelope_floor_of_the_lowest_heated_floor_construction,
|
|
134
|
+
consumption_energy_buildings.building_envelope_floor_of_the_lowest_heated_floor_area,
|
|
135
|
+
consumption_energy_buildings.floor_of_the_lowest_heated_floor_thermal_insulation,
|
|
136
|
+
consumption_energy_buildings.building_envelope_floor_of_the_lowest_heated_floor_year_of_adju,
|
|
137
|
+
consumption_energy_buildings.floor_of_the_lowest_heated_floor_technical_condition,
|
|
138
|
+
consumption_energy_buildings.fuel_and_energy_coal,
|
|
139
|
+
consumption_energy_buildings.fuel_and_energy_gas,
|
|
140
|
+
consumption_energy_buildings.fuel_and_energy_electricity,
|
|
141
|
+
consumption_energy_buildings.fuel_and_energy_czt,
|
|
142
|
+
consumption_energy_buildings.fuel_and_energy_oze,
|
|
143
|
+
consumption_energy_buildings.fuel_and_energy_other,
|
|
144
|
+
consumption_energy_buildings.technical_equipment_heating_main_source_of_heat,
|
|
145
|
+
consumption_energy_buildings.technical_equipment_heating_heat_percentage,
|
|
146
|
+
consumption_energy_buildings.technical_equipment_heating_secondary_source_of_heat,
|
|
147
|
+
consumption_energy_buildings.technical_equipment_heating_heating_system,
|
|
148
|
+
consumption_energy_buildings.technical_equipment_heating_year,
|
|
149
|
+
consumption_energy_buildings.technical_equipment_heating_technical_condition,
|
|
150
|
+
consumption_energy_buildings.technical_equipment_cooling_cooling_system,
|
|
151
|
+
consumption_energy_buildings.technical_equipment_cooling_cooling_area_percentage,
|
|
152
|
+
consumption_energy_buildings.technical_equipment_cooling_year,
|
|
153
|
+
consumption_energy_buildings.technical_equipment_cooling_technical_condition,
|
|
154
|
+
consumption_energy_buildings.technical_equipment_ventilation_ventilation,
|
|
155
|
+
consumption_energy_buildings.technical_equipment_ventilation_year,
|
|
156
|
+
consumption_energy_buildings.technical_equipment_ventilation_technical_condition,
|
|
157
|
+
consumption_energy_buildings.technical_equipment_humidity_adjustment_humidity_adjustment,
|
|
158
|
+
consumption_energy_buildings.technical_equipment_humidity_adjustment_year,
|
|
159
|
+
consumption_energy_buildings.technical_equipment_humidity_adjustment_technical_condition,
|
|
160
|
+
consumption_energy_buildings.technical_equipment_hot_water_predominant_way_of_heating_tv,
|
|
161
|
+
consumption_energy_buildings.technical_equipment_hot_water_hot_water_source,
|
|
162
|
+
consumption_energy_buildings.technical_equipment_hot_water_year,
|
|
163
|
+
consumption_energy_buildings.technical_equipment_hot_water_technical_condition,
|
|
164
|
+
consumption_energy_buildings.technical_equipment_lighting_lighting,
|
|
165
|
+
consumption_energy_buildings.technical_equipment_lighting_year,
|
|
166
|
+
consumption_energy_buildings.technical_equipment_lighting_technical_condition,
|
|
167
|
+
consumption_energy_buildings.technical_equipment_lighting_other_technological_elements,
|
|
168
|
+
consumption_energy_buildings.technical_equipment_lighting_measurement_method,
|
|
169
|
+
consumption_energy_buildings.oze_energy_production_solar_energy_photovoltaic,
|
|
170
|
+
consumption_energy_buildings.oze_energy_production_solar_energy_photothermal,
|
|
171
|
+
consumption_energy_buildings.oze_energy_production_integrated_turbines_wind_energy,
|
|
172
|
+
consumption_energy_buildings.oze_energy_production_heat_pump,
|
|
173
|
+
consumption_energy_buildings.waste_and_emissions_solid_waste_production,
|
|
174
|
+
consumption_energy_buildings.waste_and_emissions_tied_co2_emissions,
|
|
175
|
+
consumption_energy_buildings.waste_and_emissions_sox_emissions,
|
|
176
|
+
consumption_energy_buildings.waste_and_emissions_operating_co_2emissions,
|
|
177
|
+
consumption_energy_buildings.link
|
|
178
|
+
FROM consumption_energy_buildings
|
|
179
|
+
WHERE (btrim(consumption_energy_buildings.building_address_code::text) IN ( SELECT DISTINCT v_consumption_energy_consumption.building_address_code
|
|
180
|
+
FROM v_consumption_energy_consumption)) AND consumption_energy_buildings.building_address_code::text !~~ '10.%'::text;
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
-- v_consumption_vrtbovsky_palac source
|
|
184
|
+
|
|
185
|
+
CREATE OR REPLACE VIEW v_consumption_vrtbovsky_palac
|
|
186
|
+
AS WITH daily_status AS (
|
|
187
|
+
SELECT date_part('year'::text, to_timestamp((m.time_measurement / 1000)::double precision)::timestamp without time zone) AS measure_year,
|
|
188
|
+
date_part('month'::text, to_timestamp((m.time_measurement / 1000)::double precision)::timestamp without time zone) AS measure_month,
|
|
189
|
+
me.me_id::text AS addr,
|
|
190
|
+
m.var_id AS var,
|
|
191
|
+
CASE
|
|
192
|
+
WHEN mt.met_nazev::text = 'Senzor'::text THEN 'heat'::text
|
|
193
|
+
WHEN mt.met_nazev::text = 'Elektroměr'::text THEN 'electricity'::text
|
|
194
|
+
WHEN mt.met_nazev::text = 'Plynoměr'::text THEN 'gas'::text
|
|
195
|
+
WHEN mt.met_nazev::text = 'Vodoměr'::text THEN 'water'::text
|
|
196
|
+
ELSE NULL::text
|
|
197
|
+
END AS commodity,
|
|
198
|
+
NULL::text AS unit,
|
|
199
|
+
CASE
|
|
200
|
+
WHEN mt.met_nazev::text = 'Senzor'::text AND date_part('month'::text, to_timestamp((m.time_measurement / 1000)::double precision)::timestamp without time zone) = 12::double precision THEN 0::numeric
|
|
201
|
+
ELSE min(m.value)
|
|
202
|
+
END AS start_value,
|
|
203
|
+
me.mis_nazev,
|
|
204
|
+
date_trunc('month'::text, to_timestamp((m.time_measurement / 1000)::double precision)::timestamp without time zone) AS data_do
|
|
205
|
+
FROM vpalac_measuring_equipment me
|
|
206
|
+
JOIN vpalac_measurement m ON me.var_id = m.var_id
|
|
207
|
+
JOIN vpalac_meter_type mt ON me.met_id = mt.met_id
|
|
208
|
+
GROUP BY me.me_id, (date_part('year'::text, to_timestamp((m.time_measurement / 1000)::double precision)::timestamp without time zone)), (date_part('month'::text, to_timestamp((m.time_measurement / 1000)::double precision)::timestamp without time zone)), mt.met_nazev, m.var_id, me.mis_nazev, me.umisteni, (date_trunc('month'::text, to_timestamp((m.time_measurement / 1000)::double precision)::timestamp without time zone))
|
|
209
|
+
)
|
|
210
|
+
SELECT daily_status.measure_year,
|
|
211
|
+
daily_status.measure_month,
|
|
212
|
+
daily_status.addr,
|
|
213
|
+
daily_status.var,
|
|
214
|
+
daily_status.commodity,
|
|
215
|
+
daily_status.unit,
|
|
216
|
+
lead(daily_status.start_value) OVER (PARTITION BY daily_status.var ORDER BY daily_status.data_do) - daily_status.start_value AS consumption,
|
|
217
|
+
daily_status.data_do
|
|
218
|
+
FROM daily_status;
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
-- v_consumption_energy_consumption_month_p_f source
|
|
222
|
+
|
|
223
|
+
CREATE OR REPLACE VIEW v_consumption_energy_consumption_month_p_f
|
|
224
|
+
AS SELECT v_consumption_energy_consumption_month_ptv.rok,
|
|
225
|
+
v_consumption_energy_consumption_month_ptv.mesic,
|
|
226
|
+
v_consumption_energy_consumption_month_ptv.addr,
|
|
227
|
+
v_consumption_energy_consumption_month_ptv.var,
|
|
228
|
+
v_consumption_energy_consumption_month_ptv.commodity,
|
|
229
|
+
v_consumption_energy_consumption_month_ptv.unit,
|
|
230
|
+
v_consumption_energy_consumption_month_ptv.value,
|
|
231
|
+
v_consumption_energy_consumption_month_ptv.data_do,
|
|
232
|
+
v_consumption_energy_consumption_month_ptv.count,
|
|
233
|
+
v_consumption_energy_consumption_month_ptv.previous_month_value,
|
|
234
|
+
v_consumption_energy_consumption_month_ptv.mesicni_spotreba
|
|
235
|
+
FROM v_consumption_energy_consumption_month_ptv
|
|
236
|
+
WHERE v_consumption_energy_consumption_month_ptv.addr::text ~~ '%/PF%'::text AND v_consumption_energy_consumption_month_ptv.rok > 2018::double precision
|
|
237
|
+
UNION
|
|
238
|
+
SELECT v_consumption_vrtbovsky_palac.measure_year AS rok,
|
|
239
|
+
v_consumption_vrtbovsky_palac.measure_month AS mesic,
|
|
240
|
+
v_consumption_vrtbovsky_palac.addr::character varying(255) AS addr,
|
|
241
|
+
v_consumption_vrtbovsky_palac.var::character varying(255) AS var,
|
|
242
|
+
v_consumption_vrtbovsky_palac.commodity::character varying(255) AS commodity,
|
|
243
|
+
v_consumption_vrtbovsky_palac.unit::character varying(255) AS unit,
|
|
244
|
+
sum(v_consumption_vrtbovsky_palac.consumption) AS value,
|
|
245
|
+
v_consumption_vrtbovsky_palac.data_do::date AS data_do,
|
|
246
|
+
count(*) AS count,
|
|
247
|
+
NULL::numeric AS previous_month_value,
|
|
248
|
+
sum(v_consumption_vrtbovsky_palac.consumption) AS mesicni_spotreba
|
|
249
|
+
FROM v_consumption_vrtbovsky_palac
|
|
250
|
+
WHERE v_consumption_vrtbovsky_palac.commodity = 'gas'::text
|
|
251
|
+
GROUP BY v_consumption_vrtbovsky_palac.measure_year, v_consumption_vrtbovsky_palac.measure_month, v_consumption_vrtbovsky_palac.data_do, v_consumption_vrtbovsky_palac.addr, v_consumption_vrtbovsky_palac.var, v_consumption_vrtbovsky_palac.commodity, v_consumption_vrtbovsky_palac.unit;
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
-- v_consumption_energy_consumption_month_el_f source
|
|
255
|
+
|
|
256
|
+
CREATE OR REPLACE VIEW v_consumption_energy_consumption_month_el_f
|
|
257
|
+
AS SELECT date_part('year'::text, consumption_energy_consumption.time_utc) AS rok,
|
|
258
|
+
date_part('month'::text, consumption_energy_consumption.time_utc) AS mesic,
|
|
259
|
+
replace(consumption_energy_consumption.addr::text, concat('/', consumption_energy_consumption.var), ''::text)::character varying(255) AS addr,
|
|
260
|
+
consumption_energy_consumption.var,
|
|
261
|
+
consumption_energy_consumption.commodity,
|
|
262
|
+
consumption_energy_consumption.unit,
|
|
263
|
+
sum(consumption_energy_consumption.value::numeric(10,2)) / 4::numeric AS value,
|
|
264
|
+
max(consumption_energy_consumption.time_utc::date) AS data_do,
|
|
265
|
+
count(*) AS count
|
|
266
|
+
FROM consumption_energy_consumption
|
|
267
|
+
WHERE (consumption_energy_consumption.var::text = ANY (ARRAY['EFwActi'::character varying::text, 'EFwActiNT'::character varying::text, 'EFwActi'::character varying::text])) AND consumption_energy_consumption.addr::text ~~ '%/EF%'::text AND consumption_energy_consumption.addr::text !~~ '/10.%'::text AND consumption_energy_consumption.addr::text !~~ '10.%'::text
|
|
268
|
+
GROUP BY (date_part('year'::text, consumption_energy_consumption.time_utc)), (date_part('month'::text, consumption_energy_consumption.time_utc)), consumption_energy_consumption.addr, consumption_energy_consumption.var, consumption_energy_consumption.commodity, consumption_energy_consumption.unit
|
|
269
|
+
UNION
|
|
270
|
+
SELECT v_consumption_vrtbovsky_palac.measure_year AS rok,
|
|
271
|
+
v_consumption_vrtbovsky_palac.measure_month AS mesic,
|
|
272
|
+
v_consumption_vrtbovsky_palac.addr::character varying(255) AS addr,
|
|
273
|
+
v_consumption_vrtbovsky_palac.var::character varying(255) AS var,
|
|
274
|
+
v_consumption_vrtbovsky_palac.commodity::character varying(255) AS commodity,
|
|
275
|
+
v_consumption_vrtbovsky_palac.unit::character varying(255) AS unit,
|
|
276
|
+
sum(v_consumption_vrtbovsky_palac.consumption) AS value,
|
|
277
|
+
v_consumption_vrtbovsky_palac.data_do::date AS data_do,
|
|
278
|
+
count(*) AS count
|
|
279
|
+
FROM v_consumption_vrtbovsky_palac
|
|
280
|
+
WHERE v_consumption_vrtbovsky_palac.commodity = 'electricity'::text
|
|
281
|
+
GROUP BY v_consumption_vrtbovsky_palac.measure_year, v_consumption_vrtbovsky_palac.measure_month, v_consumption_vrtbovsky_palac.data_do, v_consumption_vrtbovsky_palac.addr, v_consumption_vrtbovsky_palac.var, v_consumption_vrtbovsky_palac.commodity, v_consumption_vrtbovsky_palac.unit;
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
-- v_consumption_energy_consumption_month_v_f source
|
|
285
|
+
|
|
286
|
+
CREATE OR REPLACE VIEW v_consumption_energy_consumption_month_v_f
|
|
287
|
+
AS SELECT v_consumption_energy_consumption_month_ptv.rok,
|
|
288
|
+
v_consumption_energy_consumption_month_ptv.mesic,
|
|
289
|
+
v_consumption_energy_consumption_month_ptv.addr,
|
|
290
|
+
v_consumption_energy_consumption_month_ptv.var,
|
|
291
|
+
v_consumption_energy_consumption_month_ptv.commodity,
|
|
292
|
+
v_consumption_energy_consumption_month_ptv.unit,
|
|
293
|
+
v_consumption_energy_consumption_month_ptv.value,
|
|
294
|
+
v_consumption_energy_consumption_month_ptv.data_do,
|
|
295
|
+
v_consumption_energy_consumption_month_ptv.count,
|
|
296
|
+
v_consumption_energy_consumption_month_ptv.previous_month_value,
|
|
297
|
+
v_consumption_energy_consumption_month_ptv.mesicni_spotreba
|
|
298
|
+
FROM v_consumption_energy_consumption_month_ptv
|
|
299
|
+
WHERE v_consumption_energy_consumption_month_ptv.addr::text ~~ '%VF%'::text AND v_consumption_energy_consumption_month_ptv.rok > 2018::double precision
|
|
300
|
+
UNION
|
|
301
|
+
SELECT v_consumption_vrtbovsky_palac.measure_year AS rok,
|
|
302
|
+
v_consumption_vrtbovsky_palac.measure_month AS mesic,
|
|
303
|
+
v_consumption_vrtbovsky_palac.addr::character varying(255) AS addr,
|
|
304
|
+
v_consumption_vrtbovsky_palac.var::character varying(255) AS var,
|
|
305
|
+
v_consumption_vrtbovsky_palac.commodity::character varying(255) AS commodity,
|
|
306
|
+
v_consumption_vrtbovsky_palac.unit::character varying(255) AS unit,
|
|
307
|
+
sum(v_consumption_vrtbovsky_palac.consumption) AS value,
|
|
308
|
+
v_consumption_vrtbovsky_palac.data_do::date AS data_do,
|
|
309
|
+
count(*) AS count,
|
|
310
|
+
NULL::numeric AS previous_month_value,
|
|
311
|
+
sum(v_consumption_vrtbovsky_palac.consumption) AS mesicni_spotreba
|
|
312
|
+
FROM v_consumption_vrtbovsky_palac
|
|
313
|
+
WHERE v_consumption_vrtbovsky_palac.commodity = 'water'::text
|
|
314
|
+
GROUP BY v_consumption_vrtbovsky_palac.measure_year, v_consumption_vrtbovsky_palac.measure_month, v_consumption_vrtbovsky_palac.data_do, v_consumption_vrtbovsky_palac.addr, v_consumption_vrtbovsky_palac.var, v_consumption_vrtbovsky_palac.commodity, v_consumption_vrtbovsky_palac.unit;
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
-- v_consumption_energy_vrtbovsky_palac_last_update source
|
|
318
|
+
|
|
319
|
+
CREATE OR REPLACE VIEW v_consumption_energy_vrtbovsky_palac_last_update
|
|
320
|
+
AS WITH last_update AS (
|
|
321
|
+
SELECT m.var_id,
|
|
322
|
+
me.umisteni,
|
|
323
|
+
me.me_serial,
|
|
324
|
+
max(to_timestamp((m.time_measurement / 1000)::double precision)::timestamp without time zone) AS last_update
|
|
325
|
+
FROM vpalac_measurement m
|
|
326
|
+
JOIN vpalac_measuring_equipment me ON m.var_id = me.var_id
|
|
327
|
+
GROUP BY m.var_id, me.umisteni, me.me_serial
|
|
328
|
+
), last_not_zero_value AS (
|
|
329
|
+
SELECT vpalac_measurement.var_id,
|
|
330
|
+
max(to_timestamp((vpalac_measurement.time_measurement / 1000)::double precision)::timestamp without time zone) AS last_not_zero_value
|
|
331
|
+
FROM vpalac_measurement
|
|
332
|
+
WHERE vpalac_measurement.value > 0::numeric
|
|
333
|
+
GROUP BY vpalac_measurement.var_id
|
|
334
|
+
)
|
|
335
|
+
SELECT lu.var_id,
|
|
336
|
+
lu.me_serial,
|
|
337
|
+
lu.umisteni,
|
|
338
|
+
lu.last_update,
|
|
339
|
+
lnz.last_not_zero_value,
|
|
340
|
+
CASE
|
|
341
|
+
WHEN lnz.last_not_zero_value = lu.last_update THEN NULL::timestamp without time zone
|
|
342
|
+
ELSE lnz.last_not_zero_value
|
|
343
|
+
END AS zero_values_after
|
|
344
|
+
FROM last_update lu
|
|
345
|
+
LEFT JOIN last_not_zero_value lnz ON lu.var_id = lnz.var_id;
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
-- v_vpalac_apartments_daily_consumption source
|
|
349
|
+
|
|
350
|
+
CREATE OR REPLACE VIEW v_vpalac_apartments_daily_consumption
|
|
351
|
+
AS WITH last_measurement AS (
|
|
352
|
+
SELECT date_part('year'::text, to_timestamp((m.time_measurement / 1000)::double precision)::timestamp without time zone) AS measure_year,
|
|
353
|
+
date_trunc('day'::text, max(to_timestamp((m.time_measurement / 1000)::double precision)::timestamp without time zone)) AS last_measurement,
|
|
354
|
+
m.var_id
|
|
355
|
+
FROM vpalac_measurement m
|
|
356
|
+
GROUP BY (date_part('year'::text, to_timestamp((m.time_measurement / 1000)::double precision)::timestamp without time zone)), m.var_id
|
|
357
|
+
), daily_status AS (
|
|
358
|
+
SELECT
|
|
359
|
+
CASE
|
|
360
|
+
WHEN me.me_serial::text = '5640201'::text THEN 'Prostor 109,111'::text
|
|
361
|
+
WHEN mm.location_name IS NOT NULL THEN mm.location_name::text
|
|
362
|
+
WHEN me.umisteni::text ~~ '%Byt%'::text THEN "right"(me.umisteni::text, length(me.umisteni::text) - "position"(me.umisteni::text, 'Byt'::text) + 1)
|
|
363
|
+
ELSE "right"(me.umisteni::text, length(me.umisteni::text) - "position"(me.umisteni::text, 'Prostor'::text) + 1)
|
|
364
|
+
END AS apartment,
|
|
365
|
+
CASE
|
|
366
|
+
WHEN mt.met_nazev::text = 'Sensor'::text THEN 'Teplo'::character varying
|
|
367
|
+
ELSE mt.met_nazev
|
|
368
|
+
END AS met_nazev,
|
|
369
|
+
me.mis_nazev,
|
|
370
|
+
me.var_id,
|
|
371
|
+
u.jed_nazev,
|
|
372
|
+
m.measure_date,
|
|
373
|
+
m.start_value
|
|
374
|
+
FROM vpalac_measuring_equipment me
|
|
375
|
+
JOIN ( SELECT m_1.var_id,
|
|
376
|
+
date_trunc('hour'::text, to_timestamp((m_1.time_measurement / 1000)::double precision)::timestamp without time zone) AS measure_date,
|
|
377
|
+
min(m_1.value) AS start_value
|
|
378
|
+
FROM vpalac_measurement m_1
|
|
379
|
+
WHERE to_timestamp((m_1.time_measurement / 1000)::double precision)::timestamp without time zone >= (now() - '3 years'::interval)
|
|
380
|
+
GROUP BY m_1.var_id, (date_trunc('hour'::text, to_timestamp((m_1.time_measurement / 1000)::double precision)::timestamp without time zone))) m ON me.var_id = m.var_id
|
|
381
|
+
LEFT JOIN vpalac_meter_type mt ON me.met_id = mt.met_id
|
|
382
|
+
LEFT JOIN vpalac_units u ON me.pot_id = u.pot_id
|
|
383
|
+
LEFT JOIN vpalac_meter_mapping mm ON mm.var_id = me.var_id
|
|
384
|
+
)
|
|
385
|
+
SELECT ds.apartment,
|
|
386
|
+
ds.met_nazev AS measure_type,
|
|
387
|
+
ds.mis_nazev AS measure_detail,
|
|
388
|
+
ds.jed_nazev,
|
|
389
|
+
ds.measure_date,
|
|
390
|
+
lm.last_measurement,
|
|
391
|
+
CASE
|
|
392
|
+
WHEN ds.met_nazev::text = 'Teplo'::text AND ds.measure_date = lm.last_measurement THEN lead(ds.start_value) OVER (PARTITION BY ds.var_id ORDER BY ds.measure_date)
|
|
393
|
+
ELSE ds.start_value - lag(ds.start_value) OVER (PARTITION BY ds.var_id ORDER BY ds.measure_date)
|
|
394
|
+
END AS consumption,
|
|
395
|
+
ds.var_id
|
|
396
|
+
FROM daily_status ds
|
|
397
|
+
JOIN last_measurement lm ON ds.var_id = lm.var_id AND date_part('year'::text, ds.measure_date) = lm.measure_year;
|
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
-- drop dependant views
|
|
2
|
+
DROP VIEW IF EXISTS v_consumption_energy_buildings_w_data;
|
|
3
|
+
DROP VIEW IF EXISTS v_consumption_energy_consumption;
|
|
4
|
+
|
|
5
|
+
DROP VIEW IF EXISTS v_consumption_energy_consumption_month_p_f;
|
|
6
|
+
DROP VIEW IF EXISTS v_consumption_energy_consumption_month_el_f;
|
|
7
|
+
DROP VIEW IF EXISTS v_consumption_energy_consumption_month_v_f;
|
|
8
|
+
DROP VIEW IF EXISTS v_consumption_vrtbovsky_palac;
|
|
9
|
+
|
|
10
|
+
DROP VIEW IF EXISTS v_consumption_energy_vrtbovsky_palac_last_update;
|
|
11
|
+
DROP VIEW IF EXISTS v_vpalac_apartments_daily_consumption;
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
-- alter timestamp
|
|
15
|
+
ALTER TABLE vpalac_measurement ALTER COLUMN time_measurement TYPE timestamptz USING to_timestamp(time_measurement / 1000);
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
-- rebuild dependant views
|
|
19
|
+
|
|
20
|
+
-- v_consumption_energy_consumption source
|
|
21
|
+
|
|
22
|
+
CREATE OR REPLACE VIEW v_consumption_energy_consumption
|
|
23
|
+
AS SELECT "substring"(consumption_energy_consumption.addr::text, 2, "position"(btrim(consumption_energy_consumption.addr::text, '/'::text), '/'::text) - 1)::character varying(255) AS building_address_code,
|
|
24
|
+
"right"(consumption_energy_consumption.addr::text, char_length(consumption_energy_consumption.addr::text) - "position"(btrim(consumption_energy_consumption.addr::text, '/'::text), '/'::text) - 1)::character varying(255) AS devicetype,
|
|
25
|
+
consumption_energy_consumption.time_utc,
|
|
26
|
+
consumption_energy_consumption.value,
|
|
27
|
+
consumption_energy_consumption.addr,
|
|
28
|
+
consumption_energy_consumption.var,
|
|
29
|
+
consumption_energy_consumption.type,
|
|
30
|
+
consumption_energy_consumption.commodity,
|
|
31
|
+
consumption_energy_consumption.unit,
|
|
32
|
+
consumption_energy_consumption.meter
|
|
33
|
+
FROM consumption_energy_consumption
|
|
34
|
+
UNION ALL
|
|
35
|
+
SELECT ((( SELECT btrim(consumption_energy_buildings.building_address_code::text) AS btrim
|
|
36
|
+
FROM consumption_energy_buildings
|
|
37
|
+
WHERE consumption_energy_buildings.building_name::text = 'Vrtbovský palác'::text)))::character varying(255) AS building_address_code,
|
|
38
|
+
mt.met_nazev::character varying(255) AS devicetype,
|
|
39
|
+
m.time_measurement::timestamp without time zone AS time_utc,
|
|
40
|
+
m.value::numeric(30,15) AS value,
|
|
41
|
+
NULL::character varying(255) AS addr,
|
|
42
|
+
me.var_id::character varying(255) AS var,
|
|
43
|
+
NULL::character varying(255) AS type,
|
|
44
|
+
NULL::character varying(255) AS commodity,
|
|
45
|
+
NULL::character varying(255) AS unit,
|
|
46
|
+
NULL::character varying(255) AS meter
|
|
47
|
+
FROM vpalac_measurement m
|
|
48
|
+
JOIN vpalac_measuring_equipment me ON me.var_id = m.var_id
|
|
49
|
+
JOIN vpalac_meter_type mt ON mt.met_id = me.met_id;
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
-- v_consumption_energy_buildings_w_data source
|
|
53
|
+
|
|
54
|
+
CREATE OR REPLACE VIEW v_consumption_energy_buildings_w_data
|
|
55
|
+
AS SELECT consumption_energy_buildings.id,
|
|
56
|
+
consumption_energy_buildings.building_name,
|
|
57
|
+
consumption_energy_buildings.description,
|
|
58
|
+
consumption_energy_buildings.building_address_code,
|
|
59
|
+
consumption_energy_buildings.building_label,
|
|
60
|
+
consumption_energy_buildings.current_note,
|
|
61
|
+
consumption_energy_buildings.main_use,
|
|
62
|
+
consumption_energy_buildings.secondary_use,
|
|
63
|
+
consumption_energy_buildings.year_of_construction,
|
|
64
|
+
consumption_energy_buildings.method_of_protection,
|
|
65
|
+
consumption_energy_buildings.built_up_area,
|
|
66
|
+
consumption_energy_buildings.heated_bulding_volume,
|
|
67
|
+
consumption_energy_buildings.students_count,
|
|
68
|
+
consumption_energy_buildings.employees_count,
|
|
69
|
+
consumption_energy_buildings.classrooms_count,
|
|
70
|
+
consumption_energy_buildings.beds_count,
|
|
71
|
+
consumption_energy_buildings.eno_id,
|
|
72
|
+
consumption_energy_buildings.csu_code,
|
|
73
|
+
consumption_energy_buildings.ku_code,
|
|
74
|
+
consumption_energy_buildings.allotment_number,
|
|
75
|
+
consumption_energy_buildings.registration_unit,
|
|
76
|
+
consumption_energy_buildings.gas_consumption_normatives,
|
|
77
|
+
consumption_energy_buildings.heat_consumption_normatives,
|
|
78
|
+
consumption_energy_buildings.water_consumption_normatives,
|
|
79
|
+
consumption_energy_buildings.electricity_consumption_normatives_per_person,
|
|
80
|
+
consumption_energy_buildings.electricity_consumption_normatives,
|
|
81
|
+
consumption_energy_buildings.energetic_management,
|
|
82
|
+
consumption_energy_buildings.opening_hours,
|
|
83
|
+
consumption_energy_buildings.weekend_opening_hours,
|
|
84
|
+
consumption_energy_buildings.latitude,
|
|
85
|
+
consumption_energy_buildings.longitude,
|
|
86
|
+
consumption_energy_buildings.address_street,
|
|
87
|
+
consumption_energy_buildings.address_house_number,
|
|
88
|
+
consumption_energy_buildings.address_city,
|
|
89
|
+
consumption_energy_buildings.address_country,
|
|
90
|
+
consumption_energy_buildings.address_mail,
|
|
91
|
+
consumption_energy_buildings.address_phone,
|
|
92
|
+
consumption_energy_buildings.address_web_address,
|
|
93
|
+
consumption_energy_buildings.penb_penbnumber,
|
|
94
|
+
consumption_energy_buildings.penb_issue_date,
|
|
95
|
+
consumption_energy_buildings.penb_total_building_envelope_area,
|
|
96
|
+
consumption_energy_buildings.penb_volume_factor_of_avshape,
|
|
97
|
+
consumption_energy_buildings.penb_total_energy_reference_area,
|
|
98
|
+
consumption_energy_buildings.penb_total_provided_energy,
|
|
99
|
+
consumption_energy_buildings.penb_total_provided_energy_category,
|
|
100
|
+
consumption_energy_buildings.penb_primary_non_renewable_energy,
|
|
101
|
+
consumption_energy_buildings.penb_primary_non_renewable_energy_category,
|
|
102
|
+
consumption_energy_buildings.penb_building_envelope,
|
|
103
|
+
consumption_energy_buildings.penb_building_envelope_category,
|
|
104
|
+
consumption_energy_buildings.penb_heating,
|
|
105
|
+
consumption_energy_buildings.penb_heating_category,
|
|
106
|
+
consumption_energy_buildings.penb_cooling,
|
|
107
|
+
consumption_energy_buildings.penb_cooling_category,
|
|
108
|
+
consumption_energy_buildings.penb_ventilation,
|
|
109
|
+
consumption_energy_buildings.penb_ventilation_category,
|
|
110
|
+
consumption_energy_buildings.penb_humidity_adjustment,
|
|
111
|
+
consumption_energy_buildings.penb_humidity_adjustment_category,
|
|
112
|
+
consumption_energy_buildings.penb_warm_water,
|
|
113
|
+
consumption_energy_buildings.penb_warm_water_category,
|
|
114
|
+
consumption_energy_buildings.penb_lighting,
|
|
115
|
+
consumption_energy_buildings.penb_lighting_category,
|
|
116
|
+
consumption_energy_buildings.energy_audits_energy_audit,
|
|
117
|
+
consumption_energy_buildings.energy_audits_earegistration_number,
|
|
118
|
+
consumption_energy_buildings.energy_audits_created_at,
|
|
119
|
+
consumption_energy_buildings.building_envelope_side_wall_prevailing_construction,
|
|
120
|
+
consumption_energy_buildings.building_envelope_side_wall_area,
|
|
121
|
+
consumption_energy_buildings.building_envelope_side_wall_heat_insulation,
|
|
122
|
+
consumption_energy_buildings.building_envelope_side_wall_year_of_adjustment,
|
|
123
|
+
consumption_energy_buildings.building_envelope_side_wall_technical_condition,
|
|
124
|
+
consumption_energy_buildings.building_envelope_filling_of_hole_construction,
|
|
125
|
+
consumption_energy_buildings.building_envelope_filling_of_hole_area,
|
|
126
|
+
consumption_energy_buildings.building_envelope_filling_of_hole_year_of_adjustment,
|
|
127
|
+
consumption_energy_buildings.building_envelope_filling_of_hole_technical_condition,
|
|
128
|
+
consumption_energy_buildings.building_envelope_roof_construction,
|
|
129
|
+
consumption_energy_buildings.building_envelope_roof_area,
|
|
130
|
+
consumption_energy_buildings.building_envelope_roof_thermal_insulation,
|
|
131
|
+
consumption_energy_buildings.building_envelope_roof_year_of_adjustment,
|
|
132
|
+
consumption_energy_buildings.building_envelope_roof_technical_condition,
|
|
133
|
+
consumption_energy_buildings.building_envelope_floor_of_the_lowest_heated_floor_construction,
|
|
134
|
+
consumption_energy_buildings.building_envelope_floor_of_the_lowest_heated_floor_area,
|
|
135
|
+
consumption_energy_buildings.floor_of_the_lowest_heated_floor_thermal_insulation,
|
|
136
|
+
consumption_energy_buildings.building_envelope_floor_of_the_lowest_heated_floor_year_of_adju,
|
|
137
|
+
consumption_energy_buildings.floor_of_the_lowest_heated_floor_technical_condition,
|
|
138
|
+
consumption_energy_buildings.fuel_and_energy_coal,
|
|
139
|
+
consumption_energy_buildings.fuel_and_energy_gas,
|
|
140
|
+
consumption_energy_buildings.fuel_and_energy_electricity,
|
|
141
|
+
consumption_energy_buildings.fuel_and_energy_czt,
|
|
142
|
+
consumption_energy_buildings.fuel_and_energy_oze,
|
|
143
|
+
consumption_energy_buildings.fuel_and_energy_other,
|
|
144
|
+
consumption_energy_buildings.technical_equipment_heating_main_source_of_heat,
|
|
145
|
+
consumption_energy_buildings.technical_equipment_heating_heat_percentage,
|
|
146
|
+
consumption_energy_buildings.technical_equipment_heating_secondary_source_of_heat,
|
|
147
|
+
consumption_energy_buildings.technical_equipment_heating_heating_system,
|
|
148
|
+
consumption_energy_buildings.technical_equipment_heating_year,
|
|
149
|
+
consumption_energy_buildings.technical_equipment_heating_technical_condition,
|
|
150
|
+
consumption_energy_buildings.technical_equipment_cooling_cooling_system,
|
|
151
|
+
consumption_energy_buildings.technical_equipment_cooling_cooling_area_percentage,
|
|
152
|
+
consumption_energy_buildings.technical_equipment_cooling_year,
|
|
153
|
+
consumption_energy_buildings.technical_equipment_cooling_technical_condition,
|
|
154
|
+
consumption_energy_buildings.technical_equipment_ventilation_ventilation,
|
|
155
|
+
consumption_energy_buildings.technical_equipment_ventilation_year,
|
|
156
|
+
consumption_energy_buildings.technical_equipment_ventilation_technical_condition,
|
|
157
|
+
consumption_energy_buildings.technical_equipment_humidity_adjustment_humidity_adjustment,
|
|
158
|
+
consumption_energy_buildings.technical_equipment_humidity_adjustment_year,
|
|
159
|
+
consumption_energy_buildings.technical_equipment_humidity_adjustment_technical_condition,
|
|
160
|
+
consumption_energy_buildings.technical_equipment_hot_water_predominant_way_of_heating_tv,
|
|
161
|
+
consumption_energy_buildings.technical_equipment_hot_water_hot_water_source,
|
|
162
|
+
consumption_energy_buildings.technical_equipment_hot_water_year,
|
|
163
|
+
consumption_energy_buildings.technical_equipment_hot_water_technical_condition,
|
|
164
|
+
consumption_energy_buildings.technical_equipment_lighting_lighting,
|
|
165
|
+
consumption_energy_buildings.technical_equipment_lighting_year,
|
|
166
|
+
consumption_energy_buildings.technical_equipment_lighting_technical_condition,
|
|
167
|
+
consumption_energy_buildings.technical_equipment_lighting_other_technological_elements,
|
|
168
|
+
consumption_energy_buildings.technical_equipment_lighting_measurement_method,
|
|
169
|
+
consumption_energy_buildings.oze_energy_production_solar_energy_photovoltaic,
|
|
170
|
+
consumption_energy_buildings.oze_energy_production_solar_energy_photothermal,
|
|
171
|
+
consumption_energy_buildings.oze_energy_production_integrated_turbines_wind_energy,
|
|
172
|
+
consumption_energy_buildings.oze_energy_production_heat_pump,
|
|
173
|
+
consumption_energy_buildings.waste_and_emissions_solid_waste_production,
|
|
174
|
+
consumption_energy_buildings.waste_and_emissions_tied_co2_emissions,
|
|
175
|
+
consumption_energy_buildings.waste_and_emissions_sox_emissions,
|
|
176
|
+
consumption_energy_buildings.waste_and_emissions_operating_co_2emissions,
|
|
177
|
+
consumption_energy_buildings.link
|
|
178
|
+
FROM consumption_energy_buildings
|
|
179
|
+
WHERE (btrim(consumption_energy_buildings.building_address_code::text) IN ( SELECT DISTINCT v_consumption_energy_consumption.building_address_code
|
|
180
|
+
FROM v_consumption_energy_consumption)) AND consumption_energy_buildings.building_address_code::text !~~ '10.%'::text;
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
-- v_consumption_vrtbovsky_palac source
|
|
184
|
+
|
|
185
|
+
CREATE OR REPLACE VIEW v_consumption_vrtbovsky_palac
|
|
186
|
+
AS WITH daily_status AS (
|
|
187
|
+
SELECT date_part('year'::text, m.time_measurement::timestamp without time zone) AS measure_year,
|
|
188
|
+
date_part('month'::text, m.time_measurement::timestamp without time zone) AS measure_month,
|
|
189
|
+
me.me_id::text AS addr,
|
|
190
|
+
m.var_id AS var,
|
|
191
|
+
CASE
|
|
192
|
+
WHEN mt.met_nazev::text = 'Senzor'::text THEN 'heat'::text
|
|
193
|
+
WHEN mt.met_nazev::text = 'Elektroměr'::text THEN 'electricity'::text
|
|
194
|
+
WHEN mt.met_nazev::text = 'Plynoměr'::text THEN 'gas'::text
|
|
195
|
+
WHEN mt.met_nazev::text = 'Vodoměr'::text THEN 'water'::text
|
|
196
|
+
ELSE NULL::text
|
|
197
|
+
END AS commodity,
|
|
198
|
+
NULL::text AS unit,
|
|
199
|
+
CASE
|
|
200
|
+
WHEN mt.met_nazev::text = 'Senzor'::text AND date_part('month'::text, m.time_measurement::timestamp without time zone) = 12::double precision THEN 0::numeric
|
|
201
|
+
ELSE min(m.value)
|
|
202
|
+
END AS start_value,
|
|
203
|
+
me.mis_nazev,
|
|
204
|
+
date_trunc('month'::text, m.time_measurement::timestamp without time zone) AS data_do
|
|
205
|
+
FROM vpalac_measuring_equipment me
|
|
206
|
+
JOIN vpalac_measurement m ON me.var_id = m.var_id
|
|
207
|
+
JOIN vpalac_meter_type mt ON me.met_id = mt.met_id
|
|
208
|
+
GROUP BY me.me_id, (date_part('year'::text, m.time_measurement::timestamp without time zone)), (date_part('month'::text, m.time_measurement::timestamp without time zone)), mt.met_nazev, m.var_id, me.mis_nazev, me.umisteni, (date_trunc('month'::text, m.time_measurement::timestamp without time zone))
|
|
209
|
+
)
|
|
210
|
+
SELECT daily_status.measure_year,
|
|
211
|
+
daily_status.measure_month,
|
|
212
|
+
daily_status.addr,
|
|
213
|
+
daily_status.var,
|
|
214
|
+
daily_status.commodity,
|
|
215
|
+
daily_status.unit,
|
|
216
|
+
lead(daily_status.start_value) OVER (PARTITION BY daily_status.var ORDER BY daily_status.data_do) - daily_status.start_value AS consumption,
|
|
217
|
+
daily_status.data_do
|
|
218
|
+
FROM daily_status;
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
-- v_consumption_energy_consumption_month_p_f source
|
|
222
|
+
|
|
223
|
+
CREATE OR REPLACE VIEW v_consumption_energy_consumption_month_p_f
|
|
224
|
+
AS SELECT v_consumption_energy_consumption_month_ptv.rok,
|
|
225
|
+
v_consumption_energy_consumption_month_ptv.mesic,
|
|
226
|
+
v_consumption_energy_consumption_month_ptv.addr,
|
|
227
|
+
v_consumption_energy_consumption_month_ptv.var,
|
|
228
|
+
v_consumption_energy_consumption_month_ptv.commodity,
|
|
229
|
+
v_consumption_energy_consumption_month_ptv.unit,
|
|
230
|
+
v_consumption_energy_consumption_month_ptv.value,
|
|
231
|
+
v_consumption_energy_consumption_month_ptv.data_do,
|
|
232
|
+
v_consumption_energy_consumption_month_ptv.count,
|
|
233
|
+
v_consumption_energy_consumption_month_ptv.previous_month_value,
|
|
234
|
+
v_consumption_energy_consumption_month_ptv.mesicni_spotreba
|
|
235
|
+
FROM v_consumption_energy_consumption_month_ptv
|
|
236
|
+
WHERE v_consumption_energy_consumption_month_ptv.addr::text ~~ '%/PF%'::text AND v_consumption_energy_consumption_month_ptv.rok > 2018::double precision
|
|
237
|
+
UNION
|
|
238
|
+
SELECT v_consumption_vrtbovsky_palac.measure_year AS rok,
|
|
239
|
+
v_consumption_vrtbovsky_palac.measure_month AS mesic,
|
|
240
|
+
v_consumption_vrtbovsky_palac.addr::character varying(255) AS addr,
|
|
241
|
+
v_consumption_vrtbovsky_palac.var::character varying(255) AS var,
|
|
242
|
+
v_consumption_vrtbovsky_palac.commodity::character varying(255) AS commodity,
|
|
243
|
+
v_consumption_vrtbovsky_palac.unit::character varying(255) AS unit,
|
|
244
|
+
sum(v_consumption_vrtbovsky_palac.consumption) AS value,
|
|
245
|
+
v_consumption_vrtbovsky_palac.data_do::date AS data_do,
|
|
246
|
+
count(*) AS count,
|
|
247
|
+
NULL::numeric AS previous_month_value,
|
|
248
|
+
sum(v_consumption_vrtbovsky_palac.consumption) AS mesicni_spotreba
|
|
249
|
+
FROM v_consumption_vrtbovsky_palac
|
|
250
|
+
WHERE v_consumption_vrtbovsky_palac.commodity = 'gas'::text
|
|
251
|
+
GROUP BY v_consumption_vrtbovsky_palac.measure_year, v_consumption_vrtbovsky_palac.measure_month, v_consumption_vrtbovsky_palac.data_do, v_consumption_vrtbovsky_palac.addr, v_consumption_vrtbovsky_palac.var, v_consumption_vrtbovsky_palac.commodity, v_consumption_vrtbovsky_palac.unit;
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
-- v_consumption_energy_consumption_month_el_f source
|
|
255
|
+
|
|
256
|
+
CREATE OR REPLACE VIEW v_consumption_energy_consumption_month_el_f
|
|
257
|
+
AS SELECT date_part('year'::text, consumption_energy_consumption.time_utc) AS rok,
|
|
258
|
+
date_part('month'::text, consumption_energy_consumption.time_utc) AS mesic,
|
|
259
|
+
replace(consumption_energy_consumption.addr::text, concat('/', consumption_energy_consumption.var), ''::text)::character varying(255) AS addr,
|
|
260
|
+
consumption_energy_consumption.var,
|
|
261
|
+
consumption_energy_consumption.commodity,
|
|
262
|
+
consumption_energy_consumption.unit,
|
|
263
|
+
sum(consumption_energy_consumption.value::numeric(10,2)) / 4::numeric AS value,
|
|
264
|
+
max(consumption_energy_consumption.time_utc::date) AS data_do,
|
|
265
|
+
count(*) AS count
|
|
266
|
+
FROM consumption_energy_consumption
|
|
267
|
+
WHERE (consumption_energy_consumption.var::text = ANY (ARRAY['EFwActi'::character varying::text, 'EFwActiNT'::character varying::text, 'EFwActi'::character varying::text])) AND consumption_energy_consumption.addr::text ~~ '%/EF%'::text AND consumption_energy_consumption.addr::text !~~ '/10.%'::text AND consumption_energy_consumption.addr::text !~~ '10.%'::text
|
|
268
|
+
GROUP BY (date_part('year'::text, consumption_energy_consumption.time_utc)), (date_part('month'::text, consumption_energy_consumption.time_utc)), consumption_energy_consumption.addr, consumption_energy_consumption.var, consumption_energy_consumption.commodity, consumption_energy_consumption.unit
|
|
269
|
+
UNION
|
|
270
|
+
SELECT v_consumption_vrtbovsky_palac.measure_year AS rok,
|
|
271
|
+
v_consumption_vrtbovsky_palac.measure_month AS mesic,
|
|
272
|
+
v_consumption_vrtbovsky_palac.addr::character varying(255) AS addr,
|
|
273
|
+
v_consumption_vrtbovsky_palac.var::character varying(255) AS var,
|
|
274
|
+
v_consumption_vrtbovsky_palac.commodity::character varying(255) AS commodity,
|
|
275
|
+
v_consumption_vrtbovsky_palac.unit::character varying(255) AS unit,
|
|
276
|
+
sum(v_consumption_vrtbovsky_palac.consumption) AS value,
|
|
277
|
+
v_consumption_vrtbovsky_palac.data_do::date AS data_do,
|
|
278
|
+
count(*) AS count
|
|
279
|
+
FROM v_consumption_vrtbovsky_palac
|
|
280
|
+
WHERE v_consumption_vrtbovsky_palac.commodity = 'electricity'::text
|
|
281
|
+
GROUP BY v_consumption_vrtbovsky_palac.measure_year, v_consumption_vrtbovsky_palac.measure_month, v_consumption_vrtbovsky_palac.data_do, v_consumption_vrtbovsky_palac.addr, v_consumption_vrtbovsky_palac.var, v_consumption_vrtbovsky_palac.commodity, v_consumption_vrtbovsky_palac.unit;
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
-- v_consumption_energy_consumption_month_v_f source
|
|
285
|
+
|
|
286
|
+
CREATE OR REPLACE VIEW v_consumption_energy_consumption_month_v_f
|
|
287
|
+
AS SELECT v_consumption_energy_consumption_month_ptv.rok,
|
|
288
|
+
v_consumption_energy_consumption_month_ptv.mesic,
|
|
289
|
+
v_consumption_energy_consumption_month_ptv.addr,
|
|
290
|
+
v_consumption_energy_consumption_month_ptv.var,
|
|
291
|
+
v_consumption_energy_consumption_month_ptv.commodity,
|
|
292
|
+
v_consumption_energy_consumption_month_ptv.unit,
|
|
293
|
+
v_consumption_energy_consumption_month_ptv.value,
|
|
294
|
+
v_consumption_energy_consumption_month_ptv.data_do,
|
|
295
|
+
v_consumption_energy_consumption_month_ptv.count,
|
|
296
|
+
v_consumption_energy_consumption_month_ptv.previous_month_value,
|
|
297
|
+
v_consumption_energy_consumption_month_ptv.mesicni_spotreba
|
|
298
|
+
FROM v_consumption_energy_consumption_month_ptv
|
|
299
|
+
WHERE v_consumption_energy_consumption_month_ptv.addr::text ~~ '%VF%'::text AND v_consumption_energy_consumption_month_ptv.rok > 2018::double precision
|
|
300
|
+
UNION
|
|
301
|
+
SELECT v_consumption_vrtbovsky_palac.measure_year AS rok,
|
|
302
|
+
v_consumption_vrtbovsky_palac.measure_month AS mesic,
|
|
303
|
+
v_consumption_vrtbovsky_palac.addr::character varying(255) AS addr,
|
|
304
|
+
v_consumption_vrtbovsky_palac.var::character varying(255) AS var,
|
|
305
|
+
v_consumption_vrtbovsky_palac.commodity::character varying(255) AS commodity,
|
|
306
|
+
v_consumption_vrtbovsky_palac.unit::character varying(255) AS unit,
|
|
307
|
+
sum(v_consumption_vrtbovsky_palac.consumption) AS value,
|
|
308
|
+
v_consumption_vrtbovsky_palac.data_do::date AS data_do,
|
|
309
|
+
count(*) AS count,
|
|
310
|
+
NULL::numeric AS previous_month_value,
|
|
311
|
+
sum(v_consumption_vrtbovsky_palac.consumption) AS mesicni_spotreba
|
|
312
|
+
FROM v_consumption_vrtbovsky_palac
|
|
313
|
+
WHERE v_consumption_vrtbovsky_palac.commodity = 'water'::text
|
|
314
|
+
GROUP BY v_consumption_vrtbovsky_palac.measure_year, v_consumption_vrtbovsky_palac.measure_month, v_consumption_vrtbovsky_palac.data_do, v_consumption_vrtbovsky_palac.addr, v_consumption_vrtbovsky_palac.var, v_consumption_vrtbovsky_palac.commodity, v_consumption_vrtbovsky_palac.unit;
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
-- v_consumption_energy_vrtbovsky_palac_last_update source
|
|
318
|
+
|
|
319
|
+
CREATE OR REPLACE VIEW v_consumption_energy_vrtbovsky_palac_last_update
|
|
320
|
+
AS WITH last_update AS (
|
|
321
|
+
SELECT m.var_id,
|
|
322
|
+
me.umisteni,
|
|
323
|
+
me.me_serial,
|
|
324
|
+
max(m.time_measurement::timestamp without time zone) AS last_update
|
|
325
|
+
FROM vpalac_measurement m
|
|
326
|
+
JOIN vpalac_measuring_equipment me ON m.var_id = me.var_id
|
|
327
|
+
GROUP BY m.var_id, me.umisteni, me.me_serial
|
|
328
|
+
), last_not_zero_value AS (
|
|
329
|
+
SELECT vpalac_measurement.var_id,
|
|
330
|
+
max(vpalac_measurement.time_measurement::timestamp without time zone) AS last_not_zero_value
|
|
331
|
+
FROM vpalac_measurement
|
|
332
|
+
WHERE vpalac_measurement.value > 0::numeric
|
|
333
|
+
GROUP BY vpalac_measurement.var_id
|
|
334
|
+
)
|
|
335
|
+
SELECT lu.var_id,
|
|
336
|
+
lu.me_serial,
|
|
337
|
+
lu.umisteni,
|
|
338
|
+
lu.last_update,
|
|
339
|
+
lnz.last_not_zero_value,
|
|
340
|
+
CASE
|
|
341
|
+
WHEN lnz.last_not_zero_value = lu.last_update THEN NULL::timestamp without time zone
|
|
342
|
+
ELSE lnz.last_not_zero_value
|
|
343
|
+
END AS zero_values_after
|
|
344
|
+
FROM last_update lu
|
|
345
|
+
LEFT JOIN last_not_zero_value lnz ON lu.var_id = lnz.var_id;
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
-- v_vpalac_apartments_daily_consumption source
|
|
349
|
+
|
|
350
|
+
CREATE OR REPLACE VIEW v_vpalac_apartments_daily_consumption
|
|
351
|
+
AS WITH last_measurement AS (
|
|
352
|
+
SELECT date_part('year'::text, m.time_measurement::timestamp without time zone) AS measure_year,
|
|
353
|
+
date_trunc('day'::text, max(m.time_measurement::timestamp without time zone)) AS last_measurement,
|
|
354
|
+
m.var_id
|
|
355
|
+
FROM vpalac_measurement m
|
|
356
|
+
GROUP BY (date_part('year'::text, m.time_measurement::timestamp without time zone)), m.var_id
|
|
357
|
+
), daily_status AS (
|
|
358
|
+
SELECT
|
|
359
|
+
CASE
|
|
360
|
+
WHEN me.me_serial::text = '5640201'::text THEN 'Prostor 109,111'::text
|
|
361
|
+
WHEN mm.location_name IS NOT NULL THEN mm.location_name::text
|
|
362
|
+
WHEN me.umisteni::text ~~ '%Byt%'::text THEN "right"(me.umisteni::text, length(me.umisteni::text) - "position"(me.umisteni::text, 'Byt'::text) + 1)
|
|
363
|
+
ELSE "right"(me.umisteni::text, length(me.umisteni::text) - "position"(me.umisteni::text, 'Prostor'::text) + 1)
|
|
364
|
+
END AS apartment,
|
|
365
|
+
CASE
|
|
366
|
+
WHEN mt.met_nazev::text = 'Sensor'::text THEN 'Teplo'::character varying
|
|
367
|
+
ELSE mt.met_nazev
|
|
368
|
+
END AS met_nazev,
|
|
369
|
+
me.mis_nazev,
|
|
370
|
+
me.var_id,
|
|
371
|
+
u.jed_nazev,
|
|
372
|
+
m.measure_date,
|
|
373
|
+
m.start_value
|
|
374
|
+
FROM vpalac_measuring_equipment me
|
|
375
|
+
JOIN ( SELECT m_1.var_id,
|
|
376
|
+
date_trunc('hour'::text, m_1.time_measurement::timestamp without time zone) AS measure_date,
|
|
377
|
+
min(m_1.value) AS start_value
|
|
378
|
+
FROM vpalac_measurement m_1
|
|
379
|
+
WHERE m_1.time_measurement::timestamp without time zone >= (now() - '3 years'::interval)
|
|
380
|
+
GROUP BY m_1.var_id, (date_trunc('hour'::text, m_1.time_measurement::timestamp without time zone))) m ON me.var_id = m.var_id
|
|
381
|
+
LEFT JOIN vpalac_meter_type mt ON me.met_id = mt.met_id
|
|
382
|
+
LEFT JOIN vpalac_units u ON me.pot_id = u.pot_id
|
|
383
|
+
LEFT JOIN vpalac_meter_mapping mm ON mm.var_id = me.var_id
|
|
384
|
+
)
|
|
385
|
+
SELECT ds.apartment,
|
|
386
|
+
ds.met_nazev AS measure_type,
|
|
387
|
+
ds.mis_nazev AS measure_detail,
|
|
388
|
+
ds.jed_nazev,
|
|
389
|
+
ds.measure_date,
|
|
390
|
+
lm.last_measurement,
|
|
391
|
+
CASE
|
|
392
|
+
WHEN ds.met_nazev::text = 'Teplo'::text AND ds.measure_date = lm.last_measurement THEN lead(ds.start_value) OVER (PARTITION BY ds.var_id ORDER BY ds.measure_date)
|
|
393
|
+
ELSE ds.start_value - lag(ds.start_value) OVER (PARTITION BY ds.var_id ORDER BY ds.measure_date)
|
|
394
|
+
END AS consumption,
|
|
395
|
+
ds.var_id
|
|
396
|
+
FROM daily_status ds
|
|
397
|
+
JOIN last_measurement lm ON ds.var_id = lm.var_id AND date_part('year'::text, ds.measure_date) = lm.measure_year;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseTransformation, ITransformation } from "@golemio/core/dist/integration-engine/transformations";
|
|
2
2
|
export interface IVpalacMeasurement {
|
|
3
3
|
var_id: string;
|
|
4
|
-
time_measurement:
|
|
4
|
+
time_measurement: string;
|
|
5
5
|
value: number;
|
|
6
6
|
}
|
|
7
7
|
export declare class VpalacMeasurementTransformation extends BaseTransformation implements ITransformation {
|
|
@@ -12,7 +12,7 @@ class VpalacMeasurementTransformation extends transformations_1.BaseTransformati
|
|
|
12
12
|
if (!values.length)
|
|
13
13
|
return;
|
|
14
14
|
const result = (0, ParserHelpers_1.getUniqueBy)(values, "timestamp").map((el) => ({
|
|
15
|
-
time_measurement: el.timestamp,
|
|
15
|
+
time_measurement: new Date(el.timestamp).toISOString(),
|
|
16
16
|
value: el.value,
|
|
17
17
|
var_id,
|
|
18
18
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VpalacMeasurementTransformation.js","sourceRoot":"","sources":["../../../src/integration-engine/transformations/VpalacMeasurementTransformation.ts"],"names":[],"mappings":";;;AAAA,4DAAwD;AACxD,mDAAwC;AACxC,2FAA4G;AAQ5G,MAAa,+BAAgC,SAAQ,oCAAkB;IAGnE;QACI,KAAK,EAAE,CAAC;QAIF,qBAAgB,GAAG,CAAC,IAAS,EAAoC,EAAE;YACzE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;YAEhC,IAAI,CAAC,MAAM,CAAC,MAAM;gBAAE,OAAO;YAE3B,MAAM,MAAM,GAAG,IAAA,2BAAW,EAAM,MAAM,EAAE,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,EAAO,EAAE,EAAE,CAAC,CAAC;gBACnE,gBAAgB,EAAE,EAAE,CAAC,SAAS;
|
|
1
|
+
{"version":3,"file":"VpalacMeasurementTransformation.js","sourceRoot":"","sources":["../../../src/integration-engine/transformations/VpalacMeasurementTransformation.ts"],"names":[],"mappings":";;;AAAA,4DAAwD;AACxD,mDAAwC;AACxC,2FAA4G;AAQ5G,MAAa,+BAAgC,SAAQ,oCAAkB;IAGnE;QACI,KAAK,EAAE,CAAC;QAIF,qBAAgB,GAAG,CAAC,IAAS,EAAoC,EAAE;YACzE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;YAEhC,IAAI,CAAC,MAAM,CAAC,MAAM;gBAAE,OAAO;YAE3B,MAAM,MAAM,GAAG,IAAA,2BAAW,EAAM,MAAM,EAAE,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,EAAO,EAAE,EAAE,CAAC,CAAC;gBACnE,gBAAgB,EAAE,IAAI,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE;gBACtD,KAAK,EAAE,EAAE,CAAC,KAAK;gBACf,MAAM;aACT,CAAC,CAAC,CAAC;YAEJ,OAAO,MAAM,CAAC;QAClB,CAAC,CAAC;QAfE,IAAI,CAAC,IAAI,GAAG,uBAAgB,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC;IACzD,CAAC;CAeJ;AArBD,0EAqBC"}
|
|
@@ -227,7 +227,7 @@ const datasourceVpalacUnitsJsonSchema = {
|
|
|
227
227
|
const outputVpalacMeasurementSDMA = {
|
|
228
228
|
time_measurement: {
|
|
229
229
|
primaryKey: true,
|
|
230
|
-
type: sequelize_1.DataTypes.
|
|
230
|
+
type: sequelize_1.DataTypes.DATE,
|
|
231
231
|
},
|
|
232
232
|
value: sequelize_1.DataTypes.REAL,
|
|
233
233
|
var_id: {
|
|
@@ -325,7 +325,7 @@ const outputVpalacMeasurementJsonSchema = {
|
|
|
325
325
|
type: "object",
|
|
326
326
|
properties: {
|
|
327
327
|
time_measurement: {
|
|
328
|
-
type: "
|
|
328
|
+
type: "string",
|
|
329
329
|
},
|
|
330
330
|
value: {
|
|
331
331
|
type: ["null", "number"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnergeticsVpalac.js","sourceRoot":"","sources":["../../../src/schema-definitions/providers/EnergeticsVpalac.ts"],"names":[],"mappings":";;;AAAA,mEAAiF;AAEjF,yCAAyC;AACzC,2BAA2B;AAC3B,MAAM,qCAAqC,GAAG;IAC1C,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,MAAM,EAAE;gBACJ,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE;oBACH,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACR,SAAS,EAAE;4BACP,IAAI,EAAE,SAAS;yBAClB;wBACD,KAAK,EAAE;4BACH,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;yBAC3B;qBACJ;oBACD,QAAQ,EAAE,CAAC,WAAW,EAAE,OAAO,CAAC;iBACnC;gBACD,eAAe,EAAE,IAAI;aACxB;YACD,MAAM,EAAE;gBACJ,IAAI,EAAE,QAAQ;aACjB;SACJ;QACD,QAAQ,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;QAC9B,oBAAoB,EAAE,IAAI;KAC7B;CACJ,CAAC;AAEF,MAAM,4CAA4C,GAAG;IACjD,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,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CAAsC;QACjE,WAAW,EAAE,GAAG,YAAY,CAAC,WAAW,2BAA2B;KACtE;IACD,KAAK,EAAE;QACH,oBAAoB,EAAE,+BAA+B;QACrD,IAAI,EAAE,GAAG,YAAY,CAAC,IAAI,OAAO;QACjC,gBAAgB,EAAE,2BAA2B;QAC7C,yBAAyB,EAAE,qBAAqB;QAChD,WAAW,EAAE,GAAG,YAAY,CAAC,WAAW,QAAQ;KACnD;CACJ,CAAC;AAEO,4CAAgB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@golemio/energetics",
|
|
3
|
-
"version": "1.2.8-dev.
|
|
3
|
+
"version": "1.2.8-dev.959608514",
|
|
4
4
|
"description": "Golemio Energetics Module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"build": "rimraf ./dist && tspc -p ./tsconfig.build.json",
|
|
9
9
|
"build-minimal": "run-s 'build -- --sourceMap false --declaration false'",
|
|
10
10
|
"build-watch": "run-s 'build -- --watch --preserveWatchOutput'",
|
|
11
|
-
"test": "cross-env NODE_ENV=test mocha --exit --check-leaks --timeout 120000 -r ts-node/register -r tsconfig-paths/register --file 'test/setup.ts' 'test/**/*.test.ts'",
|
|
11
|
+
"test": "cross-env NODE_ENV=test mocha --exit --check-leaks --timeout 120000 -r ts-node/register -r tsconfig-paths/register -r dotenv/config --file 'test/setup.ts' 'test/**/*.test.ts'",
|
|
12
12
|
"test-debug": "run-s 'test -- --inspect-brk=9230'",
|
|
13
13
|
"code-coverage": "nyc run-s 'test -- -r source-map-support/register'",
|
|
14
14
|
"generate-docs": "typedoc --out docs/typedoc src",
|