@golemio/bicycle-counters 1.0.10 → 1.0.11-dev.628543612
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/20220829150034-new-analytic-view-for-bicycle-counters.js +53 -0
- package/db/migrations/postgresql/sqls/20220829150034-new-analytic-view-for-bicycle-counters-down.sql +3 -0
- package/db/migrations/postgresql/sqls/20220829150034-new-analytic-view-for-bicycle-counters-up.sql +79 -0
- package/dist/output-gateway/BicycleCountersRouter.js +4 -5
- package/dist/output-gateway/BicycleCountersRouter.js.map +1 -1
- package/package.json +63 -66
|
@@ -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', '20220829150034-new-analytic-view-for-bicycle-counters-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', '20220829150034-new-analytic-view-for-bicycle-counters-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
|
+
};
|
package/db/migrations/postgresql/sqls/20220829150034-new-analytic-view-for-bicycle-counters-up.sql
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
CREATE OR REPLACE VIEW analytic.v_camea_bikecounters_history
|
|
2
|
+
AS SELECT to_timestamp((det.measured_from / 1000)::double precision)::date AS datum,
|
|
3
|
+
det.locations_id,
|
|
4
|
+
loc.name AS location_name,
|
|
5
|
+
old_1.in_camea_contract,
|
|
6
|
+
loc.lat AS latitude,
|
|
7
|
+
loc.lng AS longitude,
|
|
8
|
+
replace(loc.route::text, ' '::text, ''::text) AS route,
|
|
9
|
+
det.directions_id,
|
|
10
|
+
dir.name AS direction_name,
|
|
11
|
+
CASE
|
|
12
|
+
WHEN (det.directions_id::text IN ( SELECT min(bicyclecounters_detections.directions_id::text) AS min
|
|
13
|
+
FROM bicycle_counters.bicyclecounters_detections
|
|
14
|
+
GROUP BY bicyclecounters_detections.locations_id)) THEN 'Směr 1'::text
|
|
15
|
+
ELSE 'Směr 2'::text
|
|
16
|
+
END AS direction_num,
|
|
17
|
+
CASE
|
|
18
|
+
WHEN sum(det.value) IS NULL THEN 0::bigint
|
|
19
|
+
ELSE sum(det.value)
|
|
20
|
+
END AS detections
|
|
21
|
+
FROM bicycle_counters.bicyclecounters_detections det
|
|
22
|
+
LEFT JOIN bicycle_counters.bicyclecounters_locations loc ON det.locations_id::text = loc.id::text
|
|
23
|
+
LEFT JOIN bicycle_counters.bicyclecounters_directions dir ON det.directions_id::text = dir.id::text
|
|
24
|
+
LEFT JOIN analytic.camea_bikecounters_in_contract old_1 ON loc.vendor_id::text = old_1.location_id::text
|
|
25
|
+
GROUP BY (to_timestamp((det.measured_from / 1000)::double precision)::date), det.locations_id, loc.name, old_1.in_camea_contract, loc.lat, loc.lng, loc.route, det.directions_id, dir.name, (
|
|
26
|
+
CASE
|
|
27
|
+
WHEN (det.directions_id::text IN ( SELECT min(bicyclecounters_detections.directions_id::text) AS min
|
|
28
|
+
FROM bicycle_counters.bicyclecounters_detections
|
|
29
|
+
GROUP BY bicyclecounters_detections.locations_id)) THEN 'Směr 1'::text
|
|
30
|
+
ELSE 'Směr 2'::text
|
|
31
|
+
END);
|
|
32
|
+
|
|
33
|
+
CREATE OR REPLACE VIEW analytic.v_camea_bikecounters_history_table
|
|
34
|
+
AS SELECT t1.datum,
|
|
35
|
+
t1.locations_id,
|
|
36
|
+
t1.location_name,
|
|
37
|
+
t1.route,
|
|
38
|
+
t1.direction_name,
|
|
39
|
+
t1.in_camea_contract,
|
|
40
|
+
t1.dir1det,
|
|
41
|
+
CASE
|
|
42
|
+
WHEN t2.direction_name::text = t1.direction_name::text THEN 'není'::character varying
|
|
43
|
+
ELSE t2.direction_name
|
|
44
|
+
END AS direction2_name,
|
|
45
|
+
t2.dir2det
|
|
46
|
+
FROM ( SELECT to_timestamp((det.measured_from / 1000)::double precision)::date AS datum,
|
|
47
|
+
det.locations_id,
|
|
48
|
+
loc.name AS location_name,
|
|
49
|
+
replace(loc.route::text, ' '::text, ''::text) AS route,
|
|
50
|
+
dir.name AS direction_name,
|
|
51
|
+
old_1.in_camea_contract,
|
|
52
|
+
CASE
|
|
53
|
+
WHEN sum(det.value) IS NULL THEN 0::bigint
|
|
54
|
+
ELSE sum(det.value)
|
|
55
|
+
END AS dir1det
|
|
56
|
+
FROM bicycle_counters.bicyclecounters_detections det
|
|
57
|
+
LEFT JOIN bicyclecounters_locations loc ON det.locations_id::text = loc.id::text
|
|
58
|
+
LEFT JOIN bicyclecounters_directions dir ON det.directions_id::text = dir.id::text
|
|
59
|
+
LEFT JOIN analytic.camea_bikecounters_in_contract old_1 ON loc.vendor_id::text = old_1.location_id::text
|
|
60
|
+
WHERE (det.directions_id::text IN ( SELECT min(bicyclecounters_directions.id::text) AS min
|
|
61
|
+
FROM bicyclecounters_directions
|
|
62
|
+
GROUP BY bicyclecounters_directions.locations_id))
|
|
63
|
+
GROUP BY (to_timestamp((det.measured_from / 1000)::double precision)::date), det.locations_id, loc.name, (replace(loc.route::text, ' '::text, ''::text)), dir.name, old_1.in_camea_contract) t1
|
|
64
|
+
LEFT JOIN ( SELECT to_timestamp((det2.measured_from / 1000)::double precision)::date AS datum,
|
|
65
|
+
det2.locations_id,
|
|
66
|
+
loc.name AS location_name,
|
|
67
|
+
dir.vendor_id AS direction_id,
|
|
68
|
+
dir.name AS direction_name,
|
|
69
|
+
CASE
|
|
70
|
+
WHEN sum(det2.value) IS NULL THEN 0::bigint
|
|
71
|
+
ELSE sum(det2.value)
|
|
72
|
+
END AS dir2det
|
|
73
|
+
FROM bicycle_counters.bicyclecounters_detections det2
|
|
74
|
+
LEFT JOIN bicyclecounters_locations loc ON det2.locations_id::text = loc.id::text
|
|
75
|
+
LEFT JOIN bicyclecounters_directions dir ON det2.directions_id::text = dir.id::text
|
|
76
|
+
WHERE (det2.directions_id::text IN ( SELECT max(bicyclecounters_directions.id::text) AS max
|
|
77
|
+
FROM bicyclecounters_directions
|
|
78
|
+
GROUP BY bicyclecounters_directions.locations_id))
|
|
79
|
+
GROUP BY (to_timestamp((det2.measured_from / 1000)::double precision)::date), det2.locations_id, loc.name, dir.vendor_id, dir.name) t2 ON t1.datum = t2.datum AND t1.locations_id::text = t2.locations_id::text;
|
|
@@ -15,7 +15,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.bicycleCountersRouter = exports.BicycleCountersRouter = void 0;
|
|
18
|
-
const lodash_1 = require("lodash");
|
|
19
18
|
const Geo_1 = require("@golemio/core/dist/output-gateway/Geo");
|
|
20
19
|
const redis_1 = require("@golemio/core/dist/output-gateway/redis");
|
|
21
20
|
const BaseRouter_1 = require("@golemio/core/dist/output-gateway/routes/BaseRouter");
|
|
@@ -33,9 +32,9 @@ class BicycleCountersRouter extends BaseRouter_1.BaseRouter {
|
|
|
33
32
|
const coords = yield (0, Geo_1.parseCoordinates)(req.query.latlng, req.query.range);
|
|
34
33
|
const data = yield this.BicycleCountersLocationsModel.GetAll({
|
|
35
34
|
lat: coords.lat,
|
|
36
|
-
limit: (
|
|
35
|
+
limit: Number(req.query.limit) || undefined,
|
|
37
36
|
lng: coords.lng,
|
|
38
|
-
offset: (
|
|
37
|
+
offset: Number(req.query.offset) || 0,
|
|
39
38
|
range: coords.range,
|
|
40
39
|
});
|
|
41
40
|
res.status(200).send(this.NormalizeLocations(data));
|
|
@@ -60,8 +59,8 @@ class BicycleCountersRouter extends BaseRouter_1.BaseRouter {
|
|
|
60
59
|
id: this.ConvertToArray(req.query.id || []),
|
|
61
60
|
isoDateFrom,
|
|
62
61
|
isoDateTo,
|
|
63
|
-
limit: (
|
|
64
|
-
offset: (
|
|
62
|
+
limit: Number(req.query.limit) || undefined,
|
|
63
|
+
offset: Number(req.query.offset) || 0,
|
|
65
64
|
});
|
|
66
65
|
data.forEach((element) => {
|
|
67
66
|
if (aggregate) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BicycleCountersRouter.js","sourceRoot":"","sources":["../../src/output-gateway/BicycleCountersRouter.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;AAEH
|
|
1
|
+
{"version":3,"file":"BicycleCountersRouter.js","sourceRoot":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|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"dependencies": {
|
|
66
|
-
"lodash": "^4.17.21"
|
|
67
|
-
}
|
|
2
|
+
"name": "@golemio/bicycle-counters",
|
|
3
|
+
"version": "1.0.11-dev.628543612",
|
|
4
|
+
"description": "Golemio Bicycle Counters Module",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "rimraf ./dist && ttsc -p ./tsconfig.build.json",
|
|
9
|
+
"build-minimal": "run-s 'build --sourceMap false --declaration false'",
|
|
10
|
+
"build-watch": "run-s 'build --watch --preserveWatchOutput'",
|
|
11
|
+
"pretest": "golemio mdb reset --postgres && golemio mdb up --postgres && golemio import-db-data --postgres",
|
|
12
|
+
"test": "cross-env NODE_ENV=test TS_NODE_COMPILER='ttypescript' mocha --exit --check-leaks --timeout 120000 -r ts-node/register -r dotenv/config 'test/**/*.test.ts'",
|
|
13
|
+
"test-debug": "run-s 'test --inspect-brk=9230'",
|
|
14
|
+
"code-coverage": "nyc run-s 'test -r source-map-support/register'",
|
|
15
|
+
"generate-docs": "typedoc --out docs/typedoc src",
|
|
16
|
+
"lint": "eslint \"{src,test}/**/*.ts\""
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"golemio"
|
|
20
|
+
],
|
|
21
|
+
"author": "Operator ICT, a.s.",
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "https://gitlab.com/operator-ict/golemio/code/modules/bicycle-counters"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@commitlint/cli": "^11.0.0",
|
|
29
|
+
"@commitlint/config-conventional": "^11.0.0",
|
|
30
|
+
"@golemio/cli": "1.3.1",
|
|
31
|
+
"@golemio/core": "1.2.16",
|
|
32
|
+
"@golemio/db-common": "1.0.1",
|
|
33
|
+
"@golemio/eslint-config": "^1.1.0",
|
|
34
|
+
"@ovos-media/ts-transform-paths": "^1.7.18-1",
|
|
35
|
+
"@types/chai": "4.2.3",
|
|
36
|
+
"@types/chai-as-promised": "7.1.2",
|
|
37
|
+
"@types/mocha": "^8.2.0",
|
|
38
|
+
"@types/node": "^16.11.35",
|
|
39
|
+
"@types/sinon": "^9.0.10",
|
|
40
|
+
"@types/supertest": "^2.0.10",
|
|
41
|
+
"chai": "4.2.0",
|
|
42
|
+
"chai-as-promised": "7.1.1",
|
|
43
|
+
"cross-env": "^7.0.3",
|
|
44
|
+
"dotenv": "^8.2.0",
|
|
45
|
+
"eslint": "^8.1.1",
|
|
46
|
+
"husky": "^4.3.7",
|
|
47
|
+
"mocha": "^8.2.1",
|
|
48
|
+
"npm-run-all": "^4.1.5",
|
|
49
|
+
"nyc": "^15.1.0",
|
|
50
|
+
"prettier": "^2.5.1",
|
|
51
|
+
"pretty-quick": "^3.1.0",
|
|
52
|
+
"rimraf": "^3.0.2",
|
|
53
|
+
"sinon": "^9.2.3",
|
|
54
|
+
"source-map-support": "0.5.9",
|
|
55
|
+
"supertest": "^6.0.1",
|
|
56
|
+
"ts-node": "^10.7.0",
|
|
57
|
+
"ttypescript": "^1.5.13",
|
|
58
|
+
"typedoc": "^0.22.15",
|
|
59
|
+
"typescript": "4.6.4"
|
|
60
|
+
},
|
|
61
|
+
"peerDependencies": {
|
|
62
|
+
"@golemio/core": "^1.1.0"
|
|
63
|
+
},
|
|
64
|
+
"dependencies": {}
|
|
68
65
|
}
|