|
|
@ -10,6 +10,7 @@ import com.fr.stable.StableUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.workspace.server.repository.tabledata.TableDataRepository; |
|
|
|
import com.fr.workspace.server.repository.tabledata.TableDataRepository; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Nullable; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
@ -98,6 +99,9 @@ public class FileDataFILE extends FileNodeFILE{ |
|
|
|
FileDataFILE root = null; |
|
|
|
FileDataFILE root = null; |
|
|
|
if (!this.builded) { |
|
|
|
if (!this.builded) { |
|
|
|
root = buildTree(); |
|
|
|
root = buildTree(); |
|
|
|
|
|
|
|
if (root == null) { |
|
|
|
|
|
|
|
return new FILE[0]; |
|
|
|
|
|
|
|
} |
|
|
|
FileDataFILE dataFILE = root.getFileDataFILE(this.id); |
|
|
|
FileDataFILE dataFILE = root.getFileDataFILE(this.id); |
|
|
|
this.setChildren(dataFILE.getChildren()); |
|
|
|
this.setChildren(dataFILE.getChildren()); |
|
|
|
this.setType(dataFILE.getType()); |
|
|
|
this.setType(dataFILE.getType()); |
|
|
@ -125,7 +129,7 @@ public class FileDataFILE extends FileNodeFILE{ |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private FileDataFILE buildTree() { |
|
|
|
private @Nullable FileDataFILE buildTree() { |
|
|
|
List<FileNodeBean> beans = TableDataRepository.getInstance().getFileList(type); |
|
|
|
List<FileNodeBean> beans = TableDataRepository.getInstance().getFileList(type); |
|
|
|
Map<String, FileDataFILE> tree = new HashMap<>(); |
|
|
|
Map<String, FileDataFILE> tree = new HashMap<>(); |
|
|
|
FileDataFILE root = null; |
|
|
|
FileDataFILE root = null; |
|
|
|