Reports
Method | Url | Filters | |
GET | /api/route |
|
Required Required Optional Optional Optional |
JS:
generateAndDownloadPDF(
{
vendorId:[1],
accountId:[54,55],
service:66,
startDate:"2023-05-06",
endDate:"2023-03-02"
}
)
html:
<head>
<link rel="stylesheet" href="https://cdn.scheduleinterpreter.com/flow/css/ol.css" />
<link rel="stylesheet" type="text/css" href="https://platform.scheduleinterpreter.com/css/platformUI/font.css">
<script src="https://cdn.scheduleinterpreter.com/flow/js/jspdf.umd.min.js"></script>
<script src="https://cdn.scheduleinterpreter.com/flow/js/html2canvas.js"></script>
<script src="https://cdn.scheduleinterpreter.com/flow/js/pdf-lib.v1.4.0.min.js"></script>
<script src="https://cdn.scheduleinterpreter.com/flow/js/download.v1.4.7.js"></script>
<script src="https://cdn.scheduleinterpreter.com/flow/js/ol.v6.6.1.js"></script>
</head>
<body>
<div id="proccessMapText">proccess maps 0 - n/a</div>
<div class="progress-container" style="width: 100%; background-color: #f1f1f1; border-radius: 5px;">
<div class="progress-bar" id="mapProgressBar"
style="height: 10px;background-color: #4CAF50; width: 0%; transition: width 0.5s ease-in-out;border-radius: 5px;">
</div>
</div>
<div id="proccessPdfText">proccess creating pdf 0 - n/a</div>
<div class="progress-container" style="width: 100%; background-color: #f1f1f1;border-radius: 5px;">
<div class="progress-bar" id="pdfProgressBar"
style="height: 10px;background-color: #4CAF50; width: 0%; transition: width 0.5s ease-in-out;border-radius: 5px;">
</div>
</div>
</body>
1. https://platform.scheduleinterpreter.com/api/route?eventId=229605,229611
3 options (Multiple events in the same day)
1. from home to event (First) - */route?action=report&eventId=home,228802
2. from event to event - */route?action=report&eventId=228802,228806
3. from event(Last) to home - */route?action=report&eventId=228806,home
1 options (Single event in the same day)
portal to portal = home to event
3. from event(Last) to home - */route?action=report&eventId=228806,home
order by startime estimated
//startDate
//endDate
SQL
Option 1.
SELECT
id AS eventId,
interpreting.lat AS dLat,
interpreting.lon AS dLon,
userContact.lat AS oLat,
userContact.lon AS oLon
FROM interpreting, userContact
WHERE interpreting.interpID = userContact.userID
AND interpreting.interpID <> 0
AND interpreting.lat <> 0
AND interpreting.lon <> 0
Option 2.
SELECT
id,
dateTime,
lon,
lat
FROM
bestinterp.interpreting
WHERE
id in (228830, 228813)
ORDER BY dateTime ASC;
Option 3.
SELECT
id AS eventId,
interpreting.lat AS oLat,
interpreting.lon AS oLon,
userContact.lat AS dLat,
userContact.lon AS dLon
FROM interpreting, userContact
WHERE interpreting.interpID = userContact.userID
AND interpreting.interpID <> 0
AND interpreting.lat <> 0
AND interpreting.lon <> 0