ItEr41S11CUConfiguracionMaquinasItEr40S15: No criterions at configuration unit means no workers matched
This commit is contained in:
parent
fe21738931
commit
ebbf074fa3
2 changed files with 11 additions and 3 deletions
|
|
@ -368,6 +368,9 @@ public class Task extends TaskElement {
|
|||
@Override
|
||||
public Collection<Worker> findWorkersMatching(
|
||||
Collection<? extends Criterion> requiredCriterions) {
|
||||
if (requiredCriterions.isEmpty()) {
|
||||
return new ArrayList<Worker>();
|
||||
}
|
||||
Collection<Worker> result = new ArrayList<Worker>();
|
||||
for (Worker each : allWorkers) {
|
||||
if (each.satisfiesCriterions(requiredCriterions)) {
|
||||
|
|
|
|||
|
|
@ -234,10 +234,15 @@ public class ResourceAllocationModel implements IResourceAllocationModel {
|
|||
public Collection<Worker> findWorkersMatching(
|
||||
Collection<? extends Criterion> requiredCriterions) {
|
||||
reassociateResourcesWithSession();
|
||||
List<Resource> findAllSatisfyingCriterions = resourceDAO
|
||||
.findAllSatisfyingCriterions(requiredCriterions);
|
||||
List<Resource> allSatisfyingCriterions;
|
||||
if (!requiredCriterions.isEmpty()) {
|
||||
allSatisfyingCriterions = resourceDAO
|
||||
.findAllSatisfyingCriterions(requiredCriterions);
|
||||
} else {
|
||||
allSatisfyingCriterions = new ArrayList<Resource>();
|
||||
}
|
||||
return Resource.workers(reloadResources(Resource
|
||||
.workers(findAllSatisfyingCriterions)));
|
||||
.workers(allSatisfyingCriterions)));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue