Search in sources :

Example 1 with PickingHUsQuery

use of de.metas.handlingunits.picking.IHUPickingSlotBL.PickingHUsQuery in project metasfresh-webui-api by metasfresh.

the class WEBUI_Picking_With_M_Source_HU_Base method checkSourceHuPrecondition.

protected final boolean checkSourceHuPrecondition() {
    final I_M_ShipmentSchedule shipmentSchedule = getView().getCurrentShipmentSchedule();
    final PickingHUsQuery query = PickingHUsQuery.builder().onlyIfAttributesMatchWithShipmentSchedules(true).shipmentSchedules(ImmutableList.of(shipmentSchedule)).onlyTopLevelHUs(true).build();
    final IHUPickingSlotBL huPickingSlotBL = Services.get(IHUPickingSlotBL.class);
    final List<I_M_HU> sourceHUs = huPickingSlotBL.retrieveAvailableSourceHUs(query);
    return !sourceHUs.isEmpty();
}
Also used : IHUPickingSlotBL(de.metas.handlingunits.picking.IHUPickingSlotBL) I_M_HU(de.metas.handlingunits.model.I_M_HU) I_M_ShipmentSchedule(de.metas.inoutcandidate.model.I_M_ShipmentSchedule) PickingHUsQuery(de.metas.handlingunits.picking.IHUPickingSlotBL.PickingHUsQuery)

Example 2 with PickingHUsQuery

use of de.metas.handlingunits.picking.IHUPickingSlotBL.PickingHUsQuery in project metasfresh-webui-api by metasfresh.

the class WEBUI_Picking_HUEditor_Launcher method retrieveAvailableHuIdsForCurrentShipmentScheduleId.

private List<Integer> retrieveAvailableHuIdsForCurrentShipmentScheduleId() {
    final int shipmentScheduleId = getView().getCurrentShipmentScheduleId();
    final PickingHUsQuery query = PickingHUsQuery.builder().shipmentSchedule(loadOutOfTrx(shipmentScheduleId, I_M_ShipmentSchedule.class)).onlyTopLevelHUs(false).onlyIfAttributesMatchWithShipmentSchedules(true).build();
    final List<Integer> availableHUIdsToPick = huPickingSlotBL.retrieveAvailableHUIdsToPick(query);
    return availableHUIdsToPick;
}
Also used : PickingHUsQuery(de.metas.handlingunits.picking.IHUPickingSlotBL.PickingHUsQuery)

Aggregations

PickingHUsQuery (de.metas.handlingunits.picking.IHUPickingSlotBL.PickingHUsQuery)2 I_M_HU (de.metas.handlingunits.model.I_M_HU)1 IHUPickingSlotBL (de.metas.handlingunits.picking.IHUPickingSlotBL)1 I_M_ShipmentSchedule (de.metas.inoutcandidate.model.I_M_ShipmentSchedule)1