use of uk.ac.bbsrc.tgac.miso.core.service.PoolService in project miso-lims by miso-lims.
the class SequencingOrderRestController method search.
@GetMapping(value = "/sequencingorders/search")
@ResponseBody
public List<SequencingOrderDto> search(@RequestParam long poolId, @RequestParam long purposeId, @RequestParam(required = false) Long containerModelId, @RequestParam long parametersId, @RequestParam int partitions) throws IOException {
Pool pool = getOrThrow(poolService, poolId, "Pool");
RunPurpose purpose = getOrThrow(runPurposeService, purposeId, "Run purpose");
SequencingContainerModel containerModel = containerModelId == null ? null : getOrThrow(containerModelService, containerModelId, "Container model");
SequencingParameters parameters = getOrThrow(sequencingParametersService, parametersId, "Sequencing parameters");
List<SequencingOrder> results = sequencingOrderService.listByAttributes(pool, purpose, containerModel, parameters, partitions);
return results.stream().map(so -> Dtos.asDto(so, indexChecker)).collect(Collectors.toList());
}
Aggregations