alsmanager_lib 3.0.37 → 3.0.39
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 +21 -8
- 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 + "', ";
|
|
@@ -5745,7 +5757,7 @@ function getDevicesNotAllocatedComboSQLite(id_site, id_place, sel_type, sel_make
|
|
|
5745
5757
|
query += "left join device_site ds on d.id = ds.id_device ";
|
|
5746
5758
|
query += "left join site_destinations sd on ds.id_site = sd.id_site ";
|
|
5747
5759
|
query += "left join device_consegne dc on d.id = dc.id_device ";
|
|
5748
|
-
query += "left join
|
|
5760
|
+
query += "left join consegna_beni cb on d.id = cb.id_bene "
|
|
5749
5761
|
query += "where (d.is_removed is null or d.is_removed = 0) "
|
|
5750
5762
|
query += "and (dc.id_consegna is null) ";
|
|
5751
5763
|
query += "and (cb.id is null or (cb.tipo_bene = 'DEVICE' and cb.stato_restituzione = 2)) ";
|
|
@@ -5788,7 +5800,7 @@ function getDevicesNotAllocatedComboMySQL(id_site, id_place, sel_type, sel_maker
|
|
|
5788
5800
|
query += "left join device_site ds on d.id = ds.id_device ";
|
|
5789
5801
|
query += "left join site_destinations sd on ds.id_site = sd.id_site ";
|
|
5790
5802
|
query += "left join device_consegne dc on d.id = dc.id_device ";
|
|
5791
|
-
query += "left join
|
|
5803
|
+
query += "left join consegna_beni cb on d.id = cb.id_bene "
|
|
5792
5804
|
query += "where (d.is_removed is null or d.is_removed = 0) "
|
|
5793
5805
|
query += "and (dc.id_consegna is null) ";
|
|
5794
5806
|
query += "and (cb.id is null or (cb.tipo_bene = 'DEVICE' and cb.stato_restituzione = 2)) ";
|
|
@@ -5831,7 +5843,7 @@ function getDevicesNotAllocatedComboMySQL2(id_site, id_place, sel_type, sel_make
|
|
|
5831
5843
|
query += "left join device_site ds on d.id = ds.id_device ";
|
|
5832
5844
|
query += "left join site_destinations sd on ds.id_site = sd.id_site ";
|
|
5833
5845
|
query += "left join device_consegne dc on d.id = dc.id_device ";
|
|
5834
|
-
query += "left join
|
|
5846
|
+
query += "left join consegna_beni cb on d.id = cb.id_bene "
|
|
5835
5847
|
query += "where (d.is_removed is null or d.is_removed = 0) "
|
|
5836
5848
|
query += "and (dc.id_consegna is null) ";
|
|
5837
5849
|
query += "and (cb.id is null or (cb.tipo_bene = 'DEVICE' and cb.stato_restituzione = 2)) ";
|
|
@@ -8017,7 +8029,7 @@ function selectDeviceInDepositoSQLite(inv_code) {
|
|
|
8017
8029
|
query += "join device_site ds on ds.id_device = d.id "
|
|
8018
8030
|
query += "join sites s on s.id = ds.id_site "
|
|
8019
8031
|
query += "join site_destinations sd on sd.id_site = s.id "
|
|
8020
|
-
query += "left join
|
|
8032
|
+
query += "left join consegna_beni cb on d.id = cb.id_bene "
|
|
8021
8033
|
query += "where (inv_ict3_number = '" + inv_code + "' or ";
|
|
8022
8034
|
query += "inv_tn_number = '" + inv_code + "' or ";
|
|
8023
8035
|
query += "serial_no = '" + inv_code + "' or ";
|
|
@@ -8039,7 +8051,7 @@ function selectDeviceInDepositoMySQL(inv_code) {
|
|
|
8039
8051
|
query += "join device_site ds on ds.id_device = d.id "
|
|
8040
8052
|
query += "join sites s on s.id = ds.id_site "
|
|
8041
8053
|
query += "join site_destinations sd on sd.id_site = s.id "
|
|
8042
|
-
query += "left join
|
|
8054
|
+
query += "left join consegna_beni cb on d.id = cb.id_bene "
|
|
8043
8055
|
query += " where (inv_ict3_number = :inv_code or ";
|
|
8044
8056
|
query += "inv_tn_number = :inv_code or ";
|
|
8045
8057
|
query += "serial_no = :inv_code or ";
|
|
@@ -8221,7 +8233,7 @@ function getSoftwaresNotAllocatedComboSQLite() {
|
|
|
8221
8233
|
query += "else '' "
|
|
8222
8234
|
query += "end as Descrizione ";
|
|
8223
8235
|
query += "from Softwares s ";
|
|
8224
|
-
query += "left join
|
|
8236
|
+
query += "left join consegna_beni cb on s.id = cb.id_bene "
|
|
8225
8237
|
query += "where (s.is_removed is null or s.is_removed = 0) "
|
|
8226
8238
|
query += "and (cb.id is null or (cb.tipo_bene = 'SOFTWARE' and cb.stato_restituzione = 2)) ";
|
|
8227
8239
|
return query;
|
|
@@ -8236,7 +8248,7 @@ function getSoftwaresNotAllocatedComboMySQL() {
|
|
|
8236
8248
|
query += "else '' "
|
|
8237
8249
|
query += "end as Descrizione ";
|
|
8238
8250
|
query += "from Softwares s ";
|
|
8239
|
-
query += "left join
|
|
8251
|
+
query += "left join consegna_beni cb on s.id = cb.id_bene "
|
|
8240
8252
|
query += "where (s.is_removed is null or s.is_removed = 0) "
|
|
8241
8253
|
query += "and (cb.id is null or (cb.tipo_bene = 'SOFTWARE' and cb.stato_restituzione = 2)) ";
|
|
8242
8254
|
return query;
|
|
@@ -8251,7 +8263,7 @@ function getSoftwaresNotAllocatedComboMySQL2() {
|
|
|
8251
8263
|
query += "else '' "
|
|
8252
8264
|
query += "end as Descrizione ";
|
|
8253
8265
|
query += "from Softwares s ";
|
|
8254
|
-
query += "left join
|
|
8266
|
+
query += "left join consegna_beni cb on s.id = cb.id_bene "
|
|
8255
8267
|
query += "where (s.is_removed is null or s.is_removed = 0) "
|
|
8256
8268
|
query += "and (cb.id is null or (cb.tipo_bene = 'SOFTWARE' and cb.stato_restituzione = 2)) ";
|
|
8257
8269
|
return query;
|
|
@@ -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,
|