update Mi 10. Jun 09:31:01 CEST 2020
This commit is contained in:
parent
4d6659e208
commit
91bb2dd99d
@ -155,6 +155,7 @@ module.exports = function (db, uuidv4, app_cfg) {
|
|||||||
delete einsatzdaten.em_weitere;
|
delete einsatzdaten.em_weitere;
|
||||||
var uuid_einsatzdaten = uuidv5(JSON.stringify(einsatzdaten), custom_namespace);
|
var uuid_einsatzdaten = uuidv5(JSON.stringify(einsatzdaten), custom_namespace);
|
||||||
|
|
||||||
|
// wenn keine row, dann insert
|
||||||
|
|
||||||
db.get('select * from waip_history where waip_id like ? and socket_id like ?', [waip_id, socket_id], function (err, row) {
|
db.get('select * from waip_history where waip_id like ? and socket_id like ?', [waip_id, socket_id], function (err, row) {
|
||||||
if (err == null && row) {
|
if (err == null && row) {
|
||||||
@ -806,24 +807,15 @@ module.exports = function (db, uuidv4, app_cfg) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function db_vmtl_get_list(waip_id, callback) {
|
function db_vmtl_get_list(waip_id, callback) {
|
||||||
// FIXME eee
|
|
||||||
|
|
||||||
|
|
||||||
db.run(`CREATE TABLE waip_vmtl (
|
|
||||||
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,
|
|
||||||
waip_wachen_id INTEGER,
|
|
||||||
vmtl_typ TEXT,
|
|
||||||
vmlt_account_name TEXT,
|
|
||||||
vmlt_account_list TEXT,
|
|
||||||
bkp_recipient TEXT,
|
|
||||||
FOREIGN KEY(waip_wachen_id) REFERENCES waip_wachen(id))`);
|
|
||||||
// Log erstellen
|
|
||||||
|
|
||||||
// Pruefen ob fuer eine Wache im Einsatz ein Verteilerliste hinterlegt ist
|
// Pruefen ob fuer eine Wache im Einsatz ein Verteilerliste hinterlegt ist
|
||||||
db.get(`select t.waip_wachen_id, t.vmlt_typ, t.vmtl_account_name, t.vmtl_account_list from waip_vmtl t
|
db.get(`select v.waip_wachen_id, v.vmlt_typ, v.vmtl_account_name, v.vmtl_account_list from waip_vmtl v
|
||||||
where waip_wachen_id = (select distinct w.id wachen_id from waip_wachen w left join waip_einsatzmittel em on em.wachenname = w.name_wache
|
where v.waip_wachen_id = (select distinct w.id wachen_id from waip_wachen w left join waip_einsatzmittel em on em.wachenname = w.name_wache
|
||||||
where em.waip_einsaetze_ID = ?)`, [waip_id], function (err, liste) {
|
where em.waip_einsaetze_ID = ?)`, [waip_id], function (err, liste) {
|
||||||
if (err == null && liste) {
|
if (err == null && liste) {
|
||||||
|
|
||||||
|
// FIXME eee
|
||||||
|
v.waip_wachen_id, v.vmlt_typ, v.vmtl_account_name, v.vmtl_account_list
|
||||||
|
|
||||||
// Falls Liste für Wache hinterlegt, je nach Typ de
|
// Falls Liste für Wache hinterlegt, je nach Typ de
|
||||||
// Falls Account und Liste hinterlegt sind, die Account-Zugangsdaten, Einsatz-UUID, Einsatzart und Wachenname auslesen
|
// Falls Account und Liste hinterlegt sind, die Account-Zugangsdaten, Einsatz-UUID, Einsatzart und Wachenname auslesen
|
||||||
db.get(`select tw.tw_screen_name, tw_consumer_key, tw.tw_consumer_secret, tw.tw_access_token_key, tw.tw_access_token_secret, we.uuid, we.einsatzart, wa.name_wache
|
db.get(`select tw.tw_screen_name, tw_consumer_key, tw.tw_consumer_secret, tw.tw_access_token_key, tw.tw_access_token_secret, we.uuid, we.einsatzart, wa.name_wache
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user