From b1d2bc853052c59eda04d74b9b5ecbddfc2ce326 Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期五, 03 一月 2025 14:14:43 +0800 Subject: [PATCH] predictTime格式异常修复 --- shasteel-biz/src/main/java/com/iailab/module/shasteel/job/task/RunPredictModuleTask.java | 3 ++- shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/consumer/ModelPredictFinishConsumer.java | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/shasteel-biz/src/main/java/com/iailab/module/shasteel/job/task/RunPredictModuleTask.java b/shasteel-biz/src/main/java/com/iailab/module/shasteel/job/task/RunPredictModuleTask.java index 588f27f..9365cfc 100644 --- a/shasteel-biz/src/main/java/com/iailab/module/shasteel/job/task/RunPredictModuleTask.java +++ b/shasteel-biz/src/main/java/com/iailab/module/shasteel/job/task/RunPredictModuleTask.java @@ -1,5 +1,6 @@ package com.iailab.module.shasteel.job.task; +import com.iailab.framework.common.util.date.DateUtils; import com.iailab.module.model.api.mdk.MdkApi; import com.iailab.module.model.api.mdk.dto.MdkPredictReqDTO; import com.iailab.module.shasteel.mq.common.constant.RoutingConstant; @@ -52,7 +53,7 @@ logger.info(type + "模块预测完成。"); Map<String, Object> msg = new HashMap<>(); msg.put("moduleType", type); - msg.put("predictTime", predictTime); + msg.put("predictTime", DateUtils.format(predictTime, DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)); rabbitTemplate.convertAndSend(RoutingConstant.EXCHANGE, RoutingConstant.Iailab_Model_PredictFinish, msg); }); } catch (Exception ex) { diff --git a/shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/consumer/ModelPredictFinishConsumer.java b/shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/consumer/ModelPredictFinishConsumer.java index a989569..802d502 100644 --- a/shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/consumer/ModelPredictFinishConsumer.java +++ b/shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/consumer/ModelPredictFinishConsumer.java @@ -60,14 +60,14 @@ if (CollectionUtils.isEmpty(configList)) { return; } - List<String> OutputIdList = new ArrayList<>(); + List<String> outputIdList = new ArrayList<>(); configList.forEach(item -> { - OutputIdList.add(item.getOutId()); + outputIdList.add(item.getOutId()); }); configList.forEach(item -> { PreDataJsonReqVO reqVO = new PreDataJsonReqVO(); reqVO.setPredictTime(DateUtils.parse(messageJson.get("predictTime").toString(), DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)); - reqVO.setOutputIdList(OutputIdList); + reqVO.setOutputIdList(outputIdList); Map<String, List<Object[]>> preData = mcsApi.getPreDataCur(reqVO); if (CollectionUtils.isEmpty(preData)) { return; -- Gitblit v1.9.3