| | |
| | | package com.iailab.module.model.mdk.sample; |
| | | |
| | | import com.iailab.module.data.api.ind.IndItemApi; |
| | | import com.iailab.module.data.api.ind.dto.ApiIndItemDTO; |
| | | import com.iailab.module.data.api.plan.PlanItemApi; |
| | | import com.iailab.module.data.api.plan.dto.ApiPlanItemDTO; |
| | | import com.iailab.module.data.api.point.DataPointApi; |
| | |
| | | @Autowired |
| | | private PlanItemApi planItemApi; |
| | | |
| | | @Autowired |
| | | private IndItemApi indItemApi; |
| | | |
| | | /** |
| | | * 返回样本矩阵的列数 |
| | | * |
| | |
| | | Set<String> planIds = modelInputParamEntityList.stream().filter(e -> ModelParamType.getEumByCode(e.getModelparamtype()).equals(ModelParamType.PLAN)).map(MmModelParamEntity::getModelparamid).collect(Collectors.toSet()); |
| | | List<ApiPlanItemDTO> plans = planItemApi.getInfoByIds(planIds); |
| | | Map<String, ApiPlanItemDTO> planMap = plans.stream().collect(Collectors.toMap(ApiPlanItemDTO::getId, Function.identity(), (e1, e2) -> e1)); |
| | | // 统一获取指标数据的信息 |
| | | Set<String> indIds = modelInputParamEntityList.stream().filter(e -> ModelParamType.getEumByCode(e.getModelparamtype()).equals(ModelParamType.IND) || ModelParamType.getEumByCode(e.getModelparamtype()).equals(ModelParamType.IND_ASCII)).map(MmModelParamEntity::getModelparamid).collect(Collectors.toSet()); |
| | | List<ApiIndItemDTO> inds = indItemApi.getInfoByIds(indIds); |
| | | Map<String, ApiIndItemDTO> indMap = inds.stream().collect(Collectors.toMap(ApiIndItemDTO::getId, Function.identity(), (e1, e2) -> e1)); |
| | | |
| | | for (MmModelParamEntity entry : modelInputParamEntityList) { |
| | | columnInfo.setParamType(entry.getModelparamtype()); |
| | |
| | | columnInfo.setDataLength(super.getDataLength(dynamicDataLength, entry.getModelparamportorder(), entry.getDatalength())); |
| | | columnInfo.setModelParamOrder(entry.getModelparamorder()); |
| | | columnInfo.setModelParamPortOrder(entry.getModelparamportorder()); |
| | | columnInfo.setStartTime(getStartTime(columnInfo, predictTime, pointMap, planMap)); |
| | | columnInfo.setEndTime(getEndTime(columnInfo, predictTime, pointMap, planMap)); |
| | | columnInfo.setGranularity(super.getGranularity(columnInfo, pointMap, planMap)); |
| | | columnInfo.setGranularity(super.getGranularity(columnInfo, pointMap, planMap,indMap)); |
| | | columnInfo.setStartTime(getStartTime(columnInfo, predictTime)); |
| | | columnInfo.setEndTime(getEndTime(columnInfo, predictTime)); |
| | | |
| | | //对每一个爪进行数据项归并 |
| | | if (curPortOrder != entry.getModelparamportorder()) { |
| | |
| | | sampleInfo.setColumnInfo(resultList); |
| | | sampleInfo.setPointMap(pointMap); |
| | | sampleInfo.setPlanMap(planMap); |
| | | sampleInfo.setIndMap(indMap); |
| | | return sampleInfo; |
| | | } |
| | | |