update Mi 17. Jun 20:31:01 CEST 2020

This commit is contained in:
Robert Richter 2020-06-17 20:31:01 +02:00
parent 488a2ef6af
commit 45a95cee38
2 changed files with 24 additions and 26 deletions

View File

@ -161,26 +161,26 @@ module.exports = function (fs, bcrypt, app_cfg) {
nr_wache, nr_traeger, nr_kreis, name_wache, name_traeger, name_kreis, wgs84_x, wgs84_y) nr_wache, nr_traeger, nr_kreis, name_wache, name_traeger, name_kreis, wgs84_x, wgs84_y)
VALUES VALUES
(0,\'0\',0,\'Global - Alle Einsätze\',\'Global\',\'Global\',\'0\',\'0\'), (0,\'0\',0,\'Global - Alle Einsätze\',\'Global\',\'Global\',\'0\',\'0\'),
(520101,\'01\',52,\'CB FW Cottbus 1\',\'Stadt Cottbus\',\'Stadt Cottbus\',\'51.7329037496\',\'14.3377829699\'), (520101,\'01\',52,\'CB FW Cottbus 1\',\'Stadt Cottbus - Berufsfeuerwehr\',\'Stadt Cottbus\',\'51.7329037496\',\'14.3377829699\'),
(520201,\'02\',52,\'CB FW Cottbus 2\',\'Stadt Cottbus\',\'Stadt Cottbus\',\'51.7654389234\',\'14.3352138763\'), (520201,\'02\',52,\'CB FW Cottbus 2\',\'Stadt Cottbus - Berufsfeuerwehr\',\'Stadt Cottbus\',\'51.7654389234\',\'14.3352138763\'),
(520301,\'03\',52,\'CB FW Cottbus 3\',\'Stadt Cottbus\',\'Stadt Cottbus\',\'51.743946\',\'14.320619\'), (520301,\'03\',52,\'CB FW Cottbus 3\',\'Stadt Cottbus - Berufsfeuerwehr\',\'Stadt Cottbus\',\'51.743946\',\'14.320619\'),
(521101,\'11\',52,\'CB FW Branitz\',\'Stadt Cottbus\',\'Stadt Cottbus\',\'51.7363607074\',\'14.3673504518\'), (521101,\'11\',52,\'CB FW Branitz\',\'Stadt Cottbus\',\'Stadt Cottbus - Löschbezirk 1\',\'51.7363607074\',\'14.3673504518\'),
(521102,\'11\',52,\'CB FW Dissenchen\',\'Stadt Cottbus\',\'Stadt Cottbus\',\'51.7628368787\',\'14.3925021325\'), (521102,\'11\',52,\'CB FW Dissenchen\',\'Stadt Cottbus\',\'Stadt Cottbus - Löschbezirk 1\',\'51.7628368787\',\'14.3925021325\'),
(521103,\'11\',52,\'CB FW Kahren\',\'Stadt Cottbus\',\'Stadt Cottbus\',\'51.7226384039\',\'14.409874149\'), (521103,\'11\',52,\'CB FW Kahren\',\'Stadt Cottbus\',\'Stadt Cottbus - Löschbezirk 1\',\'51.7226384039\',\'14.409874149\'),
(521104,\'11\',52,\'CB FW Kiekebusch\',\'Stadt Cottbus\',\'Stadt Cottbus\',\'51.7241108468\',\'14.3624851518\'), (521104,\'11\',52,\'CB FW Kiekebusch\',\'Stadt Cottbus\',\'Stadt Cottbus - Löschbezirk 1\',\'51.7241108468\',\'14.3624851518\'),
(521201,\'12\',52,\'CB FW Merzdorf\',\'Stadt Cottbus\',\'Stadt Cottbus\',\'51.7791567132\',\'14.3860451556\'), (521201,\'12\',52,\'CB FW Merzdorf\',\'Stadt Cottbus\',\'Stadt Cottbus - Löschbezirk 2\',\'51.7791567132\',\'14.3860451556\'),
(521202,\'12\',52,\'CB FW Sandow\',\'Stadt Cottbus\',\'Stadt Cottbus\',\'51.7656727968\',\'14.3352466545\'), (521202,\'12\',52,\'CB FW Sandow\',\'Stadt Cottbus\',\'Stadt Cottbus - Löschbezirk 2\',\'51.7656727968\',\'14.3352466545\'),
(521203,\'12\',52,\'CB FW Saspow\',\'Stadt Cottbus\',\'Stadt Cottbus\',\'51.7887535908\',\'14.356240843\'), (521203,\'12\',52,\'CB FW Saspow\',\'Stadt Cottbus\',\'Stadt Cottbus - Löschbezirk 2\',\'51.7887535908\',\'14.356240843\'),
(521204,\'12\',52,\'CB FW Willmersdorf\',\'Stadt Cottbus\',\'Stadt Cottbus\',\'51.8057039156\',\'14.3803709656\'), (521204,\'12\',52,\'CB FW Willmersdorf\',\'Stadt Cottbus\',\'Stadt Cottbus - Löschbezirk 2\',\'51.8057039156\',\'14.3803709656\'),
(521301,\'13\',52,\'CB FW Döbbrick\',\'Stadt Cottbus\',\'Stadt Cottbus\',\'51.8173690763\',\'14.3421287282\'), (521301,\'13\',52,\'CB FW Döbbrick\',\'Stadt Cottbus - Löschbezirk 3\',\'Stadt Cottbus\',\'51.8173690763\',\'14.3421287282\'),
(521302,\'13\',52,\'CB FW Schmellwitz\',\'Stadt Cottbus\',\'Stadt Cottbus\',\'51.784034245\',\'14.3351144771\'), (521302,\'13\',52,\'CB FW Schmellwitz\',\'Stadt Cottbus - Löschbezirk 3\',\'Stadt Cottbus\',\'51.784034245\',\'14.3351144771\'),
(521303,\'13\',52,\'CB FW Sielow\',\'Stadt Cottbus\',\'Stadt Cottbus\',\'51.7994083121\',\'14.3041128045\'), (521303,\'13\',52,\'CB FW Sielow\',\'Stadt Cottbus - Löschbezirk 3\',\'Stadt Cottbus\',\'51.7994083121\',\'14.3041128045\'),
(521304,\'13\',52,\'CB FW Ströbitz\',\'Stadt Cottbus\',\'Stadt Cottbus\',\'51.754401066\',\'14.3010033167\'), (521304,\'13\',52,\'CB FW Ströbitz\',\'Stadt Cottbus - Löschbezirk 3\',\'Stadt Cottbus\',\'51.754401066\',\'14.3010033167\'),
(521401,\'14\',52,\'CB FW Gallinchen\',\'Stadt Cottbus\',\'Stadt Cottbus\',\'51.710035337\',\'14.3533658895\'), (521401,\'14\',52,\'CB FW Gallinchen\',\'Stadt Cottbus - Löschbezirk 4\',\'Stadt Cottbus\',\'51.710035337\',\'14.3533658895\'),
(521402,\'14\',52,\'CB FW Groß Gaglow\',\'Stadt Cottbus\',\'Stadt Cottbus\',\'51.7125349362\',\'14.3200961957\'), (521402,\'14\',52,\'CB FW Groß Gaglow\',\'Stadt Cottbus - Löschbezirk 4\',\'Stadt Cottbus\',\'51.7125349362\',\'14.3200961957\'),
(521403,\'14\',52,\'CB FW Madlow\',\'Stadt Cottbus\',\'Stadt Cottbus\',\'51.7204777791\',\'14.3457788456\'), (521403,\'14\',52,\'CB FW Madlow\',\'Stadt Cottbus - Löschbezirk 4\',\'Stadt Cottbus\',\'51.7204777791\',\'14.3457788456\'),
(521404,\'14\',52,\'CB FW Sachsendorf\',\'Stadt Cottbus\',\'Stadt Cottbus\',\'51.7328922537\',\'14.3192552006\'), (521404,\'14\',52,\'CB FW Sachsendorf\',\'Stadt Cottbus - Löschbezirk 4\',\'Stadt Cottbus\',\'51.7328922537\',\'14.3192552006\'),
(521501,\'15\',52,\'CB FW Gerätehaus Süd\',\'Stadt Cottbus\',\'Stadt Cottbus\',\'51.718385\',\'14.337278\'), (521501,\'15\',52,\'CB FW Gerätehaus Süd\',\'Stadt Cottbus - Gerätehäuser\',\'Stadt Cottbus\',\'51.718385\',\'14.337278\'),
(610101,\'01\',61,\'LDS FW Lübben\',\'Stadt Lübben\',\'Landkreis Dahme-Spreewald\',\'51.9430718379\',\'13.8955064944\'), (610101,\'01\',61,\'LDS FW Lübben\',\'Stadt Lübben\',\'Landkreis Dahme-Spreewald\',\'51.9430718379\',\'13.8955064944\'),
(610102,\'01\',61,\'LDS FW Lubolz\',\'Stadt Lübben\',\'Landkreis Dahme-Spreewald\',\'51.9631954482\',\'13.8277078818\'), (610102,\'01\',61,\'LDS FW Lubolz\',\'Stadt Lübben\',\'Landkreis Dahme-Spreewald\',\'51.9631954482\',\'13.8277078818\'),
(610104,\'01\',61,\'LDS FW Neuendorf (Lübben)\',\'Stadt Lübben\',\'Landkreis Dahme-Spreewald\',\'51.9080633268\',\'13.8557762577\'), (610104,\'01\',61,\'LDS FW Neuendorf (Lübben)\',\'Stadt Lübben\',\'Landkreis Dahme-Spreewald\',\'51.9080633268\',\'13.8557762577\'),

View File

@ -10,6 +10,7 @@ module.exports = function (db, app_cfg) {
function db_einsatz_speichern(content, callback) { function db_einsatz_speichern(content, callback) {
// Einsatzdaten verarbeiten // Einsatzdaten verarbeiten
console.log(content.ortsdaten.wgs84_area);
db.run(`INSERT OR REPLACE INTO waip_einsaetze ( db.run(`INSERT OR REPLACE INTO waip_einsaetze (
id, uuid, einsatznummer, alarmzeit, einsatzart, stichwort, sondersignal, besonderheiten, ort, ortsteil, strasse, objekt, objektnr, objektart, wachenfolge, wgs84_x, wgs84_y, wgs84_area) id, uuid, einsatznummer, alarmzeit, einsatzart, stichwort, sondersignal, besonderheiten, ort, ortsteil, strasse, objekt, objektnr, objektart, wachenfolge, wgs84_x, wgs84_y, wgs84_area)
VALUES ( VALUES (
@ -340,9 +341,9 @@ module.exports = function (db, app_cfg) {
}; };
function db_wache_get_all(callback) { function db_wache_get_all(callback) {
db.all(`select 'wache' typ, nr_wache nr, name_wache name from waip_wachen db.all(`select 'wache' typ, nr_wache nr, name_wache name from waip_wachen where nr_wache is not '0'
union all union all
select 'traeger' typ, nr_kreis || nr_traeger nr, name_traeger name from waip_wachen group by name_traeger select 'traeger' typ, nr_kreis || nr_traeger nr, name_traeger name from waip_wachen where nr_kreis is not '0' group by nr_traeger
union all union all
select 'kreis' typ, nr_kreis nr, name_kreis name from waip_wachen group by name_kreis select 'kreis' typ, nr_kreis nr, name_kreis name from waip_wachen group by name_kreis
order by typ, name`, function (err, rows) { order by typ, name`, function (err, rows) {
@ -505,11 +506,8 @@ module.exports = function (db, app_cfg) {
if (typ.match(debug_regex)) { if (typ.match(debug_regex)) {
do_log = app_cfg.global.development; do_log = app_cfg.global.development;
} else { } else {
do_log = app_cfg.global.development; do_log = true;
}; };
console.log(typ);
console.log();
// Log-Eintrag schreiben // Log-Eintrag schreiben
if (do_log) { if (do_log) {
db.run(`INSERT INTO waip_log (log_typ, log_text) db.run(`INSERT INTO waip_log (log_typ, log_text)