use of de.metas.ui.web.order.products_proposal.model.ProductsProposalRowsData in project metasfresh-webui-api by metasfresh.
the class BasePLVProductsProposalViewFactory method createView.
public final ProductsProposalView createView(@NonNull final ProductsProposalView parentView) {
final PriceListVersionId basePriceListVersionId = parentView.getBasePriceListVersionIdOrFail();
final ProductsProposalRowsData rowsData = ProductsProposalRowsLoader.builder().bpartnerProductStatsService(bpartnerProductStatsService).priceListVersionId(basePriceListVersionId).productIdsToExclude(parentView.getProductIds()).bpartnerId(parentView.getBpartnerId().orElse(null)).soTrx(parentView.getSoTrx()).build().load();
logger.debug("loaded ProductsProposalRowsData with size={} for basePriceListVersionId={}", basePriceListVersionId, rowsData.size());
final ProductsProposalView view = ProductsProposalView.builder().windowId(getWindowId()).rowsData(rowsData).processes(getRelatedProcessDescriptors()).initialViewId(parentView.getInitialViewId()).build();
put(view);
return view;
}
use of de.metas.ui.web.order.products_proposal.model.ProductsProposalRowsData in project metasfresh-webui-api by metasfresh.
the class OtherSalePricesProductsProposalViewFactory method createView.
public final ProductsProposalView createView(@NonNull final ProductsProposalView parentView, @NonNull final List<ProductsProposalRow> selectedRows) {
final ImmutableSet<ProductId> productIds = selectedRows.stream().map(ProductsProposalRow::getProductId).collect(ImmutableSet.toImmutableSet());
final ProductsProposalRowsData rowsData = RowsLoader.builder().bpartnerProductStatsService(bpartnerProductStatsService).moneyService(moneyService).excludeBPartnerId(parentView.getBpartnerId().orElse(null)).productIds(productIds).build().load();
final ProductsProposalView view = ProductsProposalView.builder().windowId(getWindowId()).rowsData(rowsData).processes(getRelatedProcessDescriptors()).initialViewId(parentView.getInitialViewId()).build();
put(view);
return view;
}
Aggregations