ItEr41S09RFSoporteRecursosVirtuaisItEr40S12: Taking into account the capacity
This commit is contained in:
parent
8c8e531d5f
commit
f7461e2e82
1 changed files with 8 additions and 1 deletions
|
|
@ -63,7 +63,14 @@ public class ResourceCalendar extends BaseCalendar {
|
|||
if (!isActive(date)) {
|
||||
return 0;
|
||||
}
|
||||
return super.getWorkableHours(date);
|
||||
return multiplyByCapacity(super.getWorkableHours(date));
|
||||
}
|
||||
|
||||
private Integer multiplyByCapacity(Integer workableHours) {
|
||||
if (capacity == null) {
|
||||
return workableHours;
|
||||
}
|
||||
return capacity * workableHours;
|
||||
}
|
||||
|
||||
@AssertTrue(message = "Capacity must be a positive integer number")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue