|
@@ -6,7 +6,7 @@ import com.dragoninfo.dcuc.app.enumresources.DataResourceEnum;
|
|
|
import com.dragoninfo.dcuc.app.service.IDataResourceService;
|
|
|
import com.dragoninfo.dcuc.app.vo.*;
|
|
|
import com.dragonsoft.duceap.commons.util.UUIDUtils;
|
|
|
-import com.dragonsoft.duceap.commons.util.enums.EnumUtils;
|
|
|
+import com.dragonsoft.duceap.commons.util.collections.CollectionUtils;
|
|
|
import com.google.common.base.Joiner;
|
|
|
import com.google.common.collect.Lists;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -287,14 +287,20 @@ public class DataResourceFacade implements IDataResourceFacade {
|
|
|
return dataResourceClassifyVo;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 计算treeVo所有最底层子节点数量,不包含叶节点
|
|
|
+ * @param treeVo
|
|
|
+ * @return
|
|
|
+ */
|
|
|
private int getTotalCount(DataResourceTreeVo treeVo) {
|
|
|
int count = 0;
|
|
|
List<DataResourceTreeVo> child = treeVo.getChild();
|
|
|
for (DataResourceTreeVo childVo : child) {
|
|
|
- Boolean treeNode = childVo.getTreeNode();
|
|
|
- if(treeNode){
|
|
|
+ List<DataResourceTreeVo> cc = childVo.getChild();
|
|
|
+ if(CollectionUtils.isNotEmpty(cc)){
|
|
|
count += getTotalCount(childVo);
|
|
|
}else {
|
|
|
+ childVo.setTreeNode(false);
|
|
|
count += 1;
|
|
|
}
|
|
|
}
|