| | |
| | | PRIMARY KEY (`id`) USING BTREE, |
| | | INDEX `ind_i_time_id`(`i_time_id` ASC) USING BTREE |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='电价时段配置数据'; |
| | | |
| | | |
| | | alter table t_mm_predict_item add column `iscumulant` tinyint default false COMMENT '是否累计'; |
| | | alter table t_mm_predict_item add column `cumuldivisor` int default 60 COMMENT '累计除数'; |
| | | alter table t_mm_predict_item add column `cumulpoint` varchar(36) DEFAULT NULL, COMMENT '累计测点'; |
| | |
| | | * 保留的预测点位 (T+2 则n=2, T+30则n=30, T+n则表示从最后点位开始,n=预测长度;n由系统配置得出) |
| | | */ |
| | | private String saveindex; |
| | | |
| | | /** |
| | | * 是否累计 |
| | | */ |
| | | private Integer iscumulant; |
| | | |
| | | /** |
| | | * 累计除数 |
| | | */ |
| | | private Integer cumuldivisor; |
| | | |
| | | /** |
| | | * 累计测点 |
| | | */ |
| | | private String cumulpoint; |
| | | } |
| | |
| | | resultJson.setPredicttime(predictTime); |
| | | List<Double> jsonValueList = entry.getValue().stream().map(valueVO -> valueVO.getDataValue()).collect(Collectors.toList()); |
| | | resultJson.setJsonvalue(JSONArray.toJSONString(jsonValueList)); |
| | | resultJson.setCumulant(""); |
| | | resultJsonList.add(resultJson); |
| | | } |
| | | // json结果存入mysql |
| | |
| | | @Override |
| | | public void update(MmPredictItemDTO mmPredictItemDto) { |
| | | MmPredictItemEntity predictItem = mmPredictItemDto.getMmPredictItem(); |
| | | predictItem.setCumulpoint(predictItem.getCumulpoint() == null? "" : predictItem.getCumulpoint()); |
| | | predictItem.setUpdateTime(new Date()); |
| | | mmPredictItemDao.updateById(predictItem); |
| | | MmItemTypeEntity itemType = mmItemTypeImpl.getById(predictItem.getItemtypeid()); |
| | |
| | | if (!CollectionUtils.isEmpty(predictResult.getPredictList())) { |
| | | return predictLists; |
| | | } |
| | | Map<com.iailab.module.model.mcs.pre.entity.MmItemOutputEntity, double[]> predictMatrixs = predictResult.getPredictMatrixs(); |
| | | for (Map.Entry<com.iailab.module.model.mcs.pre.entity.MmItemOutputEntity, double[]> entry : predictMatrixs.entrySet()) { |
| | | Map<MmItemOutputEntity, double[]> predictMatrixs = predictResult.getPredictMatrixs(); |
| | | for (Map.Entry<MmItemOutputEntity, double[]> entry : predictMatrixs.entrySet()) { |
| | | Integer rows = entry.getValue().length; |
| | | List<DataValueVO> predictDataList = new ArrayList<>(); |
| | | Calendar calendar = Calendar.getInstance(); |