alsmanager_lib 3.0.91 → 3.0.93
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 +57 -1
- package/package.json +1 -1
package/lib/modules.js
CHANGED
|
@@ -14478,8 +14478,58 @@ 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, 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
|
+
return query;
|
|
14485
|
+
}
|
|
14486
|
+
|
|
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
|
+
query += "id_place = '" + id_place + "', ";
|
|
14490
|
+
query += "floor = " + floor + ", ";
|
|
14491
|
+
query += "id_site = " + id_site + ", ";
|
|
14492
|
+
query += "point_x = " + x_coor + ", ";
|
|
14493
|
+
query += "point_y = " + y_coor + ", ";
|
|
14494
|
+
query += "map_scale = " + map_scale + ", ";
|
|
14495
|
+
query += "range_x = " + range_x + ", ";
|
|
14496
|
+
query += "range_y = " + range_y + " ";
|
|
14497
|
+
query += "where id = " + id_point;
|
|
14498
|
+
return query;
|
|
14499
|
+
}
|
|
14500
|
+
|
|
14501
|
+
function removeMapPoint(id_point) {
|
|
14502
|
+
var query = "delete from map_points ";
|
|
14503
|
+
query += "where id = " + id_point;
|
|
14504
|
+
return query;
|
|
14505
|
+
}
|
|
14506
|
+
|
|
14507
|
+
function removeMapPointByPlace(id_place, floor) {
|
|
14508
|
+
var query = "delete from map_points ";
|
|
14509
|
+
query += "where id_place = '" + id_place + "'";
|
|
14510
|
+
if (floor) {
|
|
14511
|
+
query += " and floor = " + floor;
|
|
14512
|
+
}
|
|
14513
|
+
return query;
|
|
14514
|
+
}
|
|
14481
14515
|
|
|
14482
14516
|
|
|
14517
|
+
function queryMapPointsByPlaceAndFloor(id_place, floor, map_scale) {
|
|
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";
|
|
14524
|
+
return query;
|
|
14525
|
+
}
|
|
14526
|
+
|
|
14527
|
+
function getMapPointsById(id_point) {
|
|
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;
|
|
14530
|
+
return query;
|
|
14531
|
+
}
|
|
14532
|
+
|
|
14483
14533
|
// Exports
|
|
14484
14534
|
|
|
14485
14535
|
module.exports = {
|
|
@@ -14866,6 +14916,12 @@ module.exports = {
|
|
|
14866
14916
|
removeAltriBeniFromDismissione,
|
|
14867
14917
|
removeDismissioneAltroBeneFromDismissione,
|
|
14868
14918
|
//
|
|
14869
|
-
getMapScript
|
|
14919
|
+
getMapScript,
|
|
14920
|
+
writeMapPoint,
|
|
14921
|
+
updateMapPoint,
|
|
14922
|
+
removeMapPoint,
|
|
14923
|
+
removeMapPointByPlace,
|
|
14924
|
+
queryMapPointsByPlaceAndFloor,
|
|
14925
|
+
getMapPointsById
|
|
14870
14926
|
};
|
|
14871
14927
|
// end of source
|