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

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

import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessStandardSampleProjectDO;

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

@Data
public class BusinessStandardSampleExtendRespVO extends BusinessStandardSampleRespVO {
	
    private Long configQCSampleMethodId;
	
	private String standardSampleProjects;
	
	public String getStandardSampleProjects() {
		if (CollUtil.isNotEmpty(this.standardSampleProjectList)) {
			return this.standardSampleProjectList.stream().map(m -> m.getDictionaryProjectName() + "(" + m.getDictionaryProjectUnit() + "):" + m.getStandardValue()).collect(Collectors.joining(","));
		}
		return null;
	}

	private List<BusinessStandardSampleProjectDO> standardSampleProjectList;
}
