| | |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 预测样本数据构造 |
| | |
| | | } |
| | | //补全数据 |
| | | ColumnItem columnItem = entry.getColumnItemList().get(i); |
| | | dataEntityList = super.completionData(matrix.length, dataEntityList, columnItem.startTime, columnItem.getEndTime(), columnItem.granularity); |
| | | // dataEntityList = super.completionData(matrix.length, dataEntityList, columnItem.startTime, columnItem.getEndTime(), columnItem.granularity); |
| | | dataEntityList = super.completionData(matrix.length, dataEntityList, columnItem.startTime, columnItem.endTime, columnItem.paramId,columnItem.getParamType()); |
| | | |
| | | /** 如果数据取不满,把缺失的数据点放在后面 */ |
| | | if (dataEntityList != null && dataEntityList.size() != 0) { |
| | |
| | | String paramType = columnItem.getParamType(); |
| | | switch (paramType) { |
| | | case "DATAPOINT": |
| | | ApiPointDTO point = dataPointApi.getPointById(columnItem.getId()); |
| | | ApiPointDTO point = dataPointApi.getInfoById(columnItem.getParamId()); |
| | | ApiPointValueQueryDTO queryDto = new ApiPointValueQueryDTO(); |
| | | queryDto.setPointNo(point.getPointNo()); |
| | | queryDto.setStart(columnItem.getStartTime()); |
| | | queryDto.setEnd(columnItem.getEndTime()); |
| | | List<ApiPointValueDTO> pointValueList = dataPointApi.getValue(queryDto); |
| | | dataList = ConvertUtils.sourceToTarget(pointValueList, DataValueVO.class); |
| | | List<ApiPointValueDTO> pointValueList = dataPointApi.queryPointHistoryValue(queryDto); |
| | | dataList = pointValueList.stream().map( t-> { |
| | | DataValueVO vo = new DataValueVO(); |
| | | vo.setDataTime(t.getT()); |
| | | vo.setDataValue(t.getV()); |
| | | return vo; |
| | | }).collect(Collectors.toList()); |
| | | break; |
| | | case "PREDICTITEM": |
| | | MmItemOutputVO outPut = itemEntityFactory.getItemOutPutById(columnItem.getId()); |