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

This commit is contained in:
2025-11-07 16:15:29 +08:00
15 changed files with 132 additions and 18 deletions

View File

@@ -8,6 +8,8 @@ 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.framework.security.core.LoginUser;
import com.zt.plat.framework.security.core.util.SecurityFrameworkUtils;
import com.zt.plat.module.qms.business.config.controller.vo.ConfigPermissionRespVO; 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.dal.dataobject.ConfigPermissionDO;
import com.zt.plat.module.qms.business.config.service.ConfigPermissionService; import com.zt.plat.module.qms.business.config.service.ConfigPermissionService;
@@ -15,6 +17,7 @@ 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 com.zt.plat.module.qms.enums.QmsPermissionConstant;
import com.zt.plat.module.system.api.permission.PermissionApi;
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;
@@ -27,6 +30,7 @@ import org.springframework.web.bind.annotation.*;
import java.io.IOException; import java.io.IOException;
import java.util.List; import java.util.List;
import java.util.Set;
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
import static com.zt.plat.framework.common.pojo.CommonResult.success; import static com.zt.plat.framework.common.pojo.CommonResult.success;
@@ -40,6 +44,7 @@ public class ReportDocumentTypeController implements BusinessControllerMarker {
@Resource private ReportDocumentTypeService reportDocumentTypeService; @Resource private ReportDocumentTypeService reportDocumentTypeService;
@Resource private ConfigPermissionService configPermissionService; @Resource private ConfigPermissionService configPermissionService;
@Resource private PermissionApi permissionApi;
@PostMapping("/save") @PostMapping("/save")
@Operation(summary = "更新报告类型配置") @Operation(summary = "更新报告类型配置")
@@ -88,6 +93,23 @@ public class ReportDocumentTypeController implements BusinessControllerMarker {
return success(BeanUtils.toBean(pageResult, ReportDocumentTypeRespVO.class)); return success(BeanUtils.toBean(pageResult, ReportDocumentTypeRespVO.class));
} }
@GetMapping("/selectListWithPermission")
@Operation(summary = "安权限查询报告类型")
//@PreAuthorize("@ss.hasPermission('qms:report-document-type:query')")
public CommonResult<List<ReportDocumentTypeRespVO>> selectListWithPermission(@Valid ReportDocumentTypePageReqVO pageReqVO) {
pageReqVO.setPermissionFilterFlag("1");
pageReqVO.setSrcPermissionType(QmsPermissionConstant.REPORT_DOCUMENT_TYPE_START);
//查询权限
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
Long userId = loginUser.getId();
CommonResult<Set<Long>> roleRet = permissionApi.getUserRoleIdListByUserId(userId);
Set<Long> roleIds = roleRet.getData();
pageReqVO.setRoleIds(roleIds);
List<ReportDocumentTypeDO> list = reportDocumentTypeService.selectListWithPermission(pageReqVO);
return success(BeanUtils.toBean(list, ReportDocumentTypeRespVO.class));
}
@GetMapping("/export-excel") @GetMapping("/export-excel")
@Operation(summary = "导出报告类型配置 Excel") @Operation(summary = "导出报告类型配置 Excel")
//@PreAuthorize("@ss.hasPermission('qms:report-document-type:export')") //@PreAuthorize("@ss.hasPermission('qms:report-document-type:export')")

View File

