package com.iailab.module.model.sample.constructor;
|
|
|
import com.iailab.module.model.sample.dto.SampleData;
|
import com.iailab.module.model.sample.dto.SampleInfo;
|
import lombok.extern.slf4j.Slf4j;
|
import javax.annotation.Resource;
|
import org.springframework.stereotype.Component;
|
|
import java.util.ArrayList;
|
import java.util.Date;
|
import java.util.List;
|
|
/**
|
* 样本构造
|
*
|
* @author PanZhibao
|
* @Description
|
* @createTime 2023年05月16日 15:17:00
|
*/
|
@Slf4j
|
@Component
|
public class SampleConstructor {
|
|
@Resource
|
private SampleInfoConstructor sampleInfoConstructor;
|
|
@Resource
|
private SampleDataConstructor sampleDataConstructor;
|
|
public List<SampleData> constructSample(String modelId, Date runTime) {
|
List<SampleData> list = new ArrayList<>();
|
try {
|
SampleInfo sampleInfo = sampleInfoConstructor.prepareSampleInfo(modelId, runTime);
|
list = sampleDataConstructor.prepareSampleData(sampleInfo);
|
} catch (Exception ex) {
|
ex.printStackTrace();
|
log.error("constructSample:" + ex.getMessage());
|
}
|
return list;
|
}
|
}
|