use of de.metas.inoutcandidate.api.ShipmentScheduleId in project metasfresh-webui-api by metasfresh.
the class WEBUI_Picking_HUEditor_Launcher method createHUsToPickView.
private IView createHUsToPickView() {
final PickingSlotView pickingSlotsView = getView();
final PickingSlotRowId pickingSlotRowId = getSingleSelectedRow().getPickingSlotRowId();
final ViewId pickingSlotViewId = pickingSlotsView.getViewId();
final ShipmentScheduleId shipmentScheduleId = pickingSlotsView.getCurrentShipmentScheduleId();
final CreateViewRequest createRequest = husToPickViewFactory.createViewRequest(pickingSlotViewId, pickingSlotRowId, shipmentScheduleId);
final IView husToPickView = viewsRepo.createView(createRequest);
return husToPickView;
}
use of de.metas.inoutcandidate.api.ShipmentScheduleId in project metasfresh-webui-api by metasfresh.
the class WEBUI_HUsToPick_PickCU method autoProcessPicking.
private void autoProcessPicking(final HuId splitCUId) {
final ShipmentScheduleId shipmentScheduleId = null;
pickingCandidateService.processForHUIds(ImmutableSet.of(splitCUId), shipmentScheduleId);
}
use of de.metas.inoutcandidate.api.ShipmentScheduleId in project metasfresh-webui-api by metasfresh.
the class PickingHURowsRepositoryTest method testRetrieveActiveSourceHusQuery_fromShipmentSchedules.
@Test
public void testRetrieveActiveSourceHusQuery_fromShipmentSchedules() {
final WarehouseId warehouseId = createWarehouse();
final ProductId productId = createProduct();
final ShipmentScheduleId shipmentScheduleId1 = createShipmentSchedule(warehouseId, productId);
final ShipmentScheduleId shipmentScheduleId2 = createShipmentSchedule(warehouseId, productId);
final MatchingSourceHusQuery query = PickingHURowsRepository.createMatchingSourceHusQuery(PickingSlotRepoQuery.builder().currentShipmentScheduleId(shipmentScheduleId1).shipmentScheduleId(shipmentScheduleId1).shipmentScheduleId(shipmentScheduleId2).build());
assertThat(query.getWarehouseId()).isEqualTo(warehouseId);
assertThat(query.getProductIds()).containsExactly(productId);
}
use of de.metas.inoutcandidate.api.ShipmentScheduleId in project metasfresh-webui-api by metasfresh.
the class PickingSlotViewRepositoryTests method testRetrievePickingSlotRows_No_HUs_show_PickingSlotsOnly.
/**
* Verifies {@link PickingSlotViewRepository#retrieveRows(PickingSlotRepoQuery)}<br>
* when there are no HUs (no picking candidates) assigned to a picking slot, but still the picking slot itself shall be shown.
*/
@Test
public void testRetrievePickingSlotRows_No_HUs_show_PickingSlotsOnly() {
final ShipmentScheduleId shipmentScheduleId = createShipmentSchedule();
createPickingSlot(pickingSlot -> {
pickingSlot.setIsPickingRackSystem(true);
});
Mockito.when(pickingHUsRepo.retrievePickedHUsIndexedByPickingSlotId(PickingCandidatesQuery.builder().shipmentScheduleId(shipmentScheduleId).onlyNotClosedOrNotRackSystem(true).build())).thenReturn(ImmutableListMultimap.of());
final PickingSlotViewRepository pickingSlotViewRepository = createPickingSlotViewRepository();
final PickingSlotRepoQuery query = PickingSlotRepoQuery.of(shipmentScheduleId);
final List<PickingSlotRow> pickingSlotRows = pickingSlotViewRepository.retrievePickingSlotRows(query);
// even if there are no HUs, there shall still be a row for our picking slot.
assertThat(pickingSlotRows).hasSize(1);
final PickingSlotRow pickingSlotRow = pickingSlotRows.get(0);
assertThat(pickingSlotRow.getType()).isEqualTo(PickingSlotRowType.forPickingSlotRow());
}
Aggregations