alsmanager_lib 3.0.49 → 3.0.51
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 +28 -13
- package/package.json +1 -1
package/lib/modules.js
CHANGED
|
@@ -6882,20 +6882,34 @@ function queryConsegnaById(db_used,id_consegna) {
|
|
|
6882
6882
|
}
|
|
6883
6883
|
|
|
6884
6884
|
//Creazione email sollecito consegna
|
|
6885
|
-
function
|
|
6885
|
+
function getDatiConsegneAttive() {
|
|
6886
|
+
var query = "select c.richiedente_adulto as Nominativo, c.email_adulto as Email, concat('Consegna n.', c.id, ' del ', STRFTIME('%d/%m/%Y', c.data_consegna)) as Consegna, ";
|
|
6887
|
+
query += "case ";
|
|
6888
|
+
query += "when d.id is not null and d.inv_ict3_number is not null and trim(d.inv_ict3_number) <> '' then concat(d.manifacturer, ' - ', d.model, ' - Inv.', d.inv_ict3_number) ";
|
|
6889
|
+
query += "when d.id is not null and d.serial_no is not null and trim(d.serial_no) <> '' then concat(d.manifacturer, ' - ', d.model, ' - S/N:', d.serial_no) ";
|
|
6890
|
+
query += "when s.id is not null and s.inv_ict3_number is not null and trim(s.inv_ict3_number) <> '' then concat(s.maker, ' - ', s.model, ' - Inv.', s.inv_ict3_number) ";
|
|
6891
|
+
query += "when s.id is not null and s.serial_no is not null and trim(s.serial_no) <> '' then concat(s.maker, ' - ', s.model, ' - S/N:', s.serial_no) ";
|
|
6892
|
+
query += "else '' ";
|
|
6893
|
+
query += "end as bene_consegnato ";
|
|
6894
|
+
query += "from consegna_beni cb ";
|
|
6895
|
+
query += "join consegne c on c.id = cb.id_consegna ";
|
|
6896
|
+
query += "left join devices d on cb.id_bene = d.id ";
|
|
6897
|
+
query += "left join softwares s on cb.id_bene = s.id ";
|
|
6898
|
+
query += "where cb.stato_restituzione = 0 ";
|
|
6899
|
+
return query;
|
|
6900
|
+
}
|
|
6901
|
+
|
|
6902
|
+
|
|
6903
|
+
function createConsegnaMessage(nominativo, email, rif_consegna, bene) {
|
|
6886
6904
|
var msgObj = {};
|
|
6887
|
-
|
|
6888
|
-
|
|
6889
|
-
|
|
6890
|
-
|
|
6891
|
-
|
|
6892
|
-
|
|
6893
|
-
|
|
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
|
-
}
|
|
6905
|
+
msgObj.email_to = email;
|
|
6906
|
+
msgObj.subject = rif_consegna;
|
|
6907
|
+
msgObj.message = "Gentile/Egregio ins." + nominativo + "\n";
|
|
6908
|
+
msgObj.message += "\n\nSi ricorda di effettuare entro la data " + data_limite + " la consegna dei seguenti beni : \n\n";
|
|
6909
|
+
msgObj.message += "n. 1 " + bene + "\n";
|
|
6910
|
+
msgObj.message += "\n\nSi richiede che la consegna venga effettuata ad un tecnico dell'Istituto per le verifiche del caso.\n";
|
|
6911
|
+
msgObj.message += "Se per eventuali esigenze fosse necessario prolungare l'utilizzo del bene, si prega di contattare l'Ufficio Tecnico.\n ";
|
|
6912
|
+
msgObj.message += "Cordiali saluti \n\n I tecnici dell'I.C. Trento 3";
|
|
6899
6913
|
return msgObj;
|
|
6900
6914
|
}
|
|
6901
6915
|
|
|
@@ -14252,6 +14266,7 @@ module.exports = {
|
|
|
14252
14266
|
getLastGestioneDeviceByIdDevice,
|
|
14253
14267
|
queryConsegne,
|
|
14254
14268
|
queryConsegnaById,
|
|
14269
|
+
getDatiConsegneAttive,
|
|
14255
14270
|
createConsegnaMessage,
|
|
14256
14271
|
createConsegnaMySQLObj,
|
|
14257
14272
|
insertConsegna,
|