From 7f0bcd00c556889ba890e5e68c681f1b5d4267e1 Mon Sep 17 00:00:00 2001
From: dengzedong <dengzedong@email>
Date: 星期四, 19 十二月 2024 18:07:20 +0800
Subject: [PATCH] 预测项状态添加模型结果异常

---
 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/predict/impl/PredictModelHandlerImpl.java |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/predict/impl/PredictModelHandlerImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/predict/impl/PredictModelHandlerImpl.java
index c39f706..f2c3cef 100644
--- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/predict/impl/PredictModelHandlerImpl.java
+++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/predict/impl/PredictModelHandlerImpl.java
@@ -9,6 +9,7 @@
 import com.iailab.module.model.mcs.pre.entity.MmItemOutputEntity;
 import com.iailab.module.model.mcs.pre.entity.MmModelArithSettingsEntity;
 import com.iailab.module.model.mcs.pre.entity.MmPredictModelEntity;
+import com.iailab.module.model.mcs.pre.enums.ItemRunStatusEnum;
 import com.iailab.module.model.mcs.pre.service.MmItemOutputService;
 import com.iailab.module.model.mcs.pre.service.MmModelArithSettingsService;
 import com.iailab.module.model.mdk.common.enums.TypeA;
@@ -55,7 +56,7 @@
      * @throws ModelInvokeException
      */
     @Override
-    public synchronized PredictResultVO predictByModel(Date predictTime, MmPredictModelEntity predictModel,String itemName) throws ModelInvokeException {
+    public synchronized PredictResultVO predictByModel(Date predictTime, MmPredictModelEntity predictModel,String itemName, ItemRunStatusEnum itemRunStatusEnum) throws ModelInvokeException {
         PredictResultVO result = new PredictResultVO();
         if (predictModel == null) {
             throw new ModelInvokeException("modelEntity is null");
@@ -99,6 +100,7 @@
             HashMap<String, Object> modelResult = DllUtils.run(newModelBean, param2Values, predictModel.getMpkprojectid());
             if (!modelResult.containsKey(CommonConstant.MDK_STATUS_CODE) || !modelResult.containsKey(CommonConstant.MDK_RESULT) ||
                     !modelResult.get(CommonConstant.MDK_STATUS_CODE).toString().equals(CommonConstant.MDK_STATUS_100)) {
+                itemRunStatusEnum = ItemRunStatusEnum.MODELRESULTERROR;
                 throw new RuntimeException("模型结果异常:" + modelResult);
             }
             modelResult = (HashMap<String, Object>) modelResult.get(CommonConstant.MDK_RESULT);

--
Gitblit v1.9.3