dongyukun
7 天以前 e88fba9645a57535d858ce48da8e9d9a3dc84adc
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/schedule/impl/ScheduleModelHandlerImpl.java
@@ -89,29 +89,26 @@
            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)) {
                throw new RuntimeException("模型结果异常:" + modelResult);
            if (!modelResult.containsKey(CommonConstant.MDK_STATUS_CODE) || !modelResult.containsKey(CommonConstant.MDK_RESULT)) {
                log.info("模型结果异常:" + modelResult);
            }
            String statusCode = modelResult.get(CommonConstant.MDK_STATUS_CODE).toString();
            modelResult = (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", modelResult);
            jsonObjResult.put("result", result);
            log.info(String.valueOf(jsonObjResult));
            //5.返回调度结果
            scheduleResult.setResultCode(statusCode);
            scheduleResult.setResult(modelResult);
            scheduleResult.setResult(result);
            scheduleResult.setModelId(modelId);
            scheduleResult.setSchemeId(scheduleScheme.getId());
            scheduleResult.setScheduleTime(scheduleTime);