| | |
| | | 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(); |
| | |
| | | } 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) { |
| | |
| | | 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; |
| | | } |