|
@@ -16,6 +16,10 @@ import com.platform.dao.entity.upms.SysDict;
|
|
|
import com.platform.dao.entity.upms.SysMenu;
|
|
|
import com.platform.dao.pojo.CommonTree;
|
|
|
import com.platform.dao.pojo.TreeNode;
|
|
|
+import com.platform.dao.vo.query.qykh.HotspotVO;
|
|
|
+import com.platform.dao.vo.query.qykh.InformationVO;
|
|
|
+import com.platform.dao.vo.query.qykh.PlanVO;
|
|
|
+import com.platform.dao.vo.query.qykh.ProductVO;
|
|
|
import com.platform.dao.vo.query.store.StoreVO;
|
|
|
import com.platform.dao.vo.sb.SbTypeVO;
|
|
|
import lombok.experimental.UtilityClass;
|
|
@@ -324,6 +328,8 @@ public class TreeUtil {
|
|
|
return TreeUtil.buildByLoop(trees, root);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 创建设备位置树
|
|
|
*
|
|
@@ -472,4 +478,84 @@ public class TreeUtil {
|
|
|
return TreeUtil.buildByLoop(trees, root);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 创建树
|
|
|
+ *
|
|
|
+ * @param voList
|
|
|
+ * @param root
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public List<CommonTree> buildQykhHotspotTree(List<HotspotVO> voList, String root) {
|
|
|
+ List<CommonTree> trees = new LinkedList<>();
|
|
|
+ voList.forEach(type -> {
|
|
|
+ CommonTree node = new CommonTree();
|
|
|
+ node.setId(type.getId() + "");
|
|
|
+ node.setKey(type.getId() + "");
|
|
|
+ node.setParentId(type.getHid() + "");
|
|
|
+ node.setTitle(type.getHname());
|
|
|
+ node.setValue(type.getId() + "");
|
|
|
+ trees.add(node);
|
|
|
+ });
|
|
|
+ return TreeUtil.buildByLoop(trees, root);
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 创建树
|
|
|
+ *
|
|
|
+ * @param voList
|
|
|
+ * @param root
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public List<CommonTree> buildQykhProductTree(List<ProductVO> voList, String root) {
|
|
|
+ List<CommonTree> trees = new LinkedList<>();
|
|
|
+ voList.forEach(type -> {
|
|
|
+ CommonTree node = new CommonTree();
|
|
|
+ node.setId(type.getId() + "");
|
|
|
+ node.setKey(type.getId() + "");
|
|
|
+ node.setParentId(type.getPid() + "");
|
|
|
+ node.setTitle(type.getPname());
|
|
|
+ node.setValue(type.getId() + "");
|
|
|
+ trees.add(node);
|
|
|
+ });
|
|
|
+ return TreeUtil.buildByLoop(trees, root);
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 创建树
|
|
|
+ *
|
|
|
+ * @param voList
|
|
|
+ * @param root
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public List<CommonTree> buildQykhPlanTree(List<PlanVO> voList, String root) {
|
|
|
+ List<CommonTree> trees = new LinkedList<>();
|
|
|
+ voList.forEach(type -> {
|
|
|
+ CommonTree node = new CommonTree();
|
|
|
+ node.setId(type.getId() + "");
|
|
|
+ node.setKey(type.getId() + "");
|
|
|
+ node.setParentId(type.getPid() + "");
|
|
|
+ node.setTitle(type.getPlanname());
|
|
|
+ node.setValue(type.getId() + "");
|
|
|
+ trees.add(node);
|
|
|
+ });
|
|
|
+ return TreeUtil.buildByLoop(trees, root);
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 创建树
|
|
|
+ *
|
|
|
+ * @param voList
|
|
|
+ * @param root
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public List<CommonTree> buildQykhInformationTree(List<InformationVO> voList, String root) {
|
|
|
+ List<CommonTree> trees = new LinkedList<>();
|
|
|
+ voList.forEach(type -> {
|
|
|
+ CommonTree node = new CommonTree();
|
|
|
+ node.setId(type.getId() + "");
|
|
|
+ node.setKey(type.getId() + "");
|
|
|
+ node.setParentId(type.getPid() + "");
|
|
|
+ node.setTitle(type.getInforname());
|
|
|
+ node.setValue(type.getId() + "");
|
|
|
+ trees.add(node);
|
|
|
+ });
|
|
|
+ return TreeUtil.buildByLoop(trees, root);
|
|
|
+ }
|
|
|
}
|