Use #getCapacityDurationAt for calculating the capacity between two dates
FEA: ItEr60S19TimeUnitDataType
This commit is contained in:
parent
e887942893
commit
b1995f3b8e
1 changed files with 3 additions and 3 deletions
|
|
@ -66,12 +66,12 @@ public class ResourceCalendar extends BaseCalendar {
|
|||
}
|
||||
|
||||
public Integer getCapacity(LocalDate from, LocalDate to) {
|
||||
Integer result = getCapacityAt(to);
|
||||
EffortDuration result = getCapacityDurationAt(to);
|
||||
for (LocalDate date = from; date.isBefore(to);) {
|
||||
result += getCapacityAt(date);
|
||||
result = result.plus(getCapacityDurationAt(date));
|
||||
date = date.plusDays(1);
|
||||
}
|
||||
return result;
|
||||
return roundToHours(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue