From fde993948625751908d4e67bd5e77e8e2ce47d05 Mon Sep 17 00:00:00 2001 From: dengzedong <dengzedong@email> Date: 星期五, 20 十二月 2024 17:18:52 +0800 Subject: [PATCH] 计算预测项 --- iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmPredictItemServiceImpl.java | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmPredictItemServiceImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmPredictItemServiceImpl.java index 20a0820..0bd305c 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmPredictItemServiceImpl.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmPredictItemServiceImpl.java @@ -123,6 +123,7 @@ MmItemOutputEntity entity = new MmItemOutputEntity(); entity.setPointid(mmPredictItemDto.getPointId()); entity.setResultName(mmPredictItemDto.getMmPredictItem().getItemname()); + entity.setResultstr("result"); mergeItemOutput.add(entity); mmPredictItemDto.setMmItemOutputList(mergeItemOutput); } @@ -168,7 +169,18 @@ MmPredictMergeItemEntity mMmPredictMergeItem = mmPredictItemDto.getMmPredictMergeItem(); mmPredictMergeItemService.update(mMmPredictMergeItem); // 修改默认output - mmPredictItemDto.getMmItemOutputList().forEach(e -> e.setPointid(mmPredictItemDto.getPointId())); + List<MmItemOutputEntity> mmItemOutputList = mmPredictItemDto.getMmItemOutputList(); + if (CollectionUtils.isEmpty(mmItemOutputList)) { + mmItemOutputList = new ArrayList<>(1); + MmItemOutputEntity entity = new MmItemOutputEntity(); + entity.setPointid(mmPredictItemDto.getPointId()); + entity.setResultName(mmPredictItemDto.getMmPredictItem().getItemname()); + entity.setResultstr("result"); + mmItemOutputList.add(entity); + mmPredictItemDto.setMmItemOutputList(mmItemOutputList); + } else { + mmPredictItemDto.getMmItemOutputList().forEach(e -> e.setPointid(mmPredictItemDto.getPointId())); + } } DmModuleItemEntity dmModuleItem = mmPredictItemDto.getDmModuleItem(); if (!"".equals(dmModuleItem.getId()) && dmModuleItem.getId() != null) { -- Gitblit v1.9.3