档案管理树结构修改
This commit is contained in:
parent
0e12ca2cfc
commit
357063ea1e
|
|
@ -9,6 +9,7 @@ import com.bonus.common.enums.OperaType;
|
||||||
import com.bonus.web.domain.DaKyProFilesContentsDto;
|
import com.bonus.web.domain.DaKyProFilesContentsDto;
|
||||||
import com.bonus.web.domain.ProjectDto;
|
import com.bonus.web.domain.ProjectDto;
|
||||||
import com.bonus.web.domain.vo.DaKyProFilesContentsVo;
|
import com.bonus.web.domain.vo.DaKyProFilesContentsVo;
|
||||||
|
import com.bonus.web.mapper.FileManageMapper;
|
||||||
import com.bonus.web.service.FileManageService;
|
import com.bonus.web.service.FileManageService;
|
||||||
import com.bonus.web.service.ProjectService;
|
import com.bonus.web.service.ProjectService;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
|
@ -33,10 +34,12 @@ public class FileManagementController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private FileManageService fileManageService;
|
private FileManageService fileManageService;
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ProjectService service;
|
private ProjectService service;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private FileManageMapper fileManageMapper;
|
||||||
|
|
||||||
@ApiOperation(value = "档案管理列表")
|
@ApiOperation(value = "档案管理列表")
|
||||||
@GetMapping("getProjectList")
|
@GetMapping("getProjectList")
|
||||||
@SysLog(title = "档案管理列表", module = "档案管理->项目管理", businessType = OperaType.QUERY, details = "档案管理列表", logType = 1)
|
@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)
|
@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) {
|
||||||
try {
|
Integer level = fileManageMapper.getLevelById(dto.getParentId().toString());
|
||||||
|
if (level == 4) {
|
||||||
startPage();
|
startPage();
|
||||||
List<DaKyProFilesContentsDto> list = fileManageService.FileManage(dto);
|
List<DaKyProFilesContentsDto> list = fileManageService.FileManage(dto);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
} catch (Exception e) {
|
} else {
|
||||||
log.error(e.toString(), e);
|
|
||||||
return getDataTable(new ArrayList<>());
|
return getDataTable(new ArrayList<>());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,8 @@ public class DaKyProFilesContentsDto {
|
||||||
@NotNull(message = "上级节点不能为空")
|
@NotNull(message = "上级节点不能为空")
|
||||||
private Integer parentId;
|
private Integer parentId;
|
||||||
|
|
||||||
|
private String parentName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 层级
|
* 层级
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -122,11 +122,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<select id="list" resultType="com.bonus.web.domain.DaKyProFilesContentsDto">
|
<select id="list" resultType="com.bonus.web.domain.DaKyProFilesContentsDto">
|
||||||
SELECT
|
SELECT
|
||||||
dkp.*
|
dkp.*,
|
||||||
|
dkp2.content_name as parentName
|
||||||
FROM
|
FROM
|
||||||
da_ky_pro_files_contents dkp
|
da_ky_pro_files_contents dkp
|
||||||
|
LEFT JOIN da_ky_pro_files_contents dkp2 on dkp.parent_id = dkp2.id
|
||||||
WHERE
|
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 != ''">
|
<if test="keyWord != null and keyWord != ''">
|
||||||
and dkp.content_name like concat('%', #{keyWord}, '%')
|
and dkp.content_name like concat('%', #{keyWord}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue