update Mi 17. Jun 13:01:01 CEST 2020

This commit is contained in:
Robert Richter 2020-06-17 13:01:01 +02:00
parent 5c76906b02
commit c4c6bfea5d

View File

@ -843,15 +843,11 @@ module.exports = function (db, app_cfg) {
}); });
}; };
function db_vmtl_check_history(data, callback) { function db_vmtl_check_history(vmtl_data, list_data, callback) {
// falls Liste für Wache hinterlegt, dann hier die Twitter-Account-Daten, Einsatz-UUID, Einsatzart und Wachenname auslesen // pruefen obe für diesen Liste bereits eine Alarmierung erfolgte
var uuid_vmlt_history = uuidv5(vmtl_data.uuid + vmtl_data.einsatzart + vmtl_data.stichwort + vmtl_data.name_wache + vmtl_data.list, custom_namespace);
var uuid_vmlt_history = uuidv5(data.uuid + data.einsatzart + data.stichwort + data.name_wache + data.list, custom_namespace); db.get('select vmtl_history from waip_vmtl where vmtl_history like ?', [uuid_vmlt_history], function (err, row) {
// Abfrage bring eine Zeile? -> Alarmierung bereits erfolgt
// Abfrage ob zu Socket und Waip-ID bereits History-Daten hinterlegt sind
db.get('select vmtl_history from waip_vmtl where vmtl_history like ?', [uuid_vmlt_history], function (err, row) {
// uuid_einsatz_grunddaten, uuid_em_alarmiert, uuid_em_weitere
if (err == null && row) { if (err == null && row) {
// Liste wurde bereits zu diesem Einsatz beschickt // Liste wurde bereits zu diesem Einsatz beschickt
callback && callback(true); callback && callback(true);
@ -860,13 +856,14 @@ db.get('select vmtl_history from waip_vmtl where vmtl_history like ?', [uuid_vml
db.run(`UPDATE waip_vmtl db.run(`UPDATE waip_vmtl
SET SET
vmtl_history=\'` + uuid_vmlt_history + `\' vmtl_history=\'` + uuid_vmlt_history + `\'
WHERE waip_wachenname like \'` + socket_id + `\' WHERE waip_wachenname like \'` + list_data.waip_wachenname + `\'
AND vmtl_typ AND vmtl_typ like \'` + list_data.vmtl_typ + `\'
AND vmtl_account_name AND vmtl_account_name like \'` + list_data.vmtl_account_name + `\'
AND vmtl_account_group`); AND vmtl_account_group like \'` + list_data.vmtl_account_group + `\'`);
// callback History = false // Liste wurde noch nicht zu diesem Einsatz beschickt
callback && callback(false); callback && callback(false);
}; };
});
}; };
function db_export_get_for_rmld(arry_wachen, callback) { function db_export_get_for_rmld(arry_wachen, callback) {