Search in sources :

Example 1 with SourceHUsService

use of de.metas.handlingunits.sourcehu.SourceHUsService in project metasfresh-webui-api by metasfresh.

the class WEBUI_PP_Order_HUEditor_ProcessBase method retrieveEligibleHUEditorRows.

protected static final Stream<HUEditorRow> retrieveEligibleHUEditorRows(@NonNull final Stream<HUEditorRow> inputStream) {
    final SourceHUsService sourceHuService = SourceHUsService.get();
    final IHUPPOrderQtyDAO huPpOrderQtyDAO = Services.get(IHUPPOrderQtyDAO.class);
    return inputStream.filter(huRow -> huRow.isHUStatusActive()).filter(huRow -> !sourceHuService.isHuOrAnyParentSourceHu(huRow.getM_HU_ID())).filter(huRow -> !huPpOrderQtyDAO.isHuIdIssued(huRow.getM_HU_ID()));
}
Also used : HUEditorRow(de.metas.ui.web.handlingunits.HUEditorRow) IHUPPOrderQtyDAO(de.metas.handlingunits.pporder.api.IHUPPOrderQtyDAO) NonNull(lombok.NonNull) PPOrderLinesView(de.metas.ui.web.pporder.PPOrderLinesView) SourceHUsService(de.metas.handlingunits.sourcehu.SourceHUsService) HUEditorProcessTemplate(de.metas.ui.web.handlingunits.HUEditorProcessTemplate) Services(org.adempiere.util.Services) Stream(java.util.stream.Stream) Adempiere(org.compiere.Adempiere) Optional(java.util.Optional) HUEditorView(de.metas.ui.web.handlingunits.HUEditorView) IViewsRepository(de.metas.ui.web.view.IViewsRepository) ViewId(de.metas.ui.web.view.ViewId) SourceHUsService(de.metas.handlingunits.sourcehu.SourceHUsService) IHUPPOrderQtyDAO(de.metas.handlingunits.pporder.api.IHUPPOrderQtyDAO)

Example 2 with SourceHUsService

use of de.metas.handlingunits.sourcehu.SourceHUsService in project metasfresh-webui-api by metasfresh.

the class WEBUI_Picking_HUEditor_Create_M_Source_HUs method doIt.

@Override
protected String doIt() throws Exception {
    final SourceHUsService sourceHuService = SourceHUsService.get();
    retrieveEligibleHUEditorRows().forEach(huEditorRow -> {
        sourceHuService.addSourceHuMarker(huEditorRow.getM_HU_ID());
    });
    invalidateAndGoBackToPickingSlotsView();
    return MSG_OK;
}
Also used : SourceHUsService(de.metas.handlingunits.sourcehu.SourceHUsService)

Aggregations

SourceHUsService (de.metas.handlingunits.sourcehu.SourceHUsService)2 IHUPPOrderQtyDAO (de.metas.handlingunits.pporder.api.IHUPPOrderQtyDAO)1 HUEditorProcessTemplate (de.metas.ui.web.handlingunits.HUEditorProcessTemplate)1 HUEditorRow (de.metas.ui.web.handlingunits.HUEditorRow)1 HUEditorView (de.metas.ui.web.handlingunits.HUEditorView)1 PPOrderLinesView (de.metas.ui.web.pporder.PPOrderLinesView)1 IViewsRepository (de.metas.ui.web.view.IViewsRepository)1 ViewId (de.metas.ui.web.view.ViewId)1 Optional (java.util.Optional)1 Stream (java.util.stream.Stream)1 NonNull (lombok.NonNull)1 Services (org.adempiere.util.Services)1 Adempiere (org.compiere.Adempiere)1