提交 | 用户 | 时间
|
a6de49
|
1 |
package com.iailab.module.model.sample.constructor; |
H |
2 |
|
|
3 |
|
|
4 |
import com.iailab.module.model.sample.dto.SampleData; |
|
5 |
import com.iailab.module.model.sample.dto.SampleInfo; |
|
6 |
import lombok.extern.slf4j.Slf4j; |
|
7 |
import javax.annotation.Resource; |
|
8 |
import org.springframework.stereotype.Component; |
|
9 |
|
|
10 |
import java.util.ArrayList; |
|
11 |
import java.util.Date; |
|
12 |
import java.util.List; |
|
13 |
|
|
14 |
/** |
|
15 |
* 样本构造 |
|
16 |
* |
|
17 |
* @author PanZhibao |
|
18 |
* @Description |
|
19 |
* @createTime 2023年05月16日 15:17:00 |
|
20 |
*/ |
|
21 |
@Slf4j |
|
22 |
@Component |
|
23 |
public class SampleConstructor { |
|
24 |
|
|
25 |
@Resource |
|
26 |
private SampleInfoConstructor sampleInfoConstructor; |
|
27 |
|
|
28 |
@Resource |
|
29 |
private SampleDataConstructor sampleDataConstructor; |
|
30 |
|
|
31 |
public List<SampleData> constructSample(String modelId, Date runTime) { |
|
32 |
List<SampleData> list = new ArrayList<>(); |
|
33 |
try { |
|
34 |
SampleInfo sampleInfo = sampleInfoConstructor.prepareSampleInfo(modelId, runTime); |
|
35 |
list = sampleDataConstructor.prepareSampleData(sampleInfo); |
|
36 |
} catch (Exception ex) { |
|
37 |
ex.printStackTrace(); |
|
38 |
log.error("constructSample:" + ex.getMessage()); |
|
39 |
} |
|
40 |
return list; |
|
41 |
} |
|
42 |
} |