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