Untitled

 avatar
wyc1230
plain_text
a month ago
740 B
6
Indexable
	private List<StreamBatchInfoDTO> createBatch(
			List<MultiStreamBatchDTO> batchList,
			MultiOptimizationContext context) {

		List<StreamBatchInfoDTO> batchInfoList = batchList.stream()
				.filter(this::isPushAvailableBatch)
				.map(batch -> asStreamBatchInfoDTO(batch, context))
				.filter(batch -> CollectionUtils.isNotEmpty(batch.getPickerJobDTOList()))
				.collect(Collectors.toList());
		if (CollectionUtils.isEmpty(batchInfoList)) {
			return null;
		}
		List<StreamBatchInfoDTO> result = Lists.newArrayList();
		for (StreamBatchInfoDTO batchInfo : batchInfoList) {
            callOutboundCreateBatchApi(context.getProcessPath(), context.getNow(), Lists.newArrayList(batchInfo), context.getTraceId());
		}
		return result;
	}
Leave a Comment