This commit is contained in:
2025-12-08 14:50:27 +08:00
parent 74bee3e232
commit 6168f4c57d
25 changed files with 492 additions and 194 deletions

View File

@ -206,6 +206,9 @@ public class MilitaryLibraryController {
@GetMapping("/militaryTypeTree")
public ApiResponse militaryTypeTree(@Parameter(description = "军标名称") @RequestParam(value = "militaryName", required = false) String militaryName) throws SQLException, IllegalAccessException, InstantiationException {
List<MilitaryTypeVo> treeList = militaryTypeList(militaryName);
if (treeList == null) {
return ApiResponse.successWithMessage("请先创建或导入军标库");
}
return ApiResponse.success(treeList);
}
@ -430,7 +433,7 @@ public class MilitaryLibraryController {
queryWrapper.eq(MilitaryLibrary::getIsEnable, 1); // 1=启用、0=未启用
MilitaryLibrary library = militaryLibraryService.getOne(queryWrapper);
if (library == null) {
throw new RuntimeException("请先创建或导入军标库");
return null;
}
return library.getPath();
}