alsmanager_lib 1.0.96 → 1.0.98
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 +20 -5
- package/package.json +1 -1
package/lib/modules.js
CHANGED
|
@@ -1648,7 +1648,7 @@ function getPCProperties(db_used, id_device) {
|
|
|
1648
1648
|
}
|
|
1649
1649
|
function createPCPropertiesMySQLObj(id_device, dev_prop) {
|
|
1650
1650
|
var obj = {};
|
|
1651
|
-
obj.
|
|
1651
|
+
obj.id_prop = dev_prop.id_prop;
|
|
1652
1652
|
obj.id_device = id_device;
|
|
1653
1653
|
obj.pc_name = dev_prop.pc_name;
|
|
1654
1654
|
obj.os = dev_prop.os;
|
|
@@ -1704,12 +1704,27 @@ function updatePCPropertiesSQLite(id_device, dev_prop) {
|
|
|
1704
1704
|
query += "note = '" + dev_prop.note + "', ";
|
|
1705
1705
|
query += "da_properties = " + dev_prop.da_properties + " ";
|
|
1706
1706
|
query += "where id_device = " + id_device + " ";
|
|
1707
|
-
query += "and id = " + dev_prop.
|
|
1707
|
+
query += "and id = " + dev_prop.id_prop;
|
|
1708
1708
|
return query;
|
|
1709
1709
|
}
|
|
1710
1710
|
|
|
1711
1711
|
function updatePCPropertiesMySQL() {
|
|
1712
|
-
|
|
1712
|
+
var query = "update device_pc set ";
|
|
1713
|
+
query += "id_device = :id_device, ";
|
|
1714
|
+
query += "pc_name = :pc_name, ";
|
|
1715
|
+
query += "OS = :os, ";
|
|
1716
|
+
query += "OS_version = :os_version, ";
|
|
1717
|
+
query += "OS_arch = :os_arch, ";
|
|
1718
|
+
query += "CPU = :cpu, ";
|
|
1719
|
+
query += "CPU_arch = :cpu_arch, ";
|
|
1720
|
+
query += "RAM_GB = :ram_size, ";
|
|
1721
|
+
query += "video_card = :video_card, ";
|
|
1722
|
+
query += "smartboard_ready = :smartboard_ready, ";
|
|
1723
|
+
query += "note = :note, ";
|
|
1724
|
+
query += "da_properties = :da_properties ";
|
|
1725
|
+
query += "where id_device = :id_device ";
|
|
1726
|
+
query += "and id = :id_prop";
|
|
1727
|
+
return query;
|
|
1713
1728
|
}
|
|
1714
1729
|
function updatePCProperties(db_used, id_device, dev_prop) {
|
|
1715
1730
|
var query = "";
|
|
@@ -1733,7 +1748,7 @@ function getLastPCPropertiesInsertedSQLite(id_device) {
|
|
|
1733
1748
|
query += "from device_pc dp ";
|
|
1734
1749
|
query += "left join devices d on dp.id_device = d.id ";
|
|
1735
1750
|
query += "where dp.id_device = " + id_device + " ";
|
|
1736
|
-
query += "order by id desc LIMIT 1";
|
|
1751
|
+
query += "order by dp.id desc LIMIT 1";
|
|
1737
1752
|
return query;
|
|
1738
1753
|
}
|
|
1739
1754
|
function getLastPCPropertiesInsertedMySQL(id_device) {
|
|
@@ -1744,7 +1759,7 @@ function getLastPCPropertiesInsertedMySQL(id_device) {
|
|
|
1744
1759
|
query += "from device_pc dp ";
|
|
1745
1760
|
query += "left join devices d on dp.id_device = d.id ";
|
|
1746
1761
|
query += "where dp.id_device = :id_device ";
|
|
1747
|
-
query += "order by id desc LIMIT 1";
|
|
1762
|
+
query += "order by dp.id desc LIMIT 1";
|
|
1748
1763
|
return query;
|
|
1749
1764
|
}
|
|
1750
1765
|
function getLastPCPropertiesInserted(db_used, id_device) {
|