alsmanager_lib 3.0.85 → 3.0.87
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 +5 -8
- package/package.json +1 -1
package/lib/modules.js
CHANGED
|
@@ -4287,14 +4287,14 @@ function writeDeviceProperties(db_used, id_device, raw_data) {
|
|
|
4287
4287
|
//End Write Device properties
|
|
4288
4288
|
//Read Device properties
|
|
4289
4289
|
function readDevicePropertiesSQLite(id_device) {
|
|
4290
|
-
var query = "select raw_properties from device_properties ";
|
|
4290
|
+
var query = "select id, raw_properties from device_properties ";
|
|
4291
4291
|
query += "where id_device = " + id_device + " ";
|
|
4292
4292
|
query += "and (is_imported is null or is_imported = 0)"
|
|
4293
4293
|
return query;
|
|
4294
4294
|
}
|
|
4295
4295
|
|
|
4296
4296
|
function readDevicePropertiesMySQL() {
|
|
4297
|
-
var query = "select raw_properties from device_properties ";
|
|
4297
|
+
var query = "select id, raw_properties from device_properties ";
|
|
4298
4298
|
query += "where id_device = :id_device ";
|
|
4299
4299
|
query += "and (is_imported is null or is_imported = 0)"
|
|
4300
4300
|
return query;
|
|
@@ -5859,8 +5859,7 @@ function getDevicesNotAllocatedComboSQLite(id_site, id_place, sel_type, sel_make
|
|
|
5859
5859
|
query += "left join device_consegne dc on d.id = dc.id_device ";
|
|
5860
5860
|
query += "left join consegna_beni cb on d.id = cb.id_bene "
|
|
5861
5861
|
query += "where (d.is_removed is null or d.is_removed = 0) "
|
|
5862
|
-
query += "and (dc.id_consegna is null) ";
|
|
5863
|
-
query += "and (cb.id is null or (cb.tipo_bene = 'DEVICE' and cb.stato_restituzione = 2)) ";
|
|
5862
|
+
query += "and ((dc.id_consegna is null) or (cb.id is null or (cb.tipo_bene = 'DEVICE' and cb.stato_restituzione = 2))) ";
|
|
5864
5863
|
query += "and (ds.id_place is null ";
|
|
5865
5864
|
query += "or ((ds.date_in <= date('now') and ds.date_out >= date('now') and sd.type in ('MAGAZZINO', 'CARRELLO DISPOSITIVI'))) and (ds.id_place <> '" + id_place + "' and ds.id_site <> " + id_site + ")) ";
|
|
5866
5865
|
if (sel_type_str.trim() != '') {
|
|
@@ -5902,8 +5901,7 @@ function getDevicesNotAllocatedComboMySQL(id_site, id_place, sel_type, sel_maker
|
|
|
5902
5901
|
query += "left join device_consegne dc on d.id = dc.id_device ";
|
|
5903
5902
|
query += "left join consegna_beni cb on d.id = cb.id_bene "
|
|
5904
5903
|
query += "where (d.is_removed is null or d.is_removed = 0) "
|
|
5905
|
-
query += "and (dc.id_consegna is null) ";
|
|
5906
|
-
query += "and (cb.id is null or (cb.tipo_bene = 'DEVICE' and cb.stato_restituzione = 2)) ";
|
|
5904
|
+
query += "and ((dc.id_consegna is null) or (cb.id is null or (cb.tipo_bene = 'DEVICE' and cb.stato_restituzione = 2))) ";
|
|
5907
5905
|
query += "and (ds.id_place is null ";
|
|
5908
5906
|
query += "or ((ds.date_in <= CURDATE() and ds.date_out >= CURDATE() and sd.type in ('MAGAZZINO', 'CARRELLO DISPOSITIVI'))) and (ds.id_place <> :id_place and ds.id_site <> :id_site)) ";
|
|
5909
5907
|
if (sel_type_str.trim() != '') {
|
|
@@ -5945,8 +5943,7 @@ function getDevicesNotAllocatedComboMySQL2(id_site, id_place, sel_type, sel_make
|
|
|
5945
5943
|
query += "left join device_consegne dc on d.id = dc.id_device ";
|
|
5946
5944
|
query += "left join consegna_beni cb on d.id = cb.id_bene "
|
|
5947
5945
|
query += "where (d.is_removed is null or d.is_removed = 0) "
|
|
5948
|
-
query += "and (dc.id_consegna is null) ";
|
|
5949
|
-
query += "and (cb.id is null or (cb.tipo_bene = 'DEVICE' and cb.stato_restituzione = 2)) ";
|
|
5946
|
+
query += "and ((dc.id_consegna is null) or (cb.id is null or (cb.tipo_bene = 'DEVICE' and cb.stato_restituzione = 2))) ";
|
|
5950
5947
|
query += "and (ds.id_place is null ";
|
|
5951
5948
|
query += "or ((ds.date_in <= CURDATE() and ds.date_out >= CURDATE() and sd.type in ('MAGAZZINO', 'CARRELLO DISPOSITIVI'))) and (ds.id_place <> '" + id_place + "' and ds.id_site <> " + id_site + ")) ";
|
|
5952
5949
|
if (sel_type_str.trim() != '') {
|