...增加资源所属部门名称

This commit is contained in:
wangliwen 2022-10-12 19:04:09 +08:00
parent e6191ab72e
commit 7c763efbd6
1 changed files with 31 additions and 9 deletions

View File

@ -1838,21 +1838,43 @@
</select> </select>
<select id="selectCensusApplyTable" resultType="java.util.Map"> <select id="selectCensusApplyTable" resultType="java.util.Map">
SELECT sd.name AS deptName, tdr.name AS resourceName, tdr.type, taa.create_date AS createDate, SELECT
taa.approve_status AS approveStatus, taa.apply_flag AS applyNumber sd.NAME AS deptName,
FROM (SELECT IF(d.type='组件服务', A.attr_value, d.type) AS type, d.id, d.del_flag, d.dept_id, d.create_date, tdr.NAME AS resourceName,
d.name dept.`name` AS resourceDeptName,
FROM tb_data_resource d LEFT JOIN tb_data_attr a ON d.id=a.data_resource_id AND a.attr_type='组件类型' AND tdr.type,
a.del_flag=0 taa.create_date AS createDate,
WHERE d.type NOT IN ('知识库','基础设施','数据资源')) tdr, taa.approve_status AS approveStatus,
taa.apply_flag AS applyNumber
FROM
(
SELECT
IF
( d.type = '组件服务', A.attr_value, d.type ) AS type,
d.id,
d.del_flag,
d.dept_id,
d.create_date,
d.NAME
FROM
tb_data_resource d
LEFT JOIN tb_data_attr a ON d.id = a.data_resource_id
AND a.attr_type = '组件类型'
AND a.del_flag = 0
WHERE
d.type NOT IN ( '知识库', '基础设施', '数据资源' )
) tdr,
sys_dept sd, sys_dept sd,
sys_user su, sys_user su,
t_ability_application taa t_ability_application taa,
WHERE 1 = 1 sys_dept dept
WHERE
1 = 1
AND tdr.del_flag = 0 AND tdr.del_flag = 0
AND taa.user_id = su.id AND taa.user_id = su.id
AND su.dept_id = sd.id AND su.dept_id = sd.id
AND taa.resource_id = tdr.id AND taa.resource_id = tdr.id
AND dept.id = tdr.dept_id
<choose> <choose>
<when test="approveStatus != null and approveStatus != ''"> <when test="approveStatus != null and approveStatus != ''">
AND taa.approve_status = #{approveStatus} AND taa.approve_status = #{approveStatus}