alsmanager_lib 3.0.163 → 3.0.165
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 +11 -2
- package/package.json +1 -1
package/lib/modules.js
CHANGED
|
@@ -9811,6 +9811,14 @@ function getBeniConsumoByIdDevice(db_used,id_device) {
|
|
|
9811
9811
|
}
|
|
9812
9812
|
|
|
9813
9813
|
//Manage dismissioni
|
|
9814
|
+
function getDismissioniYears() {
|
|
9815
|
+
var query = "select distinct substr(data, 1, 4) as year from dismissioni ";
|
|
9816
|
+
query += "where data is not null and trim(data) <> '' ";
|
|
9817
|
+
query += "order by year desc";
|
|
9818
|
+
return query;
|
|
9819
|
+
}
|
|
9820
|
+
|
|
9821
|
+
|
|
9814
9822
|
function selectDismissioniByYearSQLite(sel_year) {
|
|
9815
9823
|
var query = "select id, data, descrizione from dismissioni ";
|
|
9816
9824
|
if (sel_year && sel_year > 0) {
|
|
@@ -12175,7 +12183,7 @@ function getSitesWithDatesFromDeviceSQLite(id_device, date_ref) {
|
|
|
12175
12183
|
query += "join site_destinations sd on sd.id_site = ds.id_site ";
|
|
12176
12184
|
query += "join sites s on s.id = sd.id_site ";
|
|
12177
12185
|
query += "where ds.id_device = " + id_device + " ";
|
|
12178
|
-
query += "and
|
|
12186
|
+
query += "and sd.date_start <= '" + dr_str + "' and sd.date_end >= '" + dr_str + "' ";
|
|
12179
12187
|
query += " order by date_in";
|
|
12180
12188
|
return query;
|
|
12181
12189
|
}
|
|
@@ -12194,7 +12202,7 @@ function getSitesWithDatesFromDeviceMySQL(id_device, date_ref) {
|
|
|
12194
12202
|
query += "join site_destinations sd on sd.id_site = ds.id_site ";
|
|
12195
12203
|
query += "join sites s on s.id = sd.id_site ";
|
|
12196
12204
|
query += "where ds.id_device = :id_device ";
|
|
12197
|
-
query += "and
|
|
12205
|
+
query += "and sd.date_start <= '" + dr_str + "' and sd.date_end >= '" + dr_str + "' ";
|
|
12198
12206
|
query += "order by date_in";
|
|
12199
12207
|
return query;
|
|
12200
12208
|
}
|
|
@@ -16031,6 +16039,7 @@ module.exports = {
|
|
|
16031
16039
|
checkDocumentoAltroBene,
|
|
16032
16040
|
selectDocumentoAltroBeneById,
|
|
16033
16041
|
//
|
|
16042
|
+
getDismissioniYears,
|
|
16034
16043
|
selectDismissioniByYear,
|
|
16035
16044
|
selectDismissioneById,
|
|
16036
16045
|
updateDismissione,
|