Merge branch 'staging' into production
This commit is contained in:
commit
f2f737d6f8
@ -128,6 +128,7 @@ class ExportThanatoStatisticService {
|
||||
'HEURES TOTAL DE MALADIE'.';'.
|
||||
'HEURES TOTAL DE TRAVAIL'.';'.
|
||||
'HEURES TOTAL DE PARCOURS ENTRE DEVIS'.';'.
|
||||
'NOMBRE DE SOINS ET TOILETTES'.';'.
|
||||
"\n";
|
||||
return $fileHeader;
|
||||
}
|
||||
@ -170,6 +171,7 @@ class ExportThanatoStatisticService {
|
||||
''.';'.
|
||||
''.';'.
|
||||
''.';'.
|
||||
''.';'.
|
||||
''.';'."\n";
|
||||
return $fileContent;
|
||||
}
|
||||
@ -183,6 +185,7 @@ class ExportThanatoStatisticService {
|
||||
$g_totalTravelingHoursBetweenDevisLocation = 0;
|
||||
$g_totalDiseaseHours = 0;
|
||||
$g_totalRestHours = 0;
|
||||
$g_totalDevisCount = 0;
|
||||
|
||||
foreach($exportData as $devisDate => $devisData){
|
||||
$totalDevisHours = 0;
|
||||
@ -191,6 +194,7 @@ class ExportThanatoStatisticService {
|
||||
$totalDiseaseHours = 0;
|
||||
$totalRestHours = 0;
|
||||
$totalDistance = 0;
|
||||
$totalDevisCount = 0;
|
||||
$totalTravelingHoursBetweenDevisLocation = 0;
|
||||
$hasDevisInTheCurrentDate = $devisData['hasDevis'];
|
||||
if($hasDevisInTheCurrentDate === false){
|
||||
@ -214,6 +218,7 @@ class ExportThanatoStatisticService {
|
||||
$totalWorkedHours -= $totalAbsenceHours;
|
||||
}
|
||||
else{
|
||||
$totalDevisCount += count($devisData["devisId"]);
|
||||
$routeLines = $this->gestionBdd->getRouteLinesByDevisIdList($devisData["devisId"]);
|
||||
$totalDistanceAndTotalTravelingHoursBetweenDevis = $this->geoService->getTotalDistanceAndTotalTravelingHoursBetweenDevisLocationByRouteLines($routeLines);
|
||||
$totalDistance = $totalDistanceAndTotalTravelingHoursBetweenDevis["totalDistance"];
|
||||
@ -253,7 +258,7 @@ class ExportThanatoStatisticService {
|
||||
$totalLeaveHours,
|
||||
$totalTravelingHoursBetweenDevisLocation,
|
||||
$totalDiseaseHours,
|
||||
$totalRestHours
|
||||
$totalRestHours,$totalDevisCount
|
||||
);
|
||||
|
||||
$g_totalDistance += $totalDistance;
|
||||
@ -263,6 +268,7 @@ class ExportThanatoStatisticService {
|
||||
$g_totalTravelingHoursBetweenDevisLocation += $totalTravelingHoursBetweenDevisLocation;
|
||||
$g_totalDiseaseHours += $totalDiseaseHours;
|
||||
$g_totalRestHours += $totalRestHours;
|
||||
$g_totalDevisCount += $totalDevisCount;
|
||||
}
|
||||
|
||||
$fileContent = $this->populateLastRecapForTheLine(
|
||||
@ -273,13 +279,13 @@ class ExportThanatoStatisticService {
|
||||
$g_totalLeaveHours,
|
||||
$g_totalTravelingHoursBetweenDevisLocation,
|
||||
$g_totalDiseaseHours,
|
||||
$g_totalRestHours
|
||||
$g_totalRestHours,$g_totalDevisCount
|
||||
);
|
||||
|
||||
return $fileContent;
|
||||
}
|
||||
|
||||
private function populateLastRecapForTheLine(string $fileContent,$distance,$totalDevisHours,$totalWorkedHours,$totalLeaveHours,$totalTravelingHours ,$totalDiseaseHours = 0,$totalRestHours = 0){
|
||||
private function populateLastRecapForTheLine(string $fileContent,$distance,$totalDevisHours,$totalWorkedHours,$totalLeaveHours,$totalTravelingHours ,$totalDiseaseHours = 0,$totalRestHours = 0,$totalDevisCount = 0){
|
||||
$fileContent = $fileContent.
|
||||
''.';'.
|
||||
''.';'.
|
||||
@ -301,7 +307,8 @@ class ExportThanatoStatisticService {
|
||||
"$totalRestHours".';'.
|
||||
"$totalDiseaseHours".';'.
|
||||
"$totalWorkedHours".';'.
|
||||
"$totalTravelingHours"."\n";
|
||||
"$totalTravelingHours".';'.
|
||||
"$totalDevisCount"."\n";
|
||||
return $fileContent;
|
||||
}
|
||||
|
||||
@ -339,6 +346,7 @@ class ExportThanatoStatisticService {
|
||||
''.';'.
|
||||
''.';'.
|
||||
''.';'.
|
||||
''.';'.
|
||||
''.';'."\n";
|
||||
|
||||
return $fileContent;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user