Explorar o código

feat: 可靠性预计

NickOooo hai 1 mes
pai
achega
3682c945bb

+ 5 - 1
nationrel-module-rp-biz/src/main/java/com/nationrel/modules/rp/service/impl/PredictionCategoryServiceImpl.java

@@ -28,6 +28,7 @@ import org.springframework.stereotype.Service;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
 
 import java.util.List;
 import java.util.Map;
@@ -111,6 +112,7 @@ public class PredictionCategoryServiceImpl extends ServiceImpl<PredictionCategor
                     PredictionCategoryModel childPredictionCategoryModel = new PredictionCategoryModel();
                     BeanUtils.copyProperties(select, childPredictionCategoryModel);
                     this.getChildForm(select.getCode(), childPredictionCategoryModel);
+                    childPredictionCategoryModel.setCategoryValue(relationMap.get(select.getId()));
 //                    childPredictionCategoryModel.setChildren(Lists.newArrayList());
                     return childPredictionCategoryModel;
                 }).toList();
@@ -135,7 +137,8 @@ public class PredictionCategoryServiceImpl extends ServiceImpl<PredictionCategor
                 .eq(PredictionCategory::getIoType, CategpryEnums.INPUT.getValue()));
         selectList.forEach(child -> {
             if (child.getCategoryType().equals(CategpryEnums.SELECT.getValue()) ||
-                    child.getCategoryType().equals(CategpryEnums.FIELD.getValue())) {
+                    child.getCategoryType().equals(CategpryEnums.FIELD.getValue()) ||
+                    child.getCategoryType().equals(CategpryEnums.CHILDREN_LABEL.getValue())) {
                 List<PredictionCategoryChildrenModel> childrenModelList = selectList.stream().map(select -> {
                     PredictionCategoryChildrenModel categoryChildrenModel = new PredictionCategoryChildrenModel();
                     categoryChildrenModel.setCode(select.getCode());
@@ -146,6 +149,7 @@ public class PredictionCategoryServiceImpl extends ServiceImpl<PredictionCategor
                     return categoryChildrenModel;
                 }).toList();
                 predictionCategoryModel.setChildren(childrenModelList);
+
             } else if (child.getCategoryType().equals(CategpryEnums.OPTIONS.getValue())) {
                 List<PredictionCategoryOptions> predictionCategoryOptions = predictionCategoryOptionsMapper.selectList(new LambdaQueryWrapper<PredictionCategoryOptions>()
                         .eq(PredictionCategoryOptions::getParentCode, child.getValue()));