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();
}
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;
}
Aggregations