潘志宝
2 天以前 9bcefe6dd1c1634c48f5eb1a7e6fb13c8a2ac8ce
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/predict/PredictModuleHandler.java
@@ -69,6 +69,7 @@
            } else if (PredGranularityEnum.D1.getCode().equals(predictItem.getGranularity())) {
                calendar.set(Calendar.MINUTE, 0);
                calendar.set(Calendar.HOUR_OF_DAY, 0);
                // calendar.add(Calendar.DAY_OF_YEAR, 1);//天粒度数据23:58分插入,运行时间改为第二天
            }
            PredictResultVO predictResult;
            if (!predictItem.getStatus().equals(ItemStatus.STATUS1.getCode())) {
@@ -119,7 +120,7 @@
        }
    }
    public void predictAdjust(ItemVO predictItem, Date predictTime, List<StAdjustDeviationDTO> deviationList, String scheduleModelId) {
    public void predictAdjust(ItemVO predictItem, Date predictTime, List<StAdjustDeviationDTO> deviationList, String scheduleModelId, String configId) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(predictTime);
        calendar.set(Calendar.MILLISECOND, 0);
@@ -134,9 +135,11 @@
        try {
            PredictItemHandler predictItemHandler = predictItemFactory.create(predictItem.getId());
            PredictResultVO predictResult = predictItemHandler.predictAdjust(calendar.getTime(), predictItem, deviationList);
            predictResult.setGranularity(predictItem.getGranularity());
            predictResult.setSaveIndex(predictItem.getSaveIndex());
            // 保存预测结果
            predictResultHandler.savePredictAdjustResult(predictResult, JSONArray.toJSONString(deviationList), scheduleModelId);
            predictResultHandler.savePredictAdjustResult(predictResult, JSONArray.toJSONString(deviationList), scheduleModelId,configId);
        } catch (Exception e) {
            e.printStackTrace();
            log.error(MessageFormat.format("预测项编号:{0},预测项名称:{1},预测失败:{2} 预测时刻:{3}",