From a6e46fe2b5729e7468b6f3c4e079232801c22520 Mon Sep 17 00:00:00 2001 From: dengzedong <dengzedong@email> Date: 星期一, 16 十二月 2024 18:19:37 +0800 Subject: [PATCH] 模型输出类型添加double类型 --- iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmItemResultServiceImpl.java | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmItemResultServiceImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmItemResultServiceImpl.java index 99455b0..26ec871 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmItemResultServiceImpl.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmItemResultServiceImpl.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.iailab.framework.common.util.date.DateUtils; import com.iailab.module.model.mcs.pre.dao.MmItemResultDao; +import com.iailab.module.model.mcs.pre.entity.MmItemOutputEntity; import com.iailab.module.model.mcs.pre.entity.MmItemResultEntity; import com.iailab.module.model.mcs.pre.entity.MmItemResultJsonEntity; import com.iailab.module.model.mcs.pre.service.MmItemResultService; @@ -138,4 +139,19 @@ }); return result; } + + @Override + public void savePredictValue(Map<MmItemOutputEntity, Double> predictDoubleValues, Date predictTime) { + for (Map.Entry<MmItemOutputEntity, Double> entry : predictDoubleValues.entrySet()) { + MmItemResultJsonEntity resultJson = new MmItemResultJsonEntity(); + resultJson.setId(UUID.randomUUID().toString()); + resultJson.setOutputid(entry.getKey().getId()); + resultJson.setPredicttime(predictTime); + resultJson.setCumulant(String.valueOf(entry.getValue())); + Map<String, Object> map4 = new HashMap(2); + map4.put("TABLENAME", "T_MM_ITEM_RESULT_JSON"); + map4.put("entity", resultJson); + mmItemResultDao.savePredictJsonValue(map4); + } + } } -- Gitblit v1.9.3