alsmanager_lib 3.0.92 → 3.0.94

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 +16 -10
  2. package/package.json +1 -1
package/lib/modules.js CHANGED
@@ -14478,20 +14478,22 @@ function getMapScript(map_tag) {
14478
14478
  return text;
14479
14479
  }
14480
14480
 
14481
- function writeMapPoint(id_place, floor, id_site, x_coor, y_coor, map_scale) {
14482
- var query = "insert into map_points (id_place, floor, id_site, point_x, point_y, map_scale) values ";
14483
- query += "('" + id_place + "', " + floor + ", " + id_site + ", " + x_coor + ", " + y_coor + ", " + map_scale + ")";
14481
+ function writeMapPoint(id_place, floor, id_site, x_coor, y_coor, map_scale, range_x, range_y) {
14482
+ var query = "insert into map_points (id_place, floor, id_site, point_x, point_y, map_scale, range_x, range_y) values ";
14483
+ query += "('" + id_place + "', " + floor + ", " + id_site + ", " + x_coor + ", " + y_coor + ", " + map_scale + ", " + range_x + ", " + range_y + ")";
14484
14484
  return query;
14485
14485
  }
14486
14486
 
14487
- function updateMapPoint(id_point, id_site, x_coor, y_coor, map_scale) {
14488
- var query = "update map_points set (id_place, floor, id_site, point_x, point_y, map_scale) values ";
14487
+ function updateMapPoint(id_point, id_site, x_coor, y_coor, map_scale, range_x, range_y) {
14488
+ var query = "update map_points set ";
14489
14489
  query += "id_place = '" + id_place + "', ";
14490
14490
  query += "floor = " + floor + ", ";
14491
14491
  query += "id_site = " + id_site + ", ";
14492
14492
  query += "point_x = " + x_coor + ", ";
14493
14493
  query += "point_y = " + y_coor + ", ";
14494
- query += "map_scale = " + map_scale + " ";
14494
+ query += "map_scale = " + map_scale + ", ";
14495
+ query += "range_x = " + range_x + ", ";
14496
+ query += "range_y = " + range_y + " ";
14495
14497
  query += "where id = " + id_point;
14496
14498
  return query;
14497
14499
  }
@@ -14513,14 +14515,18 @@ function removeMapPointByPlace(id_place, floor) {
14513
14515
 
14514
14516
 
14515
14517
  function queryMapPointsByPlaceAndFloor(id_place, floor, map_scale) {
14516
- var query = "select id, floor, id_site, from map_points ";
14517
- query += "";
14518
+ var query = "select m.id, sd.name, sd.type, m.point_x, m.point_y, m.range_x, m.range_y from map_points m ";
14519
+ query += "join site_destinations sd on sd.id_site = m.id_site ";
14520
+ query += "where m.id_place = '" + id_place + "' ";
14521
+ query += "and m.floor = " + floor + " ";
14522
+ query += "and m.map_scale = " + map_scale + " ";
14523
+ query += "order by sd.name";
14518
14524
  return query;
14519
14525
  }
14520
14526
 
14521
14527
  function getMapPointsById(id_point) {
14522
- var query = "";
14523
- query += "";
14528
+ var query = "select id, id_place, floor, id_site, point_x, point_y, map_scale, range_x, range_y from map_points ";
14529
+ query += "where id = " + id_point;
14524
14530
  return query;
14525
14531
  }
14526
14532
 
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.92",
7
+ "version": "3.0.94",
8
8
  "description": "Funzioni per ALSManager",
9
9
  "license": "ISC",
10
10
  "author": "Luca Cattani",