update Di 16. Jun 14:01:02 CEST 2020

This commit is contained in:
Robert Richter 2020-06-16 14:01:02 +02:00
parent 88a8f5d9a9
commit d74e85246e
2 changed files with 10 additions and 3 deletions

View File

@ -68,8 +68,13 @@ module.exports = function (app_cfg, sql, waip, uuidv4, io, remote_api) {
function save_new_rmld(data, remote_addr, app_id, callback) { function save_new_rmld(data, remote_addr, app_id, callback) {
validate_rmld(data, function (valid) { validate_rmld(data, function (valid) {
if (valid) { if (valid) {
console.log('hier');
// Rueckmeldung speichern und verteilen // Rueckmeldung speichern und verteilen
sql.db_rmld_save(data, function (result) { sql.db_rmld_save(data, function (result) {
console.log('hier auch');
console.log(result);
if (result) { if (result) {
sql.db_log('RMLD', 'Rückmeldung von ' + remote_addr + ' erhalten und gespeichert: ' + JSON.stringify(data)); sql.db_log('RMLD', 'Rückmeldung von ' + remote_addr + ' erhalten und gespeichert: ' + JSON.stringify(data));
waip.rmld_verteilen_by_uuid(data.waip_uuid, data.rmld_uuid); waip.rmld_verteilen_by_uuid(data.waip_uuid, data.rmld_uuid);

View File

@ -682,11 +682,13 @@ module.exports = function (db, app_cfg) {
reuckmeldung.wache_id = responseobj.wachenauswahl; reuckmeldung.wache_id = responseobj.wachenauswahl;
} else { } else {
reuckmeldung.wache_id = null; reuckmeldung.wache_id = null;
}; };
console.log(rueckmeldung);
// Rueckmeldung der Wache zuordnen // Rueckmeldung der Wache zuordnen
db.get(`select name_wache, nr_wache from waip_wachen where id = ?;`, [reuckmeldung.wache_id], function (err, row) { db.get(`select name_wache, nr_wache from waip_wachen where id = ?;`, [reuckmeldung.wache_id], function (err, row) {
console.log(err);
console.log(row);
console.log(reuckmeldung);
if (err == null && row) { if (err == null && row) {
reuckmeldung.wache_name = row.name_wache; reuckmeldung.wache_name = row.name_wache;
reuckmeldung.wache_nr = row.nr_wache; reuckmeldung.wache_nr = row.nr_wache;