潘志宝
2024-11-13 a13dc8843bbf54dacca27254000865a539a87231
预测项调用问题修复
已修改2个文件
11 ■■■■■ 文件已修改
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/predict/impl/PredictItemNormalHandlerImpl.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/controller/admin/MpkFileController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/predict/impl/PredictItemNormalHandlerImpl.java
@@ -38,7 +38,6 @@
    public PredictResultVO predict(Date predictTime, ItemVO predictItemDto)
            throws ItemInvokeException{
        String itemId = predictItemDto.getId();
        ItemPredictStatus itemStatus = ItemPredictStatus.PREDICTING;
        PredictResultVO finalResult = new PredictResultVO();
        PredictResultVO predictResult = new PredictResultVO();
        List<PredictResultVO> predictResultList = new ArrayList<>();
@@ -54,17 +53,15 @@
                predictResult.setPredictId(itemId);
                predictResultList.add(predictResult);
            }
            itemStatus = ItemPredictStatus.SUCCESS;
            Calendar calendar = Calendar.getInstance();
            /*Calendar calendar = Calendar.getInstance();
            calendar.setTime(predictTime);
            calendar.add(Calendar.MINUTE, predictResult.getPredictMatrix().length - 1);
            Timestamp endTime = new Timestamp(calendar.getTime().getTime());
            Timestamp endTime = new Timestamp(calendar.getTime().getTime());*/
            finalResult = predictResultList.get(0);
        } catch (Exception ex) {
            ex.printStackTrace();
            //预测项预测失败的状态
            itemStatus = ItemPredictStatus.FAILED;
            throw new ItemInvokeException(MessageFormat.format("{0},itemId={1}",
                    ItemInvokeException.errorItemFailed, itemId));
        }
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/controller/admin/MpkFileController.java
@@ -70,7 +70,7 @@
                dto.setGroupName(dto.getMenuAndGroup().get(1));
            }
        }
        dto.setPyModule(packService.getModelPath(dto.getClassName()));
        dto.setPyModule(packService.getModelPath(dto.getPkgName()));
        mpkFileService.save(dto);
        return CommonResult.success(true);
    }
@@ -91,7 +91,7 @@
                dto.setGroupName(dto.getMenuAndGroup().get(1));
            }
        }
        dto.setPyModule(packService.getModelPath(dto.getClassName()));
        dto.setPyModule(packService.getModelPath(dto.getPkgName()));
        mpkFileService.update(dto);
        return CommonResult.success(true);
    }