From b408628632bba9cb4cedc4febf8520e8c208ebbf Mon Sep 17 00:00:00 2001 From: dengzedong <dengzedong@email> Date: 星期五, 20 十二月 2024 13:24:40 +0800 Subject: [PATCH] mergeItem添加pointId,生成默认outPut信息 --- iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmPredictItemServiceImpl.java | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 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 d058b4c..20a0820 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 @@ -118,6 +118,13 @@ MmPredictMergeItemEntity mMmPredictMergeItem = mmPredictItemDto.getMmPredictMergeItem(); mMmPredictMergeItem.setItemid(predictItem.getId()); mmPredictMergeItemService.savePredictMergeItem(mMmPredictMergeItem); + // 添加一条默认output + List<MmItemOutputEntity> mergeItemOutput = new ArrayList<>(1); + MmItemOutputEntity entity = new MmItemOutputEntity(); + entity.setPointid(mmPredictItemDto.getPointId()); + entity.setResultName(mmPredictItemDto.getMmPredictItem().getItemname()); + mergeItemOutput.add(entity); + mmPredictItemDto.setMmItemOutputList(mergeItemOutput); } mmPredictItemDao.insert(predictItem); DmModuleItemEntity dmModuleItem = mmPredictItemDto.getDmModuleItem(); @@ -160,6 +167,8 @@ } else if (itemType != null && ItemTypeEnum.MERGE_ITEM.getName().equals(itemType.getItemtypename())) { MmPredictMergeItemEntity mMmPredictMergeItem = mmPredictItemDto.getMmPredictMergeItem(); mmPredictMergeItemService.update(mMmPredictMergeItem); + // 修改默认output + mmPredictItemDto.getMmItemOutputList().forEach(e -> e.setPointid(mmPredictItemDto.getPointId())); } DmModuleItemEntity dmModuleItem = mmPredictItemDto.getDmModuleItem(); if (!"".equals(dmModuleItem.getId()) && dmModuleItem.getId() != null) { @@ -215,6 +224,9 @@ mmPredictItemDto.setMmModelParamList(new ArrayList<>()); mmPredictItemDto.setMmPredictMergeItem(new MmPredictMergeItemEntity()); mmPredictItemDto.setMmPredictMergeItem(mmPredictMergeItemService.getByItemid(id)); + if (!CollectionUtils.isEmpty(mmPredictItemDto.getMmItemOutputList())) { + mmPredictItemDto.setPointId(mmPredictItemDto.getMmItemOutputList().get(0).getPointid()); + } } return mmPredictItemDto; } -- Gitblit v1.9.3