1、修改能力统计列表和详情-优化贡献组件分别被多少应用使用的sql
This commit is contained in:
parent
f7f04f90e0
commit
45952427fc
|
@ -375,7 +375,7 @@ public class CensusControllerV3 {
|
|||
public Result<List<Map<String,Object>>> applicationUsedCapabilityNum(Long id){
|
||||
Object[] ps = {id,id};
|
||||
List<Map<String, Object>> maps = jdbcTemplate.queryForList("SELECT COUNT(distinct(a.key_id)) as appNum,c.attr_value FROM (\n" +
|
||||
"SELECT a.key_id ,a.reference_id FROM tb_data_resource_rel a INNER JOIN tb_data_resource b ON a.key_id = b.id INNER JOIN sys_dept c on b.dept_id = c.id WHERE a.del_flag = 0 AND c.id = ? OR INSTR(c.pids,?) ORDER BY a.key_id \n" +
|
||||
"SELECT a.key_id ,a.reference_id FROM tb_data_resource_rel a INNER JOIN tb_data_resource b ON a.key_id = b.id INNER JOIN sys_dept c on b.dept_id = c.id WHERE a.del_flag = 0 AND (c.id = ? OR INSTR(c.pids,?)) ORDER BY a.key_id \n" +
|
||||
") a \n" +
|
||||
"INNER JOIN tb_data_resource b ON a.reference_id = b.id INNER JOIN tb_data_attr c ON a.reference_id = c.data_resource_id \n" +
|
||||
"WHERE c.attr_type = '组件类型' GROUP BY c.attr_value", ps);
|
||||
|
|
Loading…
Reference in New Issue