From b270a07828a9627f1a42e254a430c9921fec4e95 Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期三, 26 三月 2025 16:14:37 +0800 Subject: [PATCH] Merge branch 'master' of http://dlindusit.com:53929/r/iailab-plat --- iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/MdkApiImpl.java | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/MdkApiImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/MdkApiImpl.java index 883b075..5647c66 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/MdkApiImpl.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/MdkApiImpl.java @@ -211,9 +211,15 @@ continue; } String firstOutKey = entry.getValue().get(0).getOutKey(); + if(StringUtils.isBlank(firstOutKey)) { + continue; + } + if(reqDTO.getModelResult().get(firstOutKey) == null || StringUtils.isBlank(reqDTO.getModelResult().get(firstOutKey).toString())) { + continue; + } BigDecimal firstAdjustValue = new BigDecimal(reqDTO.getModelResult().get(firstOutKey.trim()).toString().trim()); if (BigDecimal.ZERO.compareTo(firstAdjustValue) == 0) { - log.info("adjustValue = ZERO"); + log.info("firstAdjustValue = ZERO"); continue; } for (StAdjustConfigDetEntity det : entry.getValue()) { @@ -222,8 +228,8 @@ switch (PredictItemTypeEnum.getEumById(det.getItemTypeId())) { case NormalItem: double adjustValue = 0; - if (StringUtils.isNotBlank(det.getOutKey().trim())) { - adjustValue = new BigDecimal(reqDTO.getModelResult().get(det.getOutKey().trim()).toString()).doubleValue(); + if (StringUtils.isNotBlank(det.getOutKey())) { + adjustValue = new BigDecimal(reqDTO.getModelResult().get(det.getOutKey()).toString()).doubleValue(); } StAdjustDeviationDTO deviationItem = new StAdjustDeviationDTO(); deviationItem.setPortIdx(det.getModelParamPortOrder() == null ? 0 : det.getModelParamPortOrder()); -- Gitblit v1.9.3