alsmanager_lib 3.0.122 → 3.0.124

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 +5 -3
  2. package/package.json +1 -1
package/lib/modules.js CHANGED
@@ -11265,13 +11265,14 @@ function getSitesFromDeviceSQLite(id_device, date_ref, prec_pos) {
11265
11265
  }
11266
11266
  else {
11267
11267
  query += " where (date('now') >= ds.date_in and date('now') <= ds.date_out) ";
11268
- query += "and (date('now') >= sd.date_start and date('now') <= ds.date_end) ";
11268
+ query += "and (date('now') >= sd.date_start and date('now') <= sd.date_end) ";
11269
11269
  query += "and ds.id_device = " + id_device;
11270
11270
  }
11271
11271
  }
11272
11272
  query += " order by sd.name, s.floor";
11273
11273
  return query;
11274
11274
  }
11275
+
11275
11276
  function getSitesFromDeviceMySQL(id_device, prec_pos) {
11276
11277
  var query = "SELECT DISTINCT p.mark as Sigla, p.name as Plesso, sd.name as Aula, sd.type as Funzione, s.floor as Piano from device_site ds ";
11277
11278
  query += " JOIN sites s ON s.id = ds.id_site";
@@ -11282,12 +11283,13 @@ function getSitesFromDeviceMySQL(id_device, prec_pos) {
11282
11283
  }
11283
11284
  else {
11284
11285
  query += " where (CURDATE() >= ds.date_in and CURDATE() <= ds.date_out) ";
11285
- query += "and (CURDATE() >= sd.date_start and CURDATE() <= ds.date_end) ";
11286
+ query += "and (CURDATE() >= sd.date_start and CURDATE() <= sd.date_end) ";
11286
11287
  query += "and ds.id_device = :id_device";
11287
11288
  }
11288
11289
  query += " order by sd.name, s.floor";
11289
11290
  return query;
11290
11291
  }
11292
+
11291
11293
  function getSitesFromDeviceMySQL2(id_device, date_ref, prec_pos) {
11292
11294
  var query = "SELECT DISTINCT p.mark as Sigla, p.name as Plesso, sd.name as Aula, sd.type as Funzione, s.floor as Piano from device_site ds ";
11293
11295
  query += " JOIN sites s ON s.id = ds.id_site";
@@ -11298,7 +11300,7 @@ function getSitesFromDeviceMySQL2(id_device, date_ref, prec_pos) {
11298
11300
  }
11299
11301
  else {
11300
11302
  query += " where (CURDATE() >= ds.date_in and CURDATE() <= ds.date_out) ";
11301
- query += "and (CURDATE() >= sd.date_start and CURDATE() <= ds.date_end) ";
11303
+ query += "and (CURDATE() >= sd.date_start and CURDATE() <= sd.date_end) ";
11302
11304
  query += "and ds.id_device = " + id_device;
11303
11305
  }
11304
11306
  query += " order by sd.name, s.floor";
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.122",
7
+ "version": "3.0.124",
8
8
  "description": "Funzioni per ALSManager",
9
9
  "license": "ISC",
10
10
  "author": "Luca Cattani",