Pārlūkot izejas kodu

中期支付相关

yangyj 8 mēneši atpakaļ
vecāks
revīzija
810c15c82b

+ 6 - 2
blade-service/blade-manager/src/main/java/com/mixsmart/utils/FormulaUtils.java

@@ -497,8 +497,12 @@ public class FormulaUtils {
         Map<K, TreeNode<T>> mTreeMap = new HashMap<>();
         if (Func.isNotEmpty(list)) {
             for (T mt : list) {
-                TreeNode<T> treeNode = fc.apply(mt);
-                mTreeMap.put(keyMapper.apply(treeNode), treeNode);
+                try {
+                    TreeNode<T> treeNode = fc.apply(mt);
+                    mTreeMap.put(keyMapper.apply(treeNode), treeNode);
+                }catch (Exception e){
+                    e.printStackTrace();
+                }
             }
             Map<K, List<TreeNode<T>>> group = mTreeMap.values().stream().collect(Collectors.groupingBy(classifier));
             group.forEach((k, v) -> {

+ 2 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/formula/impl/ExecutorInit.java

@@ -1,6 +1,7 @@
 package org.springblade.manager.formula.impl;
 
 import com.mixsmart.utils.FormulaUtils;
+import com.mixsmart.utils.StringUtils;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import org.springblade.common.utils.BaseUtils;
@@ -74,7 +75,7 @@ public class ExecutorInit extends FormulaExecutor {
                 treeNode.setParentId(m.getParentId());
                 treeNode.setValue(m);
                 treeNode.setName(m.getNodeName());
-                treeNode.setSort(m.getSort());
+                treeNode.setSort(StringUtils.handObj2Integer(m.getSort()));
                 return treeNode;
             };
             return FormulaUtils.list2TreeNode(TreeNode::getId,list,fc,TreeNode::getParentId);