文件记录分类-添加权限
This commit is contained in:
@@ -0,0 +1,35 @@
|
|||||||
|
package com.zt.plat.module.qms.resource.record.constant;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 档案记录常量
|
||||||
|
*/
|
||||||
|
public class RecordConstants {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 权限目标类型
|
||||||
|
*/
|
||||||
|
public static class TargetType {
|
||||||
|
/** key */
|
||||||
|
public static final String TARGET_KEY = "文件记录授权类型";
|
||||||
|
/** 用户 */
|
||||||
|
public static final String USER = "用户";
|
||||||
|
/** 角色 */
|
||||||
|
public static final String ROLE = "角色";
|
||||||
|
/** 部门 */
|
||||||
|
public static final String DEPT = "部门";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 权限类型
|
||||||
|
*/
|
||||||
|
public static class PermissionType {
|
||||||
|
/** key */
|
||||||
|
public static final String PERMISSION_KEY = "file_record_permission type";
|
||||||
|
/** 管理员 */
|
||||||
|
public static final String ADMIN = "管理员";
|
||||||
|
/** 查看 */
|
||||||
|
public static final String VIEW = "可查看";
|
||||||
|
/** 编辑 */
|
||||||
|
public static final String EDIT = "可编辑";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -62,6 +62,16 @@ public class RecordCategoryController extends AbstractFileUploadController imple
|
|||||||
@Operation(summary = "创建文件记录分类")
|
@Operation(summary = "创建文件记录分类")
|
||||||
//@PreAuthorize("@ss.hasPermission('qms:record-category:create')")
|
//@PreAuthorize("@ss.hasPermission('qms:record-category:create')")
|
||||||
public CommonResult<RecordCategoryRespVO> createRecordCategory(@Valid @RequestBody RecordCategorySaveReqVO createReqVO) {
|
public CommonResult<RecordCategoryRespVO> createRecordCategory(@Valid @RequestBody RecordCategorySaveReqVO createReqVO) {
|
||||||
|
createReqVO.setParentId(0L);
|
||||||
|
createReqVO.setSortNo(1);
|
||||||
|
return success(recordCategoryService.createRecordCategory(createReqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 返回实体对象本身
|
||||||
|
@PostMapping("/create-temp-data")
|
||||||
|
@Operation(summary = "创建文件记录分类临时数据")
|
||||||
|
public CommonResult<RecordCategoryRespVO> createRecordTempCategory(@RequestBody RecordCategorySaveReqVO createReqVO) {
|
||||||
|
// RecordCategorySaveReqVO recordCategoryRespVO = new RecordCategorySaveReqVO();
|
||||||
return success(recordCategoryService.createRecordCategory(createReqVO));
|
return success(recordCategoryService.createRecordCategory(createReqVO));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ import com.zt.plat.module.qms.resource.record.service.recordpermission.RecordPer
|
|||||||
|
|
||||||
@Tag(name = "管理后台 - 记录权限")
|
@Tag(name = "管理后台 - 记录权限")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/qms/record-permission")
|
@RequestMapping("/qms/resource/record-permission")
|
||||||
@Validated
|
@Validated
|
||||||
@DeptDataPermissionIgnore(enable = "true")
|
@DeptDataPermissionIgnore(enable = "true")
|
||||||
@FileUploadController(source = "qms.recordpermission")
|
@FileUploadController(source = "qms.recordpermission")
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.zt.plat.module.qms.resource.record.controller.admin.recordpermission.vo;
|
package com.zt.plat.module.qms.resource.record.controller.admin.recordpermission.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
@@ -19,6 +20,9 @@ public class RecordPermissionPageReqVO extends PageParam {
|
|||||||
@Schema(description = "记录类型", example = "1")
|
@Schema(description = "记录类型", example = "1")
|
||||||
private String sourceType;
|
private String sourceType;
|
||||||
|
|
||||||
|
@Schema(description = "记录分类ID", example = "1")
|
||||||
|
private Long categoryId;
|
||||||
|
|
||||||
@Schema(description = "记录id", example = "1104")
|
@Schema(description = "记录id", example = "1104")
|
||||||
private Long sourceId;
|
private Long sourceId;
|
||||||
|
|
||||||
@@ -28,6 +32,9 @@ public class RecordPermissionPageReqVO extends PageParam {
|
|||||||
@Schema(description = "授权对象", example = "9264")
|
@Schema(description = "授权对象", example = "9264")
|
||||||
private String targetId;
|
private String targetId;
|
||||||
|
|
||||||
|
@Schema(description = "授权对象名称", example = "普通角色")
|
||||||
|
private String targetName;
|
||||||
|
|
||||||
@Schema(description = "权限类型")
|
@Schema(description = "权限类型")
|
||||||
private String permission;
|
private String permission;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.zt.plat.module.qms.resource.record.controller.admin.recordpermission.vo;
|
package com.zt.plat.module.qms.resource.record.controller.admin.recordpermission.vo;
|
||||||
|
|
||||||
|
import com.zt.plat.module.qms.core.aspect.annotation.Dict;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@@ -24,6 +25,10 @@ public class RecordPermissionRespVO {
|
|||||||
@ExcelProperty("记录类型")
|
@ExcelProperty("记录类型")
|
||||||
private String sourceType;
|
private String sourceType;
|
||||||
|
|
||||||
|
@Schema(description = "记录分类ID", example = "1")
|
||||||
|
@ExcelProperty("记录分类ID")
|
||||||
|
private Long categoryId;
|
||||||
|
|
||||||
@Schema(description = "记录id", example = "1104")
|
@Schema(description = "记录id", example = "1104")
|
||||||
@ExcelProperty("记录id")
|
@ExcelProperty("记录id")
|
||||||
private Long sourceId;
|
private Long sourceId;
|
||||||
@@ -36,8 +41,13 @@ public class RecordPermissionRespVO {
|
|||||||
@ExcelProperty("授权对象")
|
@ExcelProperty("授权对象")
|
||||||
private String targetId;
|
private String targetId;
|
||||||
|
|
||||||
|
@Schema(description = "授权对象名称", example = "普通角色")
|
||||||
|
@ExcelProperty("授权对象名称")
|
||||||
|
private String targetName;
|
||||||
|
|
||||||
@Schema(description = "权限类型")
|
@Schema(description = "权限类型")
|
||||||
@ExcelProperty("权限类型")
|
@ExcelProperty("权限类型")
|
||||||
|
@Dict(dicCode = "file_record_permission type")
|
||||||
private String permission;
|
private String permission;
|
||||||
|
|
||||||
@Schema(description = "密级")
|
@Schema(description = "密级")
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.zt.plat.module.qms.resource.record.controller.admin.recordpermission.vo;
|
package com.zt.plat.module.qms.resource.record.controller.admin.recordpermission.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@@ -20,16 +21,25 @@ public class RecordPermissionSaveReqVO {
|
|||||||
@Schema(description = "记录类型", example = "1")
|
@Schema(description = "记录类型", example = "1")
|
||||||
private String sourceType;
|
private String sourceType;
|
||||||
|
|
||||||
|
@Schema(description = "记录分类ID", example = "1")
|
||||||
|
private Long categoryId;
|
||||||
|
|
||||||
@Schema(description = "记录id", example = "1104")
|
@Schema(description = "记录id", example = "1104")
|
||||||
private Long sourceId;
|
private Long sourceId;
|
||||||
|
|
||||||
@Schema(description = "授权类型", example = "1")
|
@Schema(description = "授权类型", example = "1")
|
||||||
|
@NotEmpty(message = "授权类型不能为空")
|
||||||
private String targetType;
|
private String targetType;
|
||||||
|
|
||||||
@Schema(description = "授权对象", example = "9264")
|
@Schema(description = "授权对象", example = "9264")
|
||||||
|
@NotEmpty(message = "授权对象不能为空")
|
||||||
private String targetId;
|
private String targetId;
|
||||||
|
|
||||||
|
@Schema(description = "授权对象名称", example = "普通角色")
|
||||||
|
private String targetName;
|
||||||
|
|
||||||
@Schema(description = "权限类型")
|
@Schema(description = "权限类型")
|
||||||
|
@NotEmpty(message = "权限类型不能为空")
|
||||||
private String permission;
|
private String permission;
|
||||||
|
|
||||||
@Schema(description = "密级")
|
@Schema(description = "密级")
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ public interface RecordPermissionMapper extends BaseMapperX<RecordPermissionDO>
|
|||||||
default PageResult<RecordPermissionDO> selectPage(RecordPermissionPageReqVO reqVO) {
|
default PageResult<RecordPermissionDO> selectPage(RecordPermissionPageReqVO reqVO) {
|
||||||
return selectPage(reqVO, new LambdaQueryWrapperX<RecordPermissionDO>()
|
return selectPage(reqVO, new LambdaQueryWrapperX<RecordPermissionDO>()
|
||||||
.eqIfPresent(RecordPermissionDO::getParentId, reqVO.getParentId())
|
.eqIfPresent(RecordPermissionDO::getParentId, reqVO.getParentId())
|
||||||
|
.eqIfPresent(RecordPermissionDO::getCategoryId, reqVO.getCategoryId())
|
||||||
.eqIfPresent(RecordPermissionDO::getSourceType, reqVO.getSourceType())
|
.eqIfPresent(RecordPermissionDO::getSourceType, reqVO.getSourceType())
|
||||||
.eqIfPresent(RecordPermissionDO::getSourceId, reqVO.getSourceId())
|
.eqIfPresent(RecordPermissionDO::getSourceId, reqVO.getSourceId())
|
||||||
.eqIfPresent(RecordPermissionDO::getTargetType, reqVO.getTargetType())
|
.eqIfPresent(RecordPermissionDO::getTargetType, reqVO.getTargetType())
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.zt.plat.module.qms.resource.record.dal.dataobject.recordpermission;
|
package com.zt.plat.module.qms.resource.record.dal.dataobject.recordpermission;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
@@ -42,6 +44,11 @@ public class RecordPermissionDO extends BusinessBaseDO {
|
|||||||
*/
|
*/
|
||||||
@TableField("SRC_TP")
|
@TableField("SRC_TP")
|
||||||
private String sourceType;
|
private String sourceType;
|
||||||
|
/**
|
||||||
|
* 记录分类ID
|
||||||
|
*/
|
||||||
|
@TableField("CTGR_ID")
|
||||||
|
private Long categoryId;
|
||||||
/**
|
/**
|
||||||
* 记录id
|
* 记录id
|
||||||
*/
|
*/
|
||||||
@@ -57,6 +64,11 @@ public class RecordPermissionDO extends BusinessBaseDO {
|
|||||||
*/
|
*/
|
||||||
@TableField("TGT_ID")
|
@TableField("TGT_ID")
|
||||||
private String targetId;
|
private String targetId;
|
||||||
|
/**
|
||||||
|
* 授权对象
|
||||||
|
*/
|
||||||
|
@TableField("TGT_NAME")
|
||||||
|
private String targetName;
|
||||||
/**
|
/**
|
||||||
* 权限类型
|
* 权限类型
|
||||||
*/
|
*/
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -61,4 +61,7 @@ public interface RecordPermissionService {
|
|||||||
*/
|
*/
|
||||||
PageResult<RecordPermissionDO> getRecordPermissionPage(RecordPermissionPageReqVO pageReqVO);
|
PageResult<RecordPermissionDO> getRecordPermissionPage(RecordPermissionPageReqVO pageReqVO);
|
||||||
|
|
||||||
|
List<RecordPermissionDO> selectAllList();
|
||||||
|
|
||||||
|
RecordPermissionDO selectRecordPermission(RecordPermissionDO recordPermissionDO);
|
||||||
}
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user