fleetmap-reports 2.0.218 → 2.0.219
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/package.json +1 -1
- package/src/util/traccar.js +3 -2
- package/src/zone-report.js +1 -1
package/package.json
CHANGED
package/src/util/traccar.js
CHANGED
|
@@ -120,7 +120,8 @@ async function getAllInOne (
|
|
|
120
120
|
sliceSize = 5,
|
|
121
121
|
devicesPerRequest = 1,
|
|
122
122
|
counter = undefined,
|
|
123
|
-
ignorePercentage = false
|
|
123
|
+
ignorePercentage = false,
|
|
124
|
+
filter) {
|
|
124
125
|
let url = `/reports/allinone?from=${from.toISOString()}&to=${to.toISOString()}`
|
|
125
126
|
if (getRoutes) url += '&type=route'
|
|
126
127
|
if (getTrips) url += '&type=trips'
|
|
@@ -136,7 +137,7 @@ async function getAllInOne (
|
|
|
136
137
|
console.log(u)
|
|
137
138
|
requests.push(
|
|
138
139
|
getItems(traccar, u, _chunk, counter, devicesPerRequest, ignorePercentage, totalDevices, currentDeviceCount,
|
|
139
|
-
!getTrips && !getStops && !getSummary)
|
|
140
|
+
!getTrips && !getStops && !getSummary, filter)
|
|
140
141
|
)
|
|
141
142
|
}
|
|
142
143
|
const now = new Date()
|
package/src/zone-report.js
CHANGED
|
@@ -30,7 +30,7 @@ const fileName = 'ZoneReport'
|
|
|
30
30
|
async function process (traccar, from, to, slice, deviceCount, devices, reportRangeDays, userData) {
|
|
31
31
|
const data = await traccarHelper.getAllInOne(
|
|
32
32
|
traccar, from, to, slice, true, false, false, false,
|
|
33
|
-
deviceCount, devices.length, sliceSize, reportRangeDays > 29 ? 1 : deviceChunk, undefined,
|
|
33
|
+
deviceCount, devices.length, sliceSize, reportRangeDays > 29 ? 1 : deviceChunk, undefined, true)
|
|
34
34
|
|
|
35
35
|
const route = filterPositions(data.route)
|
|
36
36
|
const alerts = []
|