ItEr57S04ValidacionEProbasFuncionaisItEr56S04: [Bug #488] Fix bug.
Calling useSchedulingDataFor
This commit is contained in:
parent
efaa551030
commit
cbd9fcfcdd
2 changed files with 14 additions and 4 deletions
|
|
@ -186,30 +186,35 @@ public class AdvancedAllocationTabCreator {
|
|||
private final ITaskElementDAO taskElementDAO;
|
||||
|
||||
private final IResourceDAO resourceDAO;
|
||||
private final Scenario currentScenario;
|
||||
|
||||
public static ITab create(final Mode mode,
|
||||
IAdHocTransactionService adHocTransactionService,
|
||||
IOrderDAO orderDAO, ITaskElementDAO taskElementDAO,
|
||||
IResourceDAO resourceDAO, IBack onBack) {
|
||||
IResourceDAO resourceDAO, Scenario currentScenario,
|
||||
IBack onBack) {
|
||||
return new AdvancedAllocationTabCreator(mode, adHocTransactionService,
|
||||
orderDAO, taskElementDAO, resourceDAO, onBack).build();
|
||||
orderDAO, taskElementDAO, resourceDAO, currentScenario, onBack)
|
||||
.build();
|
||||
}
|
||||
|
||||
private AdvancedAllocationTabCreator(Mode mode,
|
||||
IAdHocTransactionService adHocTransactionService,
|
||||
IOrderDAO orderDAO, ITaskElementDAO taskElementDAO,
|
||||
IResourceDAO resourceDAO, IBack onBack) {
|
||||
IResourceDAO resourceDAO, Scenario currentScenario, IBack onBack) {
|
||||
Validate.notNull(mode);
|
||||
Validate.notNull(adHocTransactionService);
|
||||
Validate.notNull(orderDAO);
|
||||
Validate.notNull(resourceDAO);
|
||||
Validate.notNull(onBack);
|
||||
Validate.notNull(currentScenario);
|
||||
this.adHocTransactionService = adHocTransactionService;
|
||||
this.orderDAO = orderDAO;
|
||||
this.mode = mode;
|
||||
this.onBack = onBack;
|
||||
this.taskElementDAO = taskElementDAO;
|
||||
this.resourceDAO = resourceDAO;
|
||||
this.currentScenario = currentScenario;
|
||||
}
|
||||
|
||||
private ITab build() {
|
||||
|
|
@ -277,6 +282,7 @@ public class AdvancedAllocationTabCreator {
|
|||
|
||||
private List<AllocationInput> createAllocationInputsFor(Order order) {
|
||||
Order orderReloaded = reload(order);
|
||||
orderReloaded.useSchedulingDataFor(currentScenario);
|
||||
return createAllocationsWithOrderReloaded(orderReloaded);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ import org.navalplanner.business.orders.entities.OrderElement;
|
|||
import org.navalplanner.business.planner.daos.ITaskElementDAO;
|
||||
import org.navalplanner.business.planner.entities.TaskElement;
|
||||
import org.navalplanner.business.resources.daos.IResourceDAO;
|
||||
import org.navalplanner.business.scenarios.IScenarioManager;
|
||||
import org.navalplanner.web.common.entrypoints.URLHandler;
|
||||
import org.navalplanner.web.common.entrypoints.URLHandlerRegistry;
|
||||
import org.navalplanner.web.limitingresources.LimitingResourcesController;
|
||||
|
|
@ -170,6 +171,9 @@ public class MultipleTabsPlannerController implements Composer,
|
|||
@Autowired
|
||||
private URLHandlerRegistry registry;
|
||||
|
||||
@Autowired
|
||||
private IScenarioManager scenarioManager;
|
||||
|
||||
private TabsConfiguration buildTabsConfiguration() {
|
||||
|
||||
Map<String, String[]> parameters = getURLQueryParametersMap();
|
||||
|
|
@ -233,7 +237,7 @@ public class MultipleTabsPlannerController implements Composer,
|
|||
final State<Void> typeChanged = typeChangedState();
|
||||
ITab advancedAllocation = doFeedbackOn(AdvancedAllocationTabCreator.create(mode,
|
||||
transactionService, orderDAO, taskElementDAO, resourceDAO,
|
||||
returnToPlanningTab()));
|
||||
scenarioManager.getCurrent(), returnToPlanningTab()));
|
||||
return TabsConfiguration.create()
|
||||
.add(tabWithNameReloading(planningTab, typeChanged))
|
||||
.add(tabWithNameReloading(resourceLoadTab, typeChanged))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue