fleetmap-reports 1.0.382 → 1.0.385

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetmap-reports",
3
- "version": "1.0.382",
3
+ "version": "1.0.385",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -9,6 +9,7 @@ const {getUserPartner} = require("fleetmap-partners")
9
9
  const traccar = require("./util/traccar")
10
10
  const {isInsideTimetable, isPartialInsideTimetable, calculateTrip} = require("./util/trips");
11
11
  const tripHelper = require("./util/trips");
12
+ const {devicesToProcess} = require("./util/device");
12
13
 
13
14
  const fileName = 'ActivityReport'
14
15
 
@@ -71,27 +72,23 @@ async function createActivityReportByGroup(from, to, userData, traccarInstance){
71
72
  }
72
73
 
73
74
  async function createActivityReportByDevice(from, to, userData, traccarInstance){
74
- const groupIds = userData.groups.map(g => g.id)
75
- const devicesToProcess = userData.byGroup ? userData.devices.filter(d => !groupIds.includes(d.groupId)) : userData.devices
75
+ const devices = devicesToProcess(userData)
76
76
 
77
77
  const allData = {
78
78
  devices: [],
79
- xpert: devicesToProcess.filter(d => d.attributes.xpert).length > 0,
79
+ xpert: devices.filter(d => d.attributes.xpert).length > 0,
80
80
  from: from,
81
81
  to: to
82
82
  }
83
83
 
84
- //Get report data from traccar
85
- devicesToProcess.sort((a, b) => (a.name > b.name) ? 1 : -1)
86
-
87
84
  let summaries = []
88
- const {trips, route, summary} = await traccar.getAllInOne(traccarInstance, from, to, devicesToProcess, true, true, false, !userData.groupByDay)
85
+ const {trips, route, summary} = await traccar.getAllInOne(traccarInstance, from, to, devices, true, true, false, !userData.groupByDay)
89
86
 
90
87
  if(userData.groupByDay) {
91
88
  console.log('trips:' + trips.length)
92
89
 
93
90
  if (trips.length) {
94
- tripHelper.checkTripsKms(traccarInstance, from, to, devicesToProcess, {trips, route})
91
+ tripHelper.checkTripsKms(traccarInstance, from, to, devices, {trips, route})
95
92
  }
96
93
 
97
94
  const dates = getDates(from, to)
@@ -100,7 +97,7 @@ async function createActivityReportByDevice(from, to, userData, traccarInstance)
100
97
  const fromByDay = new Date(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0)
101
98
  const toByDay = new Date(date.getFullYear(), date.getMonth(), date.getDate(), 23, 59, 59)
102
99
 
103
- const summary = await traccar.getSummary(traccarInstance, fromByDay, toByDay, devicesToProcess)
100
+ const summary = await traccar.getSummary(traccarInstance, fromByDay, toByDay, devices)
104
101
  summary.forEach(s => s.date = date)
105
102
  summaries = summaries.concat(summary)
106
103
  }
@@ -113,7 +110,7 @@ async function createActivityReportByDevice(from, to, userData, traccarInstance)
113
110
 
114
111
  //Process report data
115
112
  if (summaries.length || trips.length) {
116
- allData.devices = processDevices(from, to, devicesToProcess, {summaries: summaries, trips, route}, userData)
113
+ allData.devices = processDevices(from, to, devices, {summaries: summaries, trips, route}, userData)
117
114
  }
118
115
 
119
116
  return allData
@@ -5,6 +5,7 @@ const {getStyle} = require("./reportStyle");
5
5
  const {headerFromUser} = require("./util/pdfDocument");
6
6
  const {getUserPartner} = require("fleetmap-partners");
7
7
  const {convertToLocaleString, getTranslations} = require("./util/utils");
8
+ const {devicesToProcess} = require("./util/device");
8
9
 
9
10
  const fileName = 'EventReport'
10
11
 
@@ -36,17 +37,14 @@ async function createEventsReport(from, to, userData, traccar) {
36
37
  }
37
38
  }
38
39
 
39
- const groupIds = userData.groups.map(g => g.id)
40
- const withoutGroupDevices = userData.byGroup ? userData.devices.filter(d => !groupIds.includes(d.groupId)) : userData.devices
40
+ const devices = devicesToProcess(userData)
41
41
 
42
- withoutGroupDevices.sort((a, b) => (a.name > b.name) ? 1 : -1)
43
-
44
- const data = await getReportData(from, to, withoutGroupDevices, userData.eventTypes, traccar)
42
+ const data = await getReportData(from, to, devices, userData.eventTypes, traccar)
45
43
 
46
44
  if(data.length > 0) {
47
45
  reportData.push({
48
- devices: await processDevices(from, to, withoutGroupDevices, userData.geofences, userData.drivers, data, traccar),
49
- xpert: withoutGroupDevices.filter(d => d.attributes.xpert).length > 0
46
+ devices: await processDevices(from, to, devices, userData.geofences, userData.drivers, data, traccar),
47
+ xpert: devices.filter(d => d.attributes.xpert).length > 0
50
48
  })
51
49
  }
52
50
 
@@ -2,6 +2,7 @@ const automaticReports = require("./automaticReports")
2
2
  const refuelingReport = require("./refueling-report")
3
3
  const traccarHelper = require("./util/traccar")
4
4
  const odoo = require("./util/odoo")
5
+ const {devicesToProcess} = require("./util/device");
5
6
 
6
7
 
7
8
 
@@ -16,9 +17,9 @@ async function createFuelConsumptionReport(from, to, userData, traccar) {
16
17
  to: to
17
18
  }
18
19
 
19
- userData.devices.sort((a, b) => (a.name > b.name) ? 1 : -1)
20
+ const devices = devicesToProcess(userData)
20
21
 
21
- const allInOne = await traccarHelper.getAllInOne(traccar, from, to, userData.devices, true, true, false, false)
22
+ const allInOne = await traccarHelper.getAllInOne(traccar, from, to, devices, true, true, false, false)
22
23
  const tripsData = allInOne.trips
23
24
  const routeData = allInOne.route
24
25
 
@@ -33,7 +34,7 @@ async function createFuelConsumptionReport(from, to, userData, traccar) {
33
34
 
34
35
  allData.totalDevices = 0
35
36
 
36
- for (const d of userData.devices) {
37
+ for (const d of devices) {
37
38
  const trips = tripsData.filter(t => t.deviceId===d.id)
38
39
  const route = routeData.filter(r => r.deviceId===d.id)
39
40
  const deviceFuelServices = fuelServicesData.filter(f => d.attributes.odooId === f.vehicle_id[0])
@@ -1,4 +1,5 @@
1
1
  const automaticReports = require("./automaticReports");
2
+ const {devicesToProcess} = require("./util/device");
2
3
 
3
4
  function calculateFuelDrop(position, positions) {
4
5
  const index = positions.indexOf(position)
@@ -28,9 +29,9 @@ async function createFuelDropReport(from, to, userData, traccar) {
28
29
  to: to
29
30
  }
30
31
 
31
- userData.devices.sort((a, b) => (a.name > b.name) ? 1 : -1)
32
+ const devices = devicesToProcess(userData)
32
33
 
33
- const arrayOfArrays = automaticReports.sliceArray(userData.devices)
34
+ const arrayOfArrays = automaticReports.sliceArray(devices)
34
35
  let data = []
35
36
  const types = ['deviceFuelDrop']
36
37
 
@@ -48,7 +49,7 @@ async function createFuelDropReport(from, to, userData, traccar) {
48
49
  allData.totalFuelDrops = 0
49
50
  allData.totalFuelDropLiters = 0
50
51
 
51
- for (const d of userData.devices) {
52
+ for (const d of devices) {
52
53
  const alerts = data.filter(t => t.deviceId===d.id)
53
54
 
54
55
  if(alerts.length > 0) {
@@ -67,13 +68,19 @@ async function createFuelDropReport(from, to, userData, traccar) {
67
68
  }
68
69
  }
69
70
 
70
- allData.devices.push({
71
- device: d,
72
- alerts: alerts
73
- })
74
- allData.totalDevices = allData.totalDevices+1
75
- allData.totalFuelDrops = allData.totalFuelDrops + alerts.length
76
- allData.totalFuelDropLiters = allData.totalFuelDropLiters + alerts.reduce((a, b) => a + b.fuelDropLiters, 0)
71
+ //Filter wrong fuel drop values
72
+ const filteredAlerts = alerts.filter(a => a.fuelDropLiters < d.attributes.fuel_tank_capacity && a.fuelDropLiters > 0)
73
+
74
+ if(filteredAlerts.length > 0) {
75
+ allData.devices.push({
76
+ device: d,
77
+ alerts: filteredAlerts
78
+ })
79
+
80
+ allData.totalDevices = allData.totalDevices + 1
81
+ allData.totalFuelDrops = allData.totalFuelDrops + filteredAlerts.length
82
+ allData.totalFuelDropLiters = allData.totalFuelDropLiters + filteredAlerts.reduce((a, b) => a + b.fuelDropLiters, 0)
83
+ }
77
84
  }
78
85
  }
79
86
 
@@ -4,6 +4,7 @@ const {headerFromUser, AmiriRegular} = require("./util/pdfDocument");
4
4
  const {convertToLocaleString, convertMS, getTranslations} = require("./util/utils");
5
5
  const {getStyle} = require("./reportStyle");
6
6
  const {getUserPartner} = require("fleetmap-partners");
7
+ const {devicesToProcess} = require("./util/device");
7
8
 
8
9
  const fileName = 'IdleReport'
9
10
 
@@ -17,7 +18,7 @@ async function createIdleReport(from, to, userData, traccarInstance) {
17
18
  reportData.push(...allData)
18
19
  } else {
19
20
  console.log("ByDevice")
20
- const report = await createTripReportByDevice(from, to, userData.devices, userData, traccarInstance)
21
+ const report = await createTripReportByDevice(from, to, userData, traccarInstance)
21
22
  reportData.push(report)
22
23
  }
23
24
 
@@ -60,17 +61,16 @@ async function createTripReportByGroup(from, to, userData, traccarInstance) {
60
61
  return reportData
61
62
  }
62
63
 
63
- async function createTripReportByDevice(from, to, devices, userData, traccarInstance) {
64
+ async function createTripReportByDevice(from, to, userData, traccarInstance) {
64
65
  const allData = {
65
66
  devices: [],
66
67
  from: from,
67
68
  to: to
68
69
  }
69
70
 
70
- devices.sort((a, b) => (a.name > b.name) ? 1 : -1)
71
+ const devices = devicesToProcess(userData)
71
72
 
72
- const devicesToSlice = devices.slice()
73
- const route = await traccar.getRoute(traccarInstance, from, to, devicesToSlice)
73
+ const route = await traccar.getRoute(traccarInstance, from, to, devices)
74
74
 
75
75
  console.log('Route:' + route.length)
76
76
 
package/src/kms-report.js CHANGED
@@ -10,6 +10,7 @@ const trips = require("./util/trips")
10
10
  const drivers = require("./util/driver")
11
11
  const { isInsideTimetable, isPartialInsideTimetable, calculateTrip} = require("./util/trips")
12
12
  const traccarHelper = require("./util/traccar");
13
+ const {devicesToProcess} = require("./util/device");
13
14
 
14
15
  const fileName = 'KmsReport'
15
16
 
@@ -37,8 +38,7 @@ async function createKmsReport(from, to, userData, traccarInstance) {
37
38
  }
38
39
 
39
40
  async function createKmsReportByDevice(from, to, userData, traccarInstance) {
40
- const groupIds = userData.groups.map(g => g.id)
41
- const devicesToProcess = userData.byGroup ? userData.devices.filter(d => !groupIds.includes(d.groupId)) : userData.devices
41
+ const devices = devicesToProcess(userData)
42
42
 
43
43
  const allData = {
44
44
  devices: [],
@@ -46,16 +46,15 @@ async function createKmsReportByDevice(from, to, userData, traccarInstance) {
46
46
  to: to
47
47
  }
48
48
 
49
- devicesToProcess.sort((a, b) => (a.name > b.name) ? 1 : -1)
50
- const allInOne = await traccarHelper.getAllInOne(traccarInstance, from, to, devicesToProcess, true, true, false, false)
49
+ const allInOne = await traccarHelper.getAllInOne(traccarInstance, from, to, devices, true, true, false, false)
51
50
  const tripsData = allInOne.trips
52
51
  const routeData = allInOne.route
53
52
 
54
53
  console.log('trips:' + tripsData.length)
55
54
 
56
55
  if (tripsData.length > 0) {
57
- trips.checkTripsKms(traccarInstance, from, to, devicesToProcess, {trips: tripsData, route: routeData})
58
- allData.devices = processDevices(from, to, devicesToProcess, {trips: tripsData, route: routeData}, userData)
56
+ trips.checkTripsKms(traccarInstance, from, to, devices, {trips: tripsData, route: routeData})
57
+ allData.devices = processDevices(from, to, devices, {trips: tripsData, route: routeData}, userData)
59
58
  }
60
59
 
61
60
  return allData
@@ -5,6 +5,7 @@ const {getStyle} = require("./reportStyle")
5
5
  const {getUserPartner} = require("fleetmap-partners");
6
6
  const {convertToLocaleString, getTranslations} = require("./util/utils");
7
7
  const traccarHelper = require("./util/traccar");
8
+ const {devicesToProcess} = require("./util/device");
8
9
 
9
10
  const fileName = 'LocationReport'
10
11
 
@@ -79,23 +80,20 @@ async function createLocationReportByGroup(from, to, userData, traccar) {
79
80
  }
80
81
 
81
82
  async function createLocationReportByDevice(from, to, userData, traccar) {
82
- const groupIds = userData.groups.map(g => g.id)
83
- const withoutGroupDevices = userData.byGroup ? userData.devices.filter(d => !groupIds.includes(d.groupId)) : userData.devices
83
+ const devices = devicesToProcess(userData)
84
84
 
85
85
  const allData = {
86
86
  devices: [],
87
- xpert: withoutGroupDevices.filter(d => d.attributes.xpert).length > 0
87
+ xpert: devices.filter(d => d.attributes.xpert).length > 0
88
88
  }
89
89
 
90
- withoutGroupDevices.sort((a, b) => (a.name > b.name) ? 1 : -1)
91
- const devicesToSlice = withoutGroupDevices.slice()
92
- const allInOne = await traccarHelper.getAllInOne(traccar, from, to, devicesToSlice, true, false, false, false)
90
+ const allInOne = await traccarHelper.getAllInOne(traccar, from, to, devices, true, false, false, false)
93
91
  const routeData = allInOne.route
94
92
 
95
93
  console.log('Locations:'+routeData.length)
96
94
 
97
95
  if(routeData.length > 0) {
98
- allData.devices = processDevices(from, to, withoutGroupDevices, userData.drivers, routeData)
96
+ allData.devices = processDevices(from, to, devices, userData.drivers, routeData)
99
97
  }
100
98
 
101
99
  return allData
@@ -1,5 +1,6 @@
1
1
  const helpers = require("turf")
2
2
  const automaticReports = require("./automaticReports")
3
+ const {devicesToProcess} = require("./util/device");
3
4
 
4
5
  const positionsToCheck = 15
5
6
 
@@ -14,12 +15,11 @@ async function createRefuelingReport(from, to, userData, traccar) {
14
15
  to: to
15
16
  }
16
17
 
17
- userData.devices.sort((a, b) => (a.name > b.name) ? 1 : -1)
18
+ const devices = devicesToProcess(userData).filter(d => automaticReports.deviceWithFuelInfo(d))
18
19
 
19
- const devicesToSlice = userData.devices.filter(d => automaticReports.deviceWithFuelInfo(d)).slice()
20
- console.log('Devices:'+devicesToSlice.length)
20
+ console.log('Devices:'+devices.length)
21
21
 
22
- const arrayOfArrays = automaticReports.sliceArray(devicesToSlice)
22
+ const arrayOfArrays = automaticReports.sliceArray(devices)
23
23
  let data = []
24
24
  for (const a of arrayOfArrays) {
25
25
  const response = await traccar.reports.reportsRouteGet(from, to, a.map(d => d.id))
@@ -36,7 +36,7 @@ async function createRefuelingReport(from, to, userData, traccar) {
36
36
  allData.totalRefueling = 0
37
37
  allData.totalRefuelingLiters = 0
38
38
 
39
- for (const d of userData.devices) {
39
+ for (const d of devices) {
40
40
  const positions = data.filter(t => t.deviceId===d.id)
41
41
 
42
42
  if(positions.length > 0) {
@@ -11,6 +11,7 @@ const {distance, point} = require('turf')
11
11
  const here = require('./here')
12
12
  const {getUserPartner} = require("fleetmap-partners");
13
13
  const traccarHelper = require("./util/traccar");
14
+ const {devicesToProcess} = require("./util/device");
14
15
 
15
16
  const fileName = 'SpeedingReport'
16
17
  const eventTypes = ['deviceOverspeed']
@@ -67,10 +68,7 @@ async function createSpeedingReportByGroup(from, to, userData, traccarInstance){
67
68
  }
68
69
 
69
70
  async function createSpeedingReportByDevice(from, to, userData, traccarInstance) {
70
- const groupIds = userData.groups.map(g => g.id)
71
- const devices = userData.byGroup ? userData.devices.filter(d => !groupIds.includes(d.groupId)) : userData.devices
72
-
73
- devices.sort((a, b) => (a.name > b.name) ? 1 : -1)
71
+ const devices = devicesToProcess(userData)
74
72
 
75
73
  const allInOne = await traccarHelper.getAllInOne(traccarInstance, from, to, devices, true, false, false, false)
76
74
  const routes = allInOne.route
@@ -471,7 +469,7 @@ function exportSpeedingReportToExcel(userData, reportData) {
471
469
  distance: a.distance && new Intl.NumberFormat(lang, {maximumSignificantDigits: 1}).format(a.distance),
472
470
  maxSpeed: a.attributes.maxSpeed ? Math.round(a.attributes.maxSpeed * 1.85200) : Math.round(a.attributes.speed * 1.85200),
473
471
  duration: convertMS(a.eventTime, true),
474
- fixTime: new Date(a.position.fixTime).toLocaleString(),
472
+ fixTime: getAlertDate(a, userData.user),
475
473
  name: userData.byDriver ? a.deviceName : d.device.name,
476
474
  address: a.position.address + (a.geofenceName ? ' - ' + a.geofenceName : ''),
477
475
  roadSpeedLimit: a.roadSpeedLimit
@@ -8,6 +8,7 @@ const {getStyle} = require("./reportStyle")
8
8
  const traccarHelper = require("./util/traccar")
9
9
  const trips = require("./util/trips");
10
10
  const {isInsideTimetable, addNearestPOIs, isPartialInsideTimetable, calculateTrip} = require("./util/trips")
11
+ const {devicesToProcess} = require("./util/device");
11
12
 
12
13
  const fileName = 'TripReport'
13
14
 
@@ -34,23 +35,18 @@ async function createTripReport(from, to, userData, traccar) {
34
35
  }
35
36
 
36
37
  async function createTripReportByDevice(from, to, userData, traccar) {
37
- const groupIds = userData.groups.map(g => g.id)
38
- const devices = userData.byGroup ? userData.devices.filter(d => !groupIds.includes(d.groupId)) : userData.devices
38
+ const devices = devicesToProcess(userData)
39
39
 
40
40
  const allData = {
41
41
  devices: [],
42
42
  xpert: devices.filter(d => d.attributes.xpert).length > 0
43
43
  }
44
44
 
45
- devices.sort((a, b) => (a.name > b.name) ? 1 : -1)
45
+ const sliced = automaticReports.sliceArray(devices, 5)
46
46
 
47
- const devicesToSlice = devices.slice()
48
- const sliced = automaticReports.sliceArray(devicesToSlice, 5)
49
-
50
- console.log('LOADING_MESSAGE:' + devices.map(d => d.name).join(', '))
51
47
  let deviceCount = 0
52
48
  for(const slice of sliced) {
53
- const allInOne = await traccarHelper.getAllInOne(traccar, from, to, slice, true, true, true, false)
49
+ const allInOne = await traccarHelper.getAllInOne(traccar, from, to, slice, true, true, true, false, deviceCount, devices.length)
54
50
  const tripsData = allInOne.trips
55
51
  const stopsData = allInOne.stops
56
52
  const routeData = allInOne.route
@@ -66,7 +62,6 @@ async function createTripReportByDevice(from, to, userData, traccar) {
66
62
  }, userData))
67
63
  }
68
64
  deviceCount = deviceCount + slice.length
69
- console.log(`PROGRESS_PERC:${deviceCount / devices.length * 100}`)
70
65
  }
71
66
 
72
67
  return allData
@@ -0,0 +1,10 @@
1
+ function devicesToProcess(userData) {
2
+ const groupIds = userData.groups.map(g => g.id)
3
+ const devices = userData.byGroup ? userData.devices.filter(d => !groupIds.includes(d.groupId)) : userData.devices
4
+ devices.sort((a, b) => (a.name > b.name) ? 1 : -1)
5
+
6
+ console.log('LOADING_MESSAGE:' + devices.map(d => d.name).join(', '))
7
+ return devices
8
+ }
9
+
10
+ exports.devicesToProcess = devicesToProcess
@@ -65,7 +65,7 @@ async function getSummary(traccar, from, to, devices){
65
65
  return result.map(r => r.data).flat()
66
66
  }
67
67
 
68
- async function getAllInOne(traccar, from, to, devices, getRoutes, getTrips, getStops, getSummary){
68
+ async function getAllInOne(traccar, from, to, devices, getRoutes, getTrips, getStops, getSummary, currentDeviceCount = 0, totalDevices = devices.length){
69
69
  let url = `/reports/allinone?&from=${from.toISOString()}&to=${to.toISOString()}`
70
70
  if(getRoutes) url += `&type=route`
71
71
  if(getTrips) url += `&type=trips`
@@ -74,6 +74,7 @@ async function getAllInOne(traccar, from, to, devices, getRoutes, getTrips, getS
74
74
 
75
75
  const sliced = automaticReports.sliceArray(devices, 5)
76
76
  const result = []
77
+ let deviceCount = currentDeviceCount
77
78
  for(const chunk of sliced) {
78
79
  const requests = chunk.map(d =>
79
80
  traccar.axios.get(url + '&' + `deviceId=${d.id}`, {
@@ -81,6 +82,9 @@ async function getAllInOne(traccar, from, to, devices, getRoutes, getTrips, getS
81
82
  withCredentials: true
82
83
  }).then(r => r.data).then(x => {
83
84
  console.log('LOADING_MESSAGE:' + d.name)
85
+
86
+ deviceCount = deviceCount + 1
87
+ console.log(`PROGRESS_PERC:${deviceCount / totalDevices * 100}`)
84
88
  return x
85
89
  }))
86
90
  result.push(...(await Promise.all(requests)))
@@ -6,6 +6,7 @@ require('jspdf-autotable')
6
6
  const {headerFromUser} = require("./util/pdfDocument");
7
7
  const {getStyle} = require("./reportStyle")
8
8
  const {getUserPartner} = require("fleetmap-partners");
9
+ const {devicesToProcess} = require("./util/device");
9
10
 
10
11
  const fileName = 'ZoneReport'
11
12
 
@@ -42,17 +43,15 @@ async function createZoneReport(from, to, userData, traccar) {
42
43
  }
43
44
  }
44
45
 
45
- const groupIds = userData.groups.map(g => g.id)
46
- const withoutGroupDevices = userData.byGroup ? userData.devices.filter(d => !groupIds.includes(d.groupId)) : userData.devices
46
+ const devices = devicesToProcess(userData)
47
47
 
48
48
  const allData = {
49
49
  devices: [],
50
- xpert: withoutGroupDevices.filter(d => d.attributes.xpert).length > 0
50
+ xpert: devices.filter(d => d.attributes.xpert).length > 0
51
51
  }
52
52
 
53
- withoutGroupDevices.sort((a, b) => (a.name > b.name) ? 1 : -1)
54
53
 
55
- const arrayOfArrays = automaticReports.sliceArray(withoutGroupDevices)
54
+ const arrayOfArrays = automaticReports.sliceArray(devices)
56
55
  let data = []
57
56
  for (const a of arrayOfArrays) {
58
57
  const response = await traccar.reports.reportsEventsGet(from, to, a.map(d => d.id), null, types)
@@ -65,7 +64,7 @@ async function createZoneReport(from, to, userData, traccar) {
65
64
  return reportData
66
65
  }
67
66
 
68
- allData.devices = await processDevices(from, to, withoutGroupDevices, userData.drivers, userData.geofences, data, traccar)
67
+ allData.devices = await processDevices(from, to, devices, userData.drivers, userData.geofences, data, traccar)
69
68
 
70
69
  reportData.push(allData)
71
70