fleetmap-reports 2.0.229 → 2.0.231
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/zone-report.js +2 -2
package/package.json
CHANGED
package/src/zone-report.js
CHANGED
|
@@ -84,7 +84,7 @@ async function createZoneReport (from, to, userData, traccar) {
|
|
|
84
84
|
const sliced = automaticReports.sliceArray(devices, sliceSize)
|
|
85
85
|
|
|
86
86
|
let deviceCount = 0
|
|
87
|
-
const url =
|
|
87
|
+
const url = 'https://api.pinme.io/pinmeapi/process-report/zone-report-processing'
|
|
88
88
|
|
|
89
89
|
const promises = sliced.map(slice => {
|
|
90
90
|
const now = new Date()
|
|
@@ -504,10 +504,10 @@ function analyseAlerts (alerts, deviceRoute, userData, from, to, device) {
|
|
|
504
504
|
async function getInAndOutEvents (devices, route, userData) {
|
|
505
505
|
const events = []
|
|
506
506
|
const geofencesFeatures = userData.geofences.map(g => convertToFeature(g))
|
|
507
|
-
console.log('getInAndOutEvents', devices.length)
|
|
508
507
|
devices.forEach(d => {
|
|
509
508
|
const deviceRoute = route.filter(p => p.deviceId === d.id)
|
|
510
509
|
const routePoints = deviceRoute.sort(sortPositions).map(p => convertPositionToFeature(p))
|
|
510
|
+
console.log('getInAndOutEvents', d.id, deviceRoute.length, routePoints.length)
|
|
511
511
|
routePoints.filter(p => p.properties.position.valid).forEach((p, i, array) => {
|
|
512
512
|
p.inside = {}
|
|
513
513
|
if (!i) {
|