Skip to content

Commit

Permalink
调整燃尽图基线计算方式
Browse files Browse the repository at this point in the history
Signed-off-by: vilson <[email protected]>
  • Loading branch information
a54552239 committed Feb 25, 2020
1 parent 8062998 commit 1b3e336
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/common/Model/ProjectReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ public static function getReportByDay($projectCode, $day = 10)
}
}
if ($max) {
$each = ceil($max / ($day - 1));
$each = round($max / ($day - 1), 1);
$current = $max;
for ($i = 1; $i <= $day; $i++) {
($current < 0 || $day == $i) && $current = 0;
$baseLineList[] = $current;
$current -= $each;
$current < 0 && $current = 0;
}
}
return ['date' => $dateList, 'task' => $taskList, 'undoneTask' => $undoneTaskList, 'baseLineList' => $baseLineList];
Expand Down

0 comments on commit 1b3e336

Please sign in to comment.