代码提交
This commit is contained in:
parent
2fc5e2216d
commit
8604f744f0
|
|
@ -89,10 +89,10 @@ public class FileManagementController extends BaseController {
|
||||||
@SysLog(title = "第四级档案信息", module = "档案管理->档案右侧列表", businessType = OperaType.QUERY, details = "第四级档案信息", logType = 1)
|
@SysLog(title = "第四级档案信息", module = "档案管理->档案右侧列表", businessType = OperaType.QUERY, details = "第四级档案信息", logType = 1)
|
||||||
@RequiresPermissions("file:manage:query")
|
@RequiresPermissions("file:manage:query")
|
||||||
public TableDataInfo getFileManage(DaKyProFilesContentsDto dto) {
|
public TableDataInfo getFileManage(DaKyProFilesContentsDto dto) {
|
||||||
if (dto.getParentId() == 0) {
|
if (dto.getParentId().equals("0")) {
|
||||||
return getDataTable(new ArrayList<>());
|
return getDataTable(new ArrayList<>());
|
||||||
} else {
|
} else {
|
||||||
Integer level = fileManageMapper.getLevelById(dto.getParentId().toString());
|
Integer level = fileManageMapper.getLevelById(dto.getParentId());
|
||||||
if (level == 4) {
|
if (level == 4) {
|
||||||
startPage();
|
startPage();
|
||||||
List<DaKyProFilesContentsDto> list = fileManageService.FileManage(dto);
|
List<DaKyProFilesContentsDto> list = fileManageService.FileManage(dto);
|
||||||
|
|
@ -107,7 +107,7 @@ public class FileManagementController extends BaseController {
|
||||||
@PostMapping("addFileManageRight")
|
@PostMapping("addFileManageRight")
|
||||||
@SysLog(title = "新增右侧档案树", module = "档案管理->档案目录管理", businessType = OperaType.INSERT, details = "新增右侧档案树", logType = 1)
|
@SysLog(title = "新增右侧档案树", module = "档案管理->档案目录管理", businessType = OperaType.INSERT, details = "新增右侧档案树", logType = 1)
|
||||||
@RequiresPermissions("file:manage:add")
|
@RequiresPermissions("file:manage:add")
|
||||||
public R saveArchivalCatalogue(@RequestBody @Validated DaKyProFilesContentsVo dto) {
|
public R saveArchivalCatalogue(@RequestParam @Validated DaKyProFilesContentsVo dto) {
|
||||||
try {
|
try {
|
||||||
if (dto.getParentId() == null) {
|
if (dto.getParentId() == null) {
|
||||||
return R.fail("父级有误");
|
return R.fail("父级有误");
|
||||||
|
|
|
||||||
|
|
@ -65,12 +65,12 @@ public class TreeBuilder {
|
||||||
|
|
||||||
// 第二步:构建父子关系
|
// 第二步:构建父子关系
|
||||||
for (DaKyProFilesContentsDto item : validList) {
|
for (DaKyProFilesContentsDto item : validList) {
|
||||||
Integer parentId = item.getParentId();
|
String parentId = item.getParentId();
|
||||||
// 如果 parent_id 为 null,则为根节点
|
// 如果 parent_id 为 null,则为根节点
|
||||||
if (parentId == null) {
|
if (parentId == null) {
|
||||||
roots.add(item);
|
roots.add(item);
|
||||||
} else {
|
} else {
|
||||||
DaKyProFilesContentsDto parent = map.get(parentId.toString());
|
DaKyProFilesContentsDto parent = map.get(parentId);
|
||||||
if (parent != null) {
|
if (parent != null) {
|
||||||
parent.getChildren().add(item);
|
parent.getChildren().add(item);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ public class DaKyProFilesContentsDto {
|
||||||
* 父节点id
|
* 父节点id
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "上级节点不能为空")
|
@NotNull(message = "上级节点不能为空")
|
||||||
private Integer parentId;
|
private String parentId;
|
||||||
|
|
||||||
private String parentName;
|
private String parentName;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,8 @@ public class FileManageServiceImpl implements FileManageService {
|
||||||
}
|
}
|
||||||
String uuid32 = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
String uuid32 = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
||||||
dto.setId(uuid32);
|
dto.setId(uuid32);
|
||||||
|
dto.setDataSource("1");
|
||||||
|
dto.setIsUnique("1");
|
||||||
return R.ok(fileManageMapper.saveFileManage(dto));
|
return R.ok(fileManageMapper.saveFileManage(dto));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue