档案管理树结构修改

This commit is contained in:
liang.chao 2025-09-17 10:25:50 +08:00
parent 0e12ca2cfc
commit 357063ea1e
3 changed files with 13 additions and 6 deletions

View File

@ -9,6 +9,7 @@ import com.bonus.common.enums.OperaType;
import com.bonus.web.domain.DaKyProFilesContentsDto;
import com.bonus.web.domain.ProjectDto;
import com.bonus.web.domain.vo.DaKyProFilesContentsVo;
import com.bonus.web.mapper.FileManageMapper;
import com.bonus.web.service.FileManageService;
import com.bonus.web.service.ProjectService;
import io.swagger.annotations.ApiOperation;
@ -33,10 +34,12 @@ public class FileManagementController extends BaseController {
@Autowired
private FileManageService fileManageService;
@Autowired
private ProjectService service;
@Autowired
private FileManageMapper fileManageMapper;
@ApiOperation(value = "档案管理列表")
@GetMapping("getProjectList")
@SysLog(title = "档案管理列表", module = "档案管理->项目管理", businessType = OperaType.QUERY, details = "档案管理列表", logType = 1)
@ -86,12 +89,12 @@ public class FileManagementController extends BaseController {
@SysLog(title = "第四级档案信息", module = "档案管理->档案右侧列表", businessType = OperaType.QUERY, details = "第四级档案信息", logType = 1)
@RequiresPermissions("file:manage:query")
public TableDataInfo getFileManage(DaKyProFilesContentsDto dto) {
try {
Integer level = fileManageMapper.getLevelById(dto.getParentId().toString());
if (level == 4) {
startPage();
List<DaKyProFilesContentsDto> list = fileManageService.FileManage(dto);
return getDataTable(list);
} catch (Exception e) {
log.error(e.toString(), e);
} else {
return getDataTable(new ArrayList<>());
}
}

View File

@ -37,6 +37,8 @@ public class DaKyProFilesContentsDto {
@NotNull(message = "上级节点不能为空")
private Integer parentId;
private String parentName;
/**
* 层级
*/

View File

@ -122,11 +122,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="list" resultType="com.bonus.web.domain.DaKyProFilesContentsDto">
SELECT
dkp.*
dkp.*,
dkp2.content_name as parentName
FROM
da_ky_pro_files_contents dkp
LEFT JOIN da_ky_pro_files_contents dkp2 on dkp.parent_id = dkp2.id
WHERE
dkp.del_flag = '1' and dkp.pro_id = #{proId} and level in (0,1,2,3,4)
dkp.del_flag = '1' and dkp.pro_id = #{proId} and dkp.level in (0,1,2,3,4)
<if test="keyWord != null and keyWord != ''">
and dkp.content_name like concat('%', #{keyWord}, '%')
</if>