alsmanager_lib 3.0.43 → 3.0.44
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/lib/modules.js +60 -6
- package/package.json +1 -1
package/lib/modules.js
CHANGED
|
@@ -1225,7 +1225,7 @@ function getVoIPDevices() {
|
|
|
1225
1225
|
// End manage Voip
|
|
1226
1226
|
// Software management
|
|
1227
1227
|
function getSoftwares(db_used, maker, model, platform, licence_type) {
|
|
1228
|
-
var query = "select id, maker, model, support, platform, release_year, version, build_no, licence_type, licence_key, expired_date, is_pnrr, inv_ict3_number, serial_no, architettura ";
|
|
1228
|
+
var query = "select id, maker, model, support, platform, release_year, version, build_no, licence_type, licence_key, expired_date, is_pnrr, inv_ict3_number, serial_no, architettura, life_licence ";
|
|
1229
1229
|
query += "from softwares ";
|
|
1230
1230
|
query += "where (is_removed is null or is_removed = 0) ";
|
|
1231
1231
|
if (maker) {
|
|
@@ -1243,21 +1243,21 @@ function getSoftwares(db_used, maker, model, platform, licence_type) {
|
|
|
1243
1243
|
return query;
|
|
1244
1244
|
}
|
|
1245
1245
|
function getSoftwareByCodice(db_used, codice) {
|
|
1246
|
-
var query = "select id, maker, model, support, platform, release_year, version, build_no, licence_type, licence_key, expired_date, is_pnrr, inv_ict3_number, serial_no, architettura ";
|
|
1246
|
+
var query = "select id, maker, model, support, platform, release_year, version, build_no, licence_type, licence_key, expired_date, is_pnrr, inv_ict3_number, serial_no, architettura, life_licence ";
|
|
1247
1247
|
query += "from softwares ";
|
|
1248
1248
|
query += "where (is_removed is null or is_removed = 0) ";
|
|
1249
1249
|
query += "and inv_ict3_number = '" + codice + "' or serial_no = '" + codice + "'";
|
|
1250
1250
|
return query;
|
|
1251
1251
|
}
|
|
1252
1252
|
function getSoftwareById(db_used, id_sw) {
|
|
1253
|
-
var query = "select id, maker, model, support, platform, release_year, version, build_no, licence_type, licence_key, expired_date, is_pnrr, inv_ict3_number, serial_no, architettura ";
|
|
1253
|
+
var query = "select id, maker, model, support, platform, release_year, version, build_no, licence_type, licence_key, expired_date, is_pnrr, inv_ict3_number, serial_no, architettura, life_licence ";
|
|
1254
1254
|
query += "from softwares ";
|
|
1255
1255
|
query += "where (is_removed is null or is_removed = 0) ";
|
|
1256
1256
|
query += "and id = " + id_sw;
|
|
1257
1257
|
return query;
|
|
1258
1258
|
}
|
|
1259
1259
|
function getSoftwareForConsegnaById(db_used, id_sw) {
|
|
1260
|
-
var query = "select id, maker, model, support, platform, release_year, version, build_no, licence_type, licence_key, expired_date, is_pnrr, inv_ict3_number, serial_no, architettura, ";
|
|
1260
|
+
var query = "select id, maker, model, support, platform, release_year, version, build_no, licence_type, licence_key, expired_date, is_pnrr, inv_ict3_number, serial_no, architettura, life_licence, ";
|
|
1261
1261
|
query += "case ";
|
|
1262
1262
|
query += "when s.no_inventario is not null and s.no_inventario > 0 then concat(s.id,'(ID)') ";
|
|
1263
1263
|
query += "when s.inv_ict3_number != '' and s.inv_ict3_number is not null then s.inv_ict3_number ";
|
|
@@ -1283,7 +1283,8 @@ function insertSoftware(db_used, software) {
|
|
|
1283
1283
|
query += software.is_pnrr + ", ";
|
|
1284
1284
|
query += "'" + software.inventario + "', ";
|
|
1285
1285
|
query += "'" + software.serial_no + "', ";
|
|
1286
|
-
query += "'" + software.architettura + "' ";
|
|
1286
|
+
query += "'" + software.architettura + "', ";
|
|
1287
|
+
query += software.life_licence + " ";
|
|
1287
1288
|
query += ")";
|
|
1288
1289
|
return query;
|
|
1289
1290
|
}
|
|
@@ -1303,7 +1304,8 @@ function updateSoftware(db_used, id_sw, software) {
|
|
|
1303
1304
|
query += "is_pnrr = " + software.is_pnrr + ", ";
|
|
1304
1305
|
query += "inv_ict3_number = '" + software.inventario + "', ";
|
|
1305
1306
|
query += "serial_no = '" + software.serial_no + "', ";
|
|
1306
|
-
query += "architettura = '" + software.architettura + "' ";
|
|
1307
|
+
query += "architettura = '" + software.architettura + "', ";
|
|
1308
|
+
query += "life_licence = " + software.life_licence + " ";
|
|
1307
1309
|
query += "where id = " + id_sw;
|
|
1308
1310
|
return query;
|
|
1309
1311
|
}
|
|
@@ -1388,6 +1390,31 @@ function removeUtentePerDevice(id_dev_user) {
|
|
|
1388
1390
|
}
|
|
1389
1391
|
|
|
1390
1392
|
// End Anagrafica utenti
|
|
1393
|
+
//Anagrafica docenti
|
|
1394
|
+
function getDocentiCombo(db_used, id_place, ordine_scuola, ruolo) {
|
|
1395
|
+
var query = "select id, concat(cognome, ' ', nome, ' - ', ordine, ' - ', ruolo) as nominativo from anagrafica_docenti ";
|
|
1396
|
+
query += "where is_attivo = 1 "
|
|
1397
|
+
if (ordine_scuola && ordine_scuola.trim() != '') {
|
|
1398
|
+
query += "and ordine = '" + ordine + "' ";
|
|
1399
|
+
}
|
|
1400
|
+
if (id_place && id_place.trim() != '') {
|
|
1401
|
+
query += "and id_place = '" + id_place + "' ";
|
|
1402
|
+
}
|
|
1403
|
+
if (ruolo && ruolo.trim() != '') {
|
|
1404
|
+
query += "and ruolo = '" + ruolo + "' ";
|
|
1405
|
+
}
|
|
1406
|
+
query += "order by cognome, nome";
|
|
1407
|
+
return query;
|
|
1408
|
+
}
|
|
1409
|
+
|
|
1410
|
+
function getDocenteById(db_used, id_docente) {
|
|
1411
|
+
var query = "select id, cognome, nome, email, id_place, ordine, ruolo, is_attivo from anagrafica_docenti ";
|
|
1412
|
+
query += "where id = " + id_docente;
|
|
1413
|
+
return query;
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
|
|
1417
|
+
// End Anagrafica docenti
|
|
1391
1418
|
// Device configurations
|
|
1392
1419
|
function getDeviceConfigurationsSQLite(id_device) {
|
|
1393
1420
|
var query = "select id, date_conf, note from device_changes ";
|
|
@@ -6854,6 +6881,27 @@ function queryConsegnaById(db_used,id_consegna) {
|
|
|
6854
6881
|
return query;
|
|
6855
6882
|
}
|
|
6856
6883
|
|
|
6884
|
+
//Creazione email sollecito consegna
|
|
6885
|
+
function createConsegnaMessage(consegna, listBeni, data_limite) {
|
|
6886
|
+
var msgObj = {};
|
|
6887
|
+
if (consegna) {
|
|
6888
|
+
msgObj.email_to = consegna.email_adulto;
|
|
6889
|
+
msgObj.subject = "Rif. consegna: " + consegna.id + " del " + consegna.data_consegna;
|
|
6890
|
+
msgObj.message = "Gentile/Egregio " + consegna.richiedente_adulto + "\n";
|
|
6891
|
+
msgObj.message += "\n\nSi ricorda di effettuare entro la data " + data_limite + " la consegna dei seguenti beni : \n\n";
|
|
6892
|
+
listBeni.forEach(element => {
|
|
6893
|
+
msgObj.message += "n. " + element.numero + " - " + element.tipo + " - " + element.marca + " - " + element.modello + " - Cod. " + element.codice + "\n";
|
|
6894
|
+
});
|
|
6895
|
+
msgObj.message += "\n\nSi richiede che la consegna venga effettuata ad un tecnico dell'Istituto per le verifiche del caso.\n";
|
|
6896
|
+
msgObj.message += "Se per eventuali esigenze fosse necessario prolungare l'utilizzo del bene, si prega di contattare l'Ufficio Tecnico.\n ";
|
|
6897
|
+
msgObj.message += "Cordiali saluti \n\n I tecnici dell'I.C. Trento 3";
|
|
6898
|
+
}
|
|
6899
|
+
return msgObj;
|
|
6900
|
+
}
|
|
6901
|
+
|
|
6902
|
+
|
|
6903
|
+
//End Creazione email sollecito consegna
|
|
6904
|
+
|
|
6857
6905
|
|
|
6858
6906
|
// Beni in consegna
|
|
6859
6907
|
function queryConsegneByIdDeviceSQLite(id_device) {
|
|
@@ -12424,6 +12472,8 @@ function createIstruzioniStandard(user, pwd, email, id_consegna, data_cons) {
|
|
|
12424
12472
|
return dd;
|
|
12425
12473
|
}
|
|
12426
12474
|
|
|
12475
|
+
|
|
12476
|
+
|
|
12427
12477
|
// Export DB
|
|
12428
12478
|
|
|
12429
12479
|
function exportDBSQLSQLite(db_path, dump_path, dump_filename) {
|
|
@@ -14073,6 +14123,9 @@ module.exports = {
|
|
|
14073
14123
|
updateUtentePerDevice,
|
|
14074
14124
|
removeUtentePerDevice,
|
|
14075
14125
|
//
|
|
14126
|
+
getDocentiCombo,
|
|
14127
|
+
getDocenteById,
|
|
14128
|
+
//
|
|
14076
14129
|
getDeviceConfigurations,
|
|
14077
14130
|
getLastDeviceConfiguration,
|
|
14078
14131
|
getDeviceConfigurationById,
|
|
@@ -14167,6 +14220,7 @@ module.exports = {
|
|
|
14167
14220
|
getLastGestioneDeviceByIdDevice,
|
|
14168
14221
|
queryConsegne,
|
|
14169
14222
|
queryConsegnaById,
|
|
14223
|
+
createConsegnaMessage,
|
|
14170
14224
|
createConsegnaMySQLObj,
|
|
14171
14225
|
insertConsegna,
|
|
14172
14226
|
updateConsegna,
|