Merge branch 'test' of https://git.will-way.cn/zgty/zt-qms into test

This commit is contained in:
2025-11-07 14:27:12 +08:00
13 changed files with 199 additions and 9 deletions

View File

@@ -81,6 +81,7 @@ public interface ErrorCodeConstants {
ErrorCode CONFIG_QC_STANDARD_SAMPLE_NOT_EXISTS = new ErrorCode(1_032_050_000, "质控与定值样关系不存在"); ErrorCode CONFIG_QC_STANDARD_SAMPLE_NOT_EXISTS = new ErrorCode(1_032_050_000, "质控与定值样关系不存在");
ErrorCode CONFIG_QC_SAMPLE_METHOD_PARAMETER_NOT_EXISTS = new ErrorCode(1_032_050_000, "质控样检测方法参数配置不存在"); ErrorCode CONFIG_QC_SAMPLE_METHOD_PARAMETER_NOT_EXISTS = new ErrorCode(1_032_050_000, "质控样检测方法参数配置不存在");
ErrorCode CONFIG_PERMISSION_NOT_EXISTS = new ErrorCode(1_032_050_000, "权限配置不存在"); ErrorCode CONFIG_PERMISSION_NOT_EXISTS = new ErrorCode(1_032_050_000, "权限配置不存在");
ErrorCode CONFIG_PERMISSION_DUPLICATE = new ErrorCode(1_032_050_000, "权限配置数据有误");
ErrorCode CONFIG_WAREHOUSE_LOCATION_NOT_EXISTS = new ErrorCode(1_032_050_000, "存放位置不存在"); ErrorCode CONFIG_WAREHOUSE_LOCATION_NOT_EXISTS = new ErrorCode(1_032_050_000, "存放位置不存在");
/*=================================bus 检验业务 1_032_100_000 ~ 1_032_149_999==================================*/ /*=================================bus 检验业务 1_032_100_000 ~ 1_032_149_999==================================*/

View File

@@ -0,0 +1,23 @@
package com.zt.plat.module.qms.enums;
/**
* 权限模块常量
*/
public interface QmsPermissionConstant {
//目标权限类型-角色
String TARGET_TYPE_ROLE = "role";
//目标权限类型-用户
String TARGET_TYPE_USER = "user";
//目标权限类型-部门
String TARGET_TYPE_DEPT = "dept";
//目标权限类型-自定义
String TARGET_TYPE_CUSTOM = "custom";
//======================各业务模块权限常量=============================
//报告发起权限
String REPORT_DOCUMENT_TYPE_START = "report_document_type_start";
}

View File

@@ -97,8 +97,7 @@ public class ConfigPermissionController implements BusinessControllerMarker {
@Operation(summary = "导出权限配置,通用权限配置 Excel") @Operation(summary = "导出权限配置,通用权限配置 Excel")
@PreAuthorize("@ss.hasPermission('qms:config-permission:export')") @PreAuthorize("@ss.hasPermission('qms:config-permission:export')")
@ApiAccessLog(operateType = EXPORT) @ApiAccessLog(operateType = EXPORT)
public void exportConfigPermissionExcel(@Valid ConfigPermissionPageReqVO pageReqVO, public void exportConfigPermissionExcel(@Valid ConfigPermissionPageReqVO pageReqVO, HttpServletResponse response) throws IOException {
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<ConfigPermissionDO> list = configPermissionService.getConfigPermissionPage(pageReqVO).getList(); List<ConfigPermissionDO> list = configPermissionService.getConfigPermissionPage(pageReqVO).getList();
// 导出 Excel // 导出 Excel

View File

@@ -21,6 +21,9 @@ public class ConfigPermissionPageReqVO extends PageParam {
@Schema(description = "关联id", example = "20071") @Schema(description = "关联id", example = "20071")
private Long targetId; private Long targetId;
@Schema(description = "关联name", example = "1")
private String targetName;
@Schema(description = "关联数据类型", example = "1") @Schema(description = "关联数据类型", example = "1")
private String targetType; private String targetType;

View File

@@ -27,6 +27,10 @@ public class ConfigPermissionRespVO {
@ExcelProperty("关联id") @ExcelProperty("关联id")
private Long targetId; private Long targetId;
@Schema(description = "关联name", example = "1")
@ExcelProperty("关联name")
private String targetName;
@Schema(description = "关联数据类型", example = "1") @Schema(description = "关联数据类型", example = "1")
@ExcelProperty("关联数据类型") @ExcelProperty("关联数据类型")
private String targetType; private String targetType;

View File

@@ -19,6 +19,9 @@ public class ConfigPermissionSaveReqVO {
@Schema(description = "关联id", example = "20071") @Schema(description = "关联id", example = "20071")
private Long targetId; private Long targetId;
@Schema(description = "关联name", example = "1")
private String targetName;
@Schema(description = "关联数据类型", example = "1") @Schema(description = "关联数据类型", example = "1")
private String targetType; private String targetType;

View File

@@ -43,6 +43,9 @@ public class ConfigPermissionDO extends BusinessBaseDO {
*/ */
@TableField("TGT_ID") @TableField("TGT_ID")
private Long targetId; private Long targetId;
@TableField("TGT_NAME")
private String targetName;
/** /**
* 关联数据类型 * 关联数据类型
*/ */

View File

@@ -16,6 +16,19 @@ import com.zt.plat.framework.common.pojo.PageResult;
*/ */
public interface ConfigPermissionService { public interface ConfigPermissionService {
void savePermissionListWithAutoDelete(List<ConfigPermissionSaveReqVO> list);
void savePermission(List<ConfigPermissionDO> insertList, List<ConfigPermissionDO> updateList, List<Long> deleteList);
void insertPermission(List<ConfigPermissionDO> insertList);
void updatePermission(List<ConfigPermissionDO> updateList);
void deletePermission(List<Long> deleteList);
List<ConfigPermissionDO> getPermissionList(Long sourceId, String sourceType, String permissionType);
/** /**
* 创建权限配置,通用权限配置 * 创建权限配置,通用权限配置
* *

View File

@@ -8,9 +8,13 @@ import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO; import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
import com.zt.plat.framework.common.util.object.BeanUtils; import com.zt.plat.framework.common.util.object.BeanUtils;
import com.zt.plat.framework.excel.core.util.ExcelUtils; import com.zt.plat.framework.excel.core.util.ExcelUtils;
import com.zt.plat.module.qms.business.config.controller.vo.ConfigPermissionRespVO;
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigPermissionDO;
import com.zt.plat.module.qms.business.config.service.ConfigPermissionService;
import com.zt.plat.module.qms.business.reportdoc.controller.vo.*; import com.zt.plat.module.qms.business.reportdoc.controller.vo.*;
import com.zt.plat.module.qms.business.reportdoc.dal.dataobject.ReportDocumentTypeDO; import com.zt.plat.module.qms.business.reportdoc.dal.dataobject.ReportDocumentTypeDO;
import com.zt.plat.module.qms.business.reportdoc.service.ReportDocumentTypeService; import com.zt.plat.module.qms.business.reportdoc.service.ReportDocumentTypeService;
import com.zt.plat.module.qms.enums.QmsPermissionConstant;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
@@ -34,8 +38,8 @@ import static com.zt.plat.framework.common.pojo.CommonResult.success;
public class ReportDocumentTypeController implements BusinessControllerMarker { public class ReportDocumentTypeController implements BusinessControllerMarker {
@Resource @Resource private ReportDocumentTypeService reportDocumentTypeService;
private ReportDocumentTypeService reportDocumentTypeService; @Resource private ConfigPermissionService configPermissionService;
@PostMapping("/save") @PostMapping("/save")
@Operation(summary = "更新报告类型配置") @Operation(summary = "更新报告类型配置")
@@ -67,8 +71,13 @@ public class ReportDocumentTypeController implements BusinessControllerMarker {
@Parameter(name = "id", description = "编号", required = true, example = "1024") @Parameter(name = "id", description = "编号", required = true, example = "1024")
//@PreAuthorize("@ss.hasPermission('qms:report-document-type:query')") //@PreAuthorize("@ss.hasPermission('qms:report-document-type:query')")
public CommonResult<ReportDocumentTypeRespVO> getReportDocumentType(@RequestParam("id") Long id) { public CommonResult<ReportDocumentTypeRespVO> getReportDocumentType(@RequestParam("id") Long id) {
ReportDocumentTypeDO reportDocumentType = reportDocumentTypeService.getReportDocumentType(id); ReportDocumentTypeDO reportDocumentTypeDO = reportDocumentTypeService.getReportDocumentType(id);
return success(BeanUtils.toBean(reportDocumentType, ReportDocumentTypeRespVO.class)); Long mainId = reportDocumentTypeDO.getMainId();
List<ConfigPermissionDO> permissionList = configPermissionService.getPermissionList(mainId, QmsPermissionConstant.REPORT_DOCUMENT_TYPE_START, "");
List<ConfigPermissionRespVO> permissionRespVOList= BeanUtils.toBean(permissionList, ConfigPermissionRespVO.class);
ReportDocumentTypeRespVO reportDocumentTypeRespVO = BeanUtils.toBean(reportDocumentTypeDO, ReportDocumentTypeRespVO.class);
reportDocumentTypeRespVO.setPermissionList(permissionRespVOList);
return success(reportDocumentTypeRespVO);
} }
@GetMapping("/page") @GetMapping("/page")

Some files were not shown because too many files have changed in this diff Show More