From 5f653cd83425db29ccf514e9fd966a90c7eeab32 Mon Sep 17 00:00:00 2001 From: dongyukun <1208714201@qq.com> Date: 星期四, 02 一月 2025 13:47:45 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/schedule/impl/ScheduleModelHandlerImpl.java | 18 ++++++------------ 1 files changed, 6 insertions(+), 12 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 70a3172..e12bcb0 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 @@ -89,28 +89,22 @@ param2Values[portLength] = settings; log.info("#######################调度模型 " + scheduleModel.getModelName() + " ##########################"); -// JSONObject jsonObjNewModelBean = new JSONObject(); -// jsonObjNewModelBean.put("newModelBean", newModelBean); -// log.info(String.valueOf(jsonObjNewModelBean)); -// JSONObject jsonObjParam2Values = new JSONObject(); -// jsonObjParam2Values.put("param2Values", param2Values); log.info("参数: " + JSON.toJSONString(param2Values)); - //IAILMDK.run HashMap<String, Object> modelResult = DllUtils.run(newModelBean, param2Values, scheduleScheme.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)) { + if (!modelResult.containsKey(CommonConstant.MDK_STATUS_CODE) || !modelResult.containsKey(CommonConstant.MDK_RESULT)) { throw new RuntimeException("模型结果异常:" + modelResult); } - modelResult = (HashMap<String, Object>) modelResult.get(CommonConstant.MDK_RESULT); - + String statusCode = modelResult.get(CommonConstant.MDK_STATUS_CODE).toString(); + HashMap<String, Object> result = (HashMap<String, Object>) modelResult.get(CommonConstant.MDK_RESULT); //打印结果 JSONObject jsonObjResult = new JSONObject(); - jsonObjResult.put("result", modelResult); + jsonObjResult.put("result", result); log.info(String.valueOf(jsonObjResult)); //5.返回调度结果 - scheduleResult.setResult(modelResult); + scheduleResult.setResultCode(statusCode); + scheduleResult.setResult(result); scheduleResult.setModelId(modelId); scheduleResult.setSchemeId(scheduleScheme.getId()); scheduleResult.setScheduleTime(scheduleTime); -- Gitblit v1.9.3