解决已知问题。
This commit is contained in:
parent
e119cf7d05
commit
fc56722ce5
|
|
@ -58,6 +58,14 @@ public class CommonService {
|
||||||
@Resource
|
@Resource
|
||||||
private FileFormatService fileFormatService;
|
private FileFormatService fileFormatService;
|
||||||
|
|
||||||
|
@PostConstruct
|
||||||
|
public void init() {
|
||||||
|
PATH_MAP.put(DataOwnEnum.SYS_FILE.code, elePropertyConfig.getPrjDir());
|
||||||
|
PATH_MAP.put(DataOwnEnum.SYS_PRJ.code, elePropertyConfig.getPrjDir());
|
||||||
|
PATH_MAP.put(DataOwnEnum.USER_PRJ.code, elePropertyConfig.getUserDataPath());
|
||||||
|
PATH_MAP.put(DataOwnEnum.USER_FILE.code, elePropertyConfig.getUserDataPath());
|
||||||
|
}
|
||||||
|
|
||||||
private static String createTree(List<EdFileInfo> edFileInfos, Object object) {
|
private static String createTree(List<EdFileInfo> edFileInfos, Object object) {
|
||||||
|
|
||||||
TreeNodeConfig config = new TreeNodeConfig();
|
TreeNodeConfig config = new TreeNodeConfig();
|
||||||
|
|
@ -114,14 +122,6 @@ public class CommonService {
|
||||||
return PATH_MAP.get(dataOwnCode);
|
return PATH_MAP.get(dataOwnCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostConstruct
|
|
||||||
public void init() {
|
|
||||||
PATH_MAP.put(DataOwnEnum.SYS_FILE.code, elePropertyConfig.getPrjDir());
|
|
||||||
PATH_MAP.put(DataOwnEnum.SYS_PRJ.code, elePropertyConfig.getPrjDir());
|
|
||||||
PATH_MAP.put(DataOwnEnum.USER_PRJ.code, elePropertyConfig.getUserDataPath());
|
|
||||||
PATH_MAP.put(DataOwnEnum.USER_FILE.code, elePropertyConfig.getUserDataPath());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检查同层级是否有同名的文件夹
|
* 检查同层级是否有同名的文件夹
|
||||||
*/
|
*/
|
||||||
|
|
@ -492,10 +492,14 @@ public class CommonService {
|
||||||
|
|
||||||
Set<String> res = new HashSet<>();
|
Set<String> res = new HashSet<>();
|
||||||
|
|
||||||
List<String> prjInfo = (dataOwnCode == DataOwnEnum.SYS_FILE.code) ?
|
List<String> prjInfo;
|
||||||
querySysPrjTree(PrjQuerySource.SYS_DB.value, null, new FileProjectVO()).get(PrjQuerySource.SYS_DB.value) :
|
if (dataOwnCode == DataOwnEnum.SYS_FILE.code) {
|
||||||
queryUserPrjTree(PrjQuerySource.USER_DB.value, new FileProjectVO()).get(PrjQuerySource.USER_DB.value);
|
prjInfo = querySysPrjTree(PrjQuerySource.SYS_DB.value, null, new FileProjectVO()).get(PrjQuerySource.SYS_DB.value);
|
||||||
|
} else if (dataOwnCode == DataOwnEnum.USER_FILE.code) {
|
||||||
|
prjInfo = queryUserPrjTree(PrjQuerySource.USER_DB.value, new FileProjectVO()).get(PrjQuerySource.USER_DB.value);
|
||||||
|
} else {
|
||||||
|
prjInfo = queryRepoPrjTree(PrjQuerySource.REPO_DB.value, new FileProjectVO()).get(PrjQuerySource.REPO_DB.value);
|
||||||
|
}
|
||||||
prjInfo.forEach(e -> {
|
prjInfo.forEach(e -> {
|
||||||
FileProjectVO projectVO = JSONUtil.toList(e, FileProjectVO.class).get(0);
|
FileProjectVO projectVO = JSONUtil.toList(e, FileProjectVO.class).get(0);
|
||||||
Set<String> leafIds = getLeafNodes(projectVO).stream().map(FileProjectVO::getCategoryId).collect(Collectors.toSet());
|
Set<String> leafIds = getLeafNodes(projectVO).stream().map(FileProjectVO::getCategoryId).collect(Collectors.toSet());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue