package com.zt.plat.module.qms.business.bus.controller.vo;

import java.util.List;
import java.util.stream.Collectors;

import cn.hutool.core.collection.CollUtil;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
public class BatchResultDataReportingReqVO {
	
	private List<BusinessSubParentSampleIdAndRetestCount> businessSubParentSampleIdAndRetestCounts;
		
	private Long configAssayMethodId;
	
	public List<Long> getBusinessSubParentSampleIds() {
		if (CollUtil.isEmpty(this.businessSubParentSampleIdAndRetestCounts)) {
			return null;
		}
		return this.businessSubParentSampleIdAndRetestCounts.stream().map(m -> m.getBusinessSubParentSampleId()).collect(Collectors.toList());
	}
	
	@Data
	@NoArgsConstructor
	@AllArgsConstructor
	public static class BusinessSubParentSampleIdAndRetestCount {
		
		private Long businessSubParentSampleId;
		
		private Integer retestCount;
	}
}
