dengzedong
2024-12-25 037fb7228bdcb0909a6c8109adfae861cd9067f1
double类型特殊处理
已修改1个文件
31 ■■■■ 文件已修改
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/sample/PredictSampleDataConstructor.java 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/sample/PredictSampleDataConstructor.java
@@ -150,24 +150,21 @@
                MmItemOutputEntity outPut = mmItemOutputService.getOutPutById(columnItem.getParamId());
                OutResultType outResultType = OutResultType.getEumByCode(outPut.getResultType());
                List<DataValueVO> predictValue = new ArrayList<>();
                switch (outResultType) {
                    case D1:
                    case D2:
                        predictValue = mmItemResultService.getPredictValue(outPut.getId(), columnItem.getStartTime(), columnItem.getEndTime());
                        break;
                    case D:
                        // columnItem.getStartTime()就是预测时间
                        String doubleData = mmItemResultJsonService.getDoubleData(outPut.getId(), columnItem.getStartTime());
                        if (StringUtils.isNotBlank(doubleData)) {
                            DataValueVO dataValueVO = new DataValueVO();
                            dataValueVO.setDataTime(columnItem.getStartTime());
                            dataValueVO.setDataValue(Double.valueOf(doubleData));
                            predictValue.add(dataValueVO);
                        }
                        break;
                    default:
                        break;
                // double类型特殊处理
                if (outResultType.equals(OutResultType.D)) {
                    // columnItem.getStartTime()就是预测时间
                    String doubleData = mmItemResultJsonService.getDoubleData(outPut.getId(), columnItem.getStartTime());
                    if (StringUtils.isNotBlank(doubleData)) {
                        DataValueVO dataValueVO = new DataValueVO();
                        dataValueVO.setDataTime(columnItem.getStartTime());
                        dataValueVO.setDataValue(Double.valueOf(doubleData));
                        predictValue.add(dataValueVO);
                    }
                } else {
                    predictValue = mmItemResultService.getPredictValue(outPut.getId(), columnItem.getStartTime(), columnItem.getEndTime());
                }
                if (CollectionUtils.isEmpty(predictValue)) {
                    break;
                }