From 11a7424fd4e119e5094764bf19cc359e2b3eb76d Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期四, 02 一月 2025 16:39:44 +0800 Subject: [PATCH] 模型结果异常 显示 --- iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/schedule/impl/ScheduleModelHandlerImpl.java | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/schedule/impl/ScheduleModelHandlerImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/schedule/impl/ScheduleModelHandlerImpl.java index e12bcb0..ec0e7b0 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/schedule/impl/ScheduleModelHandlerImpl.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/schedule/impl/ScheduleModelHandlerImpl.java @@ -93,10 +93,14 @@ //IAILMDK.run HashMap<String, Object> modelResult = DllUtils.run(newModelBean, param2Values, scheduleScheme.getMpkprojectid()); if (!modelResult.containsKey(CommonConstant.MDK_STATUS_CODE) || !modelResult.containsKey(CommonConstant.MDK_RESULT)) { - throw new RuntimeException("模型结果异常:" + modelResult); + log.info("模型结果异常:" + modelResult); } String statusCode = modelResult.get(CommonConstant.MDK_STATUS_CODE).toString(); - HashMap<String, Object> result = (HashMap<String, Object>) modelResult.get(CommonConstant.MDK_RESULT); + HashMap<String, Object> result = new HashMap<>(); + if (modelResult.containsKey(CommonConstant.MDK_RESULT) && modelResult.get(CommonConstant.MDK_RESULT) != null && + CommonConstant.MDK_STATUS_100.equals(modelResult.get(CommonConstant.MDK_STATUS_CODE).toString())) { + result = (HashMap<String, Object>) modelResult.get(CommonConstant.MDK_RESULT); + } //打印结果 JSONObject jsonObjResult = new JSONObject(); jsonObjResult.put("result", result); -- Gitblit v1.9.3