1、继续新增新能力统计页面部分后台代码

This commit is contained in:
yitonglei 2022-06-25 09:24:30 +08:00
parent 510c2806cb
commit a18d98e0b3
5 changed files with 24 additions and 4 deletions

View File

@ -256,7 +256,7 @@ public class CensusControllerV3 {
@ApiImplicitParam(name = "resourceType",value = "资源类型(组件服务、应用资源、基础设施、数据资源、知识库)", paramType = "query", dataType = "String")
})
public Result<List<Map<String,Object>>> applicationAreaCapabilitySet(@ApiIgnore @RequestParam Map<String, Object> params) {
return new Result<List<Map<String,Object>>>().ok(resourceService.applicationAreaCapabilitySet(params));
return new Result<List<Map<String,Object>>>().ok(resourceService.applicationAreaCapabilityList(params));
}

View File

@ -119,5 +119,5 @@ public interface ResourceDao extends BaseDao<ResourceEntity> {
Integer selectResourceShare(Map params);
// List<Map<String,Object>> selectDeptList(Map params);
List<Map<String,Object>> selectResurceCarDetails(Map params);
List<Map<String,Object>> applicationAreaCapabilitySet(Map params);
List<Map<String,Object>> applicationAreaCapabilityList(Map params);
}

View File

@ -93,5 +93,5 @@ public interface ResourceService extends CrudService<ResourceEntity, ResourceDTO
List<Map<String,Object>> resourceDatasDetails(Map<String,Object> params);
List<Map<String,Object>> resourceKnowledgeDetails(Map<String,Object> params);
List<Map<String,Object>> assemblerCarDetail(Map<String,Object> params);
List<Map<String,Object>> applicationAreaCapabilitySet(Map params);
List<Map<String,Object>> applicationAreaCapabilityList(Map params);
}

View File

@ -733,6 +733,10 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
return resultMap;
}
@Override
public List<Map<String,Object>> applicationAreaCapabilityList(Map params){
return resourceDao.applicationAreaCapabilityList(params);
}
@Override
public Object selectResourceListByType(String type) {
return resourceDao.selectByType(type);
@ -1181,7 +1185,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
"INNER JOIN tb_data_resource c ON a.resource_id = c.id \n" +
"WHERE b.dept_id = ? AND c.type = ?\n" +
"ORDER BY a.create_date DESC \n" +
"LIMIT ?,?\n", ps);
"LIMIT ?,?\n",ps);
return result;
}

View File

@ -899,6 +899,22 @@
type
</select>
<select id="applicationAreaCapabilitySet" parameterType="java.util.Map" resultType="java.util.Map">
SELECT
SUBSTRING_INDEX( SUBSTRING_INDEX( tdav.attr_value, ';', b.help_topic_id + 1 ), ';',- 1 ) AS type ,
COUNT( tdav.data_resource_id ) AS total
FROM
tb_data_attr tdav
JOIN mysql.help_topic b ON b.help_topic_id &lt; ( LENGTH( tdav.attr_value ) - LENGTH( REPLACE ( tdav.attr_value,
';', '' ) ) + 1 )
WHERE
1 = 1
AND tdav.attr_type = '应用领域'
AND tdav.del_flag = 0
AND SUBSTRING_INDEX( SUBSTRING_INDEX( tdav.attr_value, ';', b.help_topic_id + 1 ), ';',- 1 ) != ''
GROUP BY
type
</select>
<select id="applicationAreaCapabilityList" parameterType="java.util.Map" resultType="java.util.Map">
SELECT
SUBSTRING_INDEX( SUBSTRING_INDEX( tdav.attr_value, ';', b.help_topic_id + 1 ), ';',- 1 ) AS type ,
COUNT( tdav.data_resource_id ) AS total