From 271fed395d4d3e4ab8cdb44ccf466859ba485e46 Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期四, 09 一月 2025 17:45:33 +0800 Subject: [PATCH] Merge branch 'master' of http://dlindusit.com:53929/r/iailab-plat --- iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/McsApiImpl.java | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/McsApiImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/McsApiImpl.java index d918e48..fcf9866 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/McsApiImpl.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/McsApiImpl.java @@ -253,20 +253,20 @@ if (startTime == null) { Calendar calendar = Calendar.getInstance(); calendar.setTime(predictItem.getLastTime()); - calendar.add(Calendar.MINUTE, -1 * predictItem.getPredictLength()); + calendar.add(Calendar.SECOND, -1 * predictItem.getPredictLength() * predictItem.getGranularity()); startTime = calendar.getTime(); } Date endTime = reqVO.getEndTime(); if (endTime == null) { Calendar calendar = Calendar.getInstance(); calendar.setTime(predictItem.getLastTime()); - calendar.add(Calendar.MINUTE, predictItem.getPredictLength()); + calendar.add(Calendar.SECOND, predictItem.getPredictLength() * predictItem.getGranularity()); endTime = calendar.getTime(); } if (endTime.getTime() <= startTime.getTime()) { Calendar calendar = Calendar.getInstance(); calendar.setTime(startTime); - calendar.add(Calendar.MINUTE, predictItem.getPredictLength()); + calendar.add(Calendar.SECOND, predictItem.getPredictLength() * predictItem.getGranularity()); endTime = calendar.getTime(); } -- Gitblit v1.9.3