潘志宝
2024-11-13 a13dc8843bbf54dacca27254000865a539a87231
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));
        }