alsmanager_lib 3.0.38 → 3.0.40
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 +19 -6
- package/package.json +1 -1
package/lib/modules.js
CHANGED
|
@@ -1256,6 +1256,18 @@ function getSoftwareById(db_used, id_sw) {
|
|
|
1256
1256
|
query += "and id = " + id_sw;
|
|
1257
1257
|
return query;
|
|
1258
1258
|
}
|
|
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, ";
|
|
1261
|
+
query += "case ";
|
|
1262
|
+
query += "when s.no_inventario is not null and s.no_inventario > 0 then concat(s.id,'(ID)') ";
|
|
1263
|
+
query += "when s.inv_ict3_number != '' and s.inv_ict3_number is not null then s.inv_ict3_number ";
|
|
1264
|
+
query += "when s.serial_no != '' and s.serial_no is not null then concat(s.serial_no,'(S/N)') ";
|
|
1265
|
+
query += "end as Codice ";
|
|
1266
|
+
query += "from softwares s ";
|
|
1267
|
+
query += "where (is_removed is null or is_removed = 0) ";
|
|
1268
|
+
query += "and id = " + id_sw;
|
|
1269
|
+
return query;
|
|
1270
|
+
}
|
|
1259
1271
|
function insertSoftware(db_used, software) {
|
|
1260
1272
|
var query = "insert into softwares (maker, model, support, platform, release_year, version, build_no, licence_type, licence_key, expired_date, is_pnrr, inv_ict3_number, serial_no, architettura) values (";
|
|
1261
1273
|
query += "'" + software.marca + "', ";
|
|
@@ -7806,9 +7818,9 @@ function selectBeniPerConsegnaSQLite(id_consegna) {
|
|
|
7806
7818
|
//
|
|
7807
7819
|
query += "end as Codice, ";
|
|
7808
7820
|
query += "case ";
|
|
7809
|
-
query += "when cb.tipo_bene = 'DEVICE' and trim(d.inv_pnrr_number)
|
|
7810
|
-
query += "when cb.tipo_bene = '
|
|
7811
|
-
query += "else '
|
|
7821
|
+
query += "when cb.tipo_bene = 'DEVICE' and d.inv_pnrr_number is not null and trim(d.inv_pnrr_number) <> '' then 'SI' ";
|
|
7822
|
+
query += "when cb.tipo_bene = 'SOFTWARE' and s.is_pnrr is not null and s.is_pnrr = 0 then 'SI' ";
|
|
7823
|
+
query += "else 'NO' ";
|
|
7812
7824
|
query += "end as PNRR, cb.note_consegna as Note_cons ";
|
|
7813
7825
|
query += "from consegna_beni cb ";
|
|
7814
7826
|
query += "left join devices d on cb.id_bene = d.id ";
|
|
@@ -7830,9 +7842,9 @@ function selectBeniPerConsegnaMySQL(id_consegna) {
|
|
|
7830
7842
|
query += "when d.serial_no != '' and d.serial_no is not null then concat(d.serial_no,'(S/N)') ";
|
|
7831
7843
|
query += "end as Codice, ";
|
|
7832
7844
|
query += "case ";
|
|
7833
|
-
query += "when trim(d.inv_pnrr_number)
|
|
7834
|
-
query += "when
|
|
7835
|
-
query += "else '
|
|
7845
|
+
query += "when cb.tipo_bene = 'DEVICE' and d.inv_pnrr_number is not null and trim(d.inv_pnrr_number) <> '' then 'SI' ";
|
|
7846
|
+
query += "when cb.tipo_bene = 'SOFTWARE' and s.is_pnrr is not null and s.is_pnrr = 0 then 'SI' ";
|
|
7847
|
+
query += "else 'NO' ";
|
|
7836
7848
|
query += "end as PNRR, dc.note as Note_cons ";
|
|
7837
7849
|
query += " from devices d";
|
|
7838
7850
|
query += " left join device_consegne dc on dc.id_device = d.id";
|
|
@@ -14025,6 +14037,7 @@ module.exports = {
|
|
|
14025
14037
|
getSoftwares,
|
|
14026
14038
|
getSoftwareByCodice,
|
|
14027
14039
|
getSoftwareById,
|
|
14040
|
+
getSoftwareForConsegnaById,
|
|
14028
14041
|
insertSoftware,
|
|
14029
14042
|
updateSoftware,
|
|
14030
14043
|
removeSoftware,
|