feat:报告类型发起权限
This commit is contained in:
@@ -9,4 +9,72 @@
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
<select id="selectListWithPermission" resultType="com.zt.plat.module.qms.business.reportdoc.dal.dataobject.ReportDocumentTypeDO">
|
||||
select
|
||||
t.id as id,
|
||||
t.CFG_RPT_TP_ID as configReportTypeId,
|
||||
t.NAME as name,
|
||||
t.FLW_KY as flowKey,
|
||||
t.RPT_KY as reportKey,
|
||||
t.CD_RUL as codeRule,
|
||||
t.DOC_TP as documentType,
|
||||
t.PERM as permission,
|
||||
t.SMP_CNT as sampleCount,
|
||||
t.CST_CFG as customConfig,
|
||||
t.SYS_DEPT_CD as systemDepartmentCode,
|
||||
t.RMK as remark,
|
||||
t.VER as version,
|
||||
t.SRT_NO as sortNo,
|
||||
t.CRNT_FLG as currentFlag,
|
||||
t.MAIN_ID as mainId,
|
||||
t.PG_CPNT as pageComponent,
|
||||
t.PG_CPNT_MOB as pageComponentMobile
|
||||
from T_RPT_DOC_TP t
|
||||
<where>
|
||||
<if test="param.configReportTypeId != null and param.configReportTypeId != ''">
|
||||
and t.CFG_RPT_TP_ID = #{param.configReportTypeId}
|
||||
</if>
|
||||
<if test="param.name != null and param.name != ''">
|
||||
and t.NAME like concat('%',#{param.name},'%')
|
||||
</if>
|
||||
<if test="param.mainId != null">
|
||||
and t.MAIN_ID = #{param.mainId}
|
||||
</if>
|
||||
<if test="param.documentType != null and param.documentType != ''">
|
||||
and t.DOC_TP = #{param.documentType}
|
||||
</if>
|
||||
<if test="param.currentFlag != null">
|
||||
and t.CRNT_FLG = #{param.currentFlag}
|
||||
</if>
|
||||
<if test="param.permissionFilterFlag != null and param.permissionFilterFlag != ''">
|
||||
and (
|
||||
<if test="param.roleIds != null and param.roleIds.size > 0">
|
||||
exists(
|
||||
select 1
|
||||
from T_CFG_PERM p
|
||||
where t.MAIN_ID = p.SRC_ID
|
||||
and p.SRC_TP = #{param.srcPermissionType}
|
||||
and p.TGT_ID in (
|
||||
<foreach item="item" collection="param.roleIds" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
)
|
||||
and p.TGT_TP = 'role'
|
||||
and p.DELETED = 0
|
||||
)
|
||||
or
|
||||
</if>
|
||||
not exists(
|
||||
select 1 from T_CFG_PERM p where t.MAIN_ID = p.SRC_ID
|
||||
and p.SRC_TP = #{param.srcPermissionType}
|
||||
and p.DELETED = 0
|
||||
)
|
||||
)
|
||||
</if>
|
||||
and t.DELETED = 0
|
||||
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user