alsmanager_lib 1.0.63 → 1.0.64
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 +6 -4
- package/package.json +1 -1
package/lib/modules.js
CHANGED
|
@@ -1497,14 +1497,15 @@ function queryDeviceStatusSQLite(id_device, date_ref) {
|
|
|
1497
1497
|
if (date_ref) {
|
|
1498
1498
|
switch (date_ref) {
|
|
1499
1499
|
case "current":
|
|
1500
|
-
query += "and date('now') >= du.date_status";
|
|
1500
|
+
query += "and date('now') >= du.date_status ";
|
|
1501
1501
|
break;
|
|
1502
1502
|
default:
|
|
1503
|
-
query += "and '" + date_ref + "' >= du.date_status";
|
|
1503
|
+
query += "and '" + date_ref + "' >= du.date_status ";
|
|
1504
1504
|
break;
|
|
1505
1505
|
|
|
1506
1506
|
}
|
|
1507
1507
|
}
|
|
1508
|
+
query += "order by id desc limit 1"
|
|
1508
1509
|
return query;
|
|
1509
1510
|
}
|
|
1510
1511
|
function queryDeviceStatusMySQL(id_device, date_ref) {
|
|
@@ -1513,14 +1514,15 @@ function queryDeviceStatusMySQL(id_device, date_ref) {
|
|
|
1513
1514
|
if (date_ref) {
|
|
1514
1515
|
switch (date_ref) {
|
|
1515
1516
|
case "current":
|
|
1516
|
-
query += "and (CURDATE() >= du.date_status";
|
|
1517
|
+
query += "and (CURDATE() >= du.date_status ";
|
|
1517
1518
|
break;
|
|
1518
1519
|
default:
|
|
1519
|
-
query += "and :date_ref >= du.date_status";
|
|
1520
|
+
query += "and :date_ref >= du.date_status ";
|
|
1520
1521
|
break;
|
|
1521
1522
|
|
|
1522
1523
|
}
|
|
1523
1524
|
}
|
|
1525
|
+
query += "order by id desc limit 1"
|
|
1524
1526
|
return query;
|
|
1525
1527
|
}
|
|
1526
1528
|
function queryDeviceStatus(db_used, id_device, date_ref) {
|