alsmanager_lib 3.0.179 → 3.0.180

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.
Files changed (2) hide show
  1. package/lib/modules.js +20 -2
  2. package/package.json +1 -1
package/lib/modules.js CHANGED
@@ -4111,7 +4111,16 @@ function queryDeviceByIdSQLite(id_device) {
4111
4111
  query += "d.manifacturer as Marca, d.model as Modello, ";
4112
4112
  query += "d.inv_ict3_number as Inventario, d.serial_no, ";
4113
4113
  query += "d.inv_tn_number, d.inv_pnrr_number, d.inv_tndigit_number, ";
4114
- query += "d.note, d.num_objects, d.no_inventario, d.peso_g, d.part_of, d.is_unused from devices d ";
4114
+ query += "d.note, d.num_objects, d.no_inventario, d.peso_g, d.part_of, d.is_unused, ";
4115
+ query += "case ";
4116
+ query += "when d.no_inventario is not null and d.no_inventario > 0 then concat(d.id,'(ID)') ";
4117
+ query += "when d.inv_ict3_number != '' and d.inv_ict3_number is not null then d.inv_ict3_number ";
4118
+ query += "when d.inv_pnrr_number != '' and d.inv_pnrr_number is not null then d.inv_pnrr_number ";
4119
+ query += "when d.inv_tn_number != '' and d.inv_tn_number is not null then concat(d.inv_tn_number,'(TN)') ";
4120
+ query += "when d.inv_tndigit_number != '' and d.inv_tndigit_number is not null then concat(d.inv_tndigit_number,'(TNDigit)') ";
4121
+ query += "when d.serial_no != '' and d.serial_no is not null then concat(d.serial_no,'(S/N)') ";
4122
+ query += "end as Codice ";
4123
+ query += "from devices d ";
4115
4124
  query += "where d.id = " + id_device;
4116
4125
  return query;
4117
4126
  }
@@ -4120,7 +4129,16 @@ function queryDeviceByIdMySQL(id_device) {
4120
4129
  query += "d.manifacturer as Marca, d.model as Modello, ";
4121
4130
  query += "d.inv_ict3_number as Inventario, d.serial_no, ";
4122
4131
  query += "d.inv_tn_number, d.inv_pnrr_number, d.inv_tndigit_number, ";
4123
- query += "d.note, d.num_objects, d.no_inventario, d.peso_g, d.part_of, d.is_unused from devices d ";
4132
+ query += "d.note, d.num_objects, d.no_inventario, d.peso_g, d.part_of, d.is_unused, ";
4133
+ query += "case ";
4134
+ query += "when d.no_inventario is not null and d.no_inventario > 0 then concat(d.id,'(ID)') ";
4135
+ query += "when d.inv_ict3_number != '' and d.inv_ict3_number is not null then d.inv_ict3_number ";
4136
+ query += "when d.inv_pnrr_number != '' and d.inv_pnrr_number is not null then d.inv_pnrr_number ";
4137
+ query += "when d.inv_tn_number != '' and d.inv_tn_number is not null then concat(d.inv_tn_number,'(TN)') ";
4138
+ query += "when d.inv_tndigit_number != '' and d.inv_tndigit_number is not null then concat(d.inv_tndigit_number,'(TNDigit)') ";
4139
+ query += "when d.serial_no != '' and d.serial_no is not null then concat(d.serial_no,'(S/N)') ";
4140
+ query += "end as Codice ";
4141
+ query += "from devices d ";
4124
4142
  query += "where d.id = :id_device";
4125
4143
  return query;
4126
4144
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  ".": "./lib/modules.js",
5
5
  "./dbconn": "./lib/dbconn.js"
6
6
  },
7
- "version": "3.0.179",
7
+ "version": "3.0.180",
8
8
  "description": "Funzioni per ALSManager",
9
9
  "license": "ISC",
10
10
  "author": "Luca Cattani",