public List getCdtj() {
/*組織機(jī)構(gòu)樹*/
List deptTree = safeMonitorService.getDepartTree();
List cdtjList=statisticalDataService.getLstj();
tree(deptTree,cdtjList);
return deptTree;
}
/*遞歸遍歷組織機(jī)構(gòu),判斷id相同填入數(shù)據(jù)*/
public void tree(List list,List cdtjList){
for(EasyUIJsonTree A:list){
if(!CollectionUtils.isEmpty(A.getChildren())){
List children = A.getChildren();
tree(children,cdtjList);
}else{
for(Cdtj B:cdtjList){
HashMap map=new HashMap<>();
map.put("cdtj", B);
if(A.getMineId().equals(B.getMineID())){
A.setAttributes(map);
}
}
}
}
}