@@ -30,7 +30,7 @@ public class ReportDocumentMainPageReqVO extends PageParam {
private String currentNode; private String currentNode;
@Schema(description = "报告编号") @Schema(description = "报告编号")
private String documentCustomsDeclaration; private String documentCode;
@Schema(description = "报告类型,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告", example = "2") @Schema(description = "报告类型,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告", example = "2")
private String documentType; private String documentType;

View File

@@ -39,7 +39,7 @@ public class ReportDocumentMainRespVO {
@Schema(description = "报告编号") @Schema(description = "报告编号")
@ExcelProperty("报告编号") @ExcelProperty("报告编号")
private String documentCustomsDeclaration; private String documentCode;
@Schema(description = "报告类型,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") @Schema(description = "报告类型,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@ExcelProperty("报告类型,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告") @ExcelProperty("报告类型,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告")

View File

@@ -31,7 +31,7 @@ public class ReportDocumentMainSaveReqVO {
private String currentNode; private String currentNode;
@Schema(description = "报告编号") @Schema(description = "报告编号")
private String documentCustomsDeclaration; private String documentCode;
@Schema(description = "报告类型,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") @Schema(description = "报告类型,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
private String documentType; private String documentType;

View File

@@ -8,6 +8,7 @@ import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.Set;
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@@ -28,7 +29,7 @@ public class ReportDocumentTypePageReqVO extends PageParam {
private String reportKey; private String reportKey;
@Schema(description = "报告编号规则") @Schema(description = "报告编号规则")
private String customsDeclarationRule; private String codeRule;
@Schema(description = "报告分类") @Schema(description = "报告分类")
private String documentType; private String documentType;
@@ -69,4 +70,15 @@ public class ReportDocumentTypePageReqVO extends PageParam {
@Schema(description = "前端组件(移动端)") @Schema(description = "前端组件(移动端)")
private String pageComponentMobile; private String pageComponentMobile;
//===================扩展属性=====================
@Schema(description = "查询时进行权限过滤")
private String permissionFilterFlag;
@Schema(description = "查询用-权限角色")
private Set<Long> roleIds;
@Schema(description = "查询用-源权限类型")
private String srcPermissionType;
} }

View File

@@ -38,7 +38,7 @@ public class ReportDocumentTypeRespVO {
@Schema(description = "报告编号规则", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "报告编号规则", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("报告编号规则") @ExcelProperty("报告编号规则")
private String customsDeclarationRule; private String codeRule;
@Schema(description = "报告分类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") @Schema(description = "报告分类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@ExcelProperty("报告分类") @ExcelProperty("报告分类")

View File

@@ -34,7 +34,7 @@ public class ReportDocumentTypeSaveReqVO {
@Schema(description = "报告编号规则", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "报告编号规则", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "报告编号规则不能为空") @NotEmpty(message = "报告编号规则不能为空")
private String customsDeclarationRule; private String codeRule;
@Schema(description = "报告分类,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") @Schema(description = "报告分类,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotEmpty(message = "报告分类,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告不能为空") @NotEmpty(message = "报告分类,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告不能为空")

View File

@@ -2,7 +2,6 @@ package com.zt.plat.module.qms.business.reportdoc.dal.dataobject;
import com.baomidou.mybatisplus.annotation.*; import com.baomidou.mybatisplus.annotation.*;
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO; import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*; import lombok.*;
import java.time.LocalDateTime; import java.time.LocalDateTime;
@@ -60,7 +59,7 @@ public class ReportDocumentMainDO extends BusinessBaseDO {
* 报告编号 * 报告编号
*/ */
@TableField("DOC_CD") @TableField("DOC_CD")
private String documentCustomsDeclaration; private String documentCode;
/** /**
* 报告类型,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告 * 报告类型,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告
*/ */

View File

@@ -52,7 +52,7 @@ public class ReportDocumentTypeDO extends BusinessBaseDO {
* 报告编号规则 * 报告编号规则
*/ */
@TableField("CD_RUL") @TableField("CD_RUL")
private String customsDeclarationRule; private String codeRule;
/** /**
* 报告分类,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告 * 报告分类,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告
*/ */

View File

@@ -31,7 +31,7 @@ public interface ReportDocumentMainMapper extends BaseMapperX<ReportDocumentMain
wrapper.eqIfPresent(ReportDocumentMainDO::getFlowKey, reqVO.getFlowKey()); wrapper.eqIfPresent(ReportDocumentMainDO::getFlowKey, reqVO.getFlowKey());
wrapper.eqIfPresent(ReportDocumentMainDO::getFlowSerialNumber, reqVO.getFlowSerialNumber()); wrapper.eqIfPresent(ReportDocumentMainDO::getFlowSerialNumber, reqVO.getFlowSerialNumber());
wrapper.eqIfPresent(ReportDocumentMainDO::getCurrentNode, reqVO.getCurrentNode()); wrapper.eqIfPresent(ReportDocumentMainDO::getCurrentNode, reqVO.getCurrentNode());
wrapper.eqIfPresent(ReportDocumentMainDO::getDocumentCustomsDeclaration, reqVO.getDocumentCustomsDeclaration()); wrapper.eqIfPresent(ReportDocumentMainDO::getDocumentCode, reqVO.getDocumentCode());
wrapper.eqIfPresent(ReportDocumentMainDO::getDocumentType, reqVO.getDocumentType()); wrapper.eqIfPresent(ReportDocumentMainDO::getDocumentType, reqVO.getDocumentType());
wrapper.eqIfPresent(ReportDocumentMainDO::getDocumentTitle, reqVO.getDocumentTitle()); wrapper.eqIfPresent(ReportDocumentMainDO::getDocumentTitle, reqVO.getDocumentTitle());
wrapper.eqIfPresent(ReportDocumentMainDO::getDocumentConfig, reqVO.getDocumentConfig()); wrapper.eqIfPresent(ReportDocumentMainDO::getDocumentConfig, reqVO.getDocumentConfig());

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