Merge branch 'master' into docker_package
This commit is contained in:
commit
bbffe9a6e5
|
@ -134,7 +134,7 @@ public class CensusControllerV2 {
|
|||
});
|
||||
});
|
||||
CompletableFuture<Void> buildingApplicationAmount = CompletableFuture.supplyAsync(() -> { // 获取平台建设中数目
|
||||
return jdbcTemplate.queryForObject("SELECT COUNT(DISTINCT data_resource_id) FROM tb_data_attr WHERE attr_type = '应用状态' AND attr_value = '建设中';", Long.class);
|
||||
return jdbcTemplate.queryForObject("SELECT COUNT(DISTINCT data_resource_id) FROM tb_data_attr WHERE EXISTS ( SELECT id FROM tb_data_resource WHERE tb_data_resource.id = tb_data_attr.data_resource_id AND tb_data_resource.del_flag = 0 ) AND attr_type = '应用状态' AND attr_value = '建设中';", Long.class);
|
||||
}).thenAccept(sum -> {
|
||||
result.add(new HashMap<String, Object>() {
|
||||
{
|
||||
|
@ -144,7 +144,7 @@ public class CensusControllerV2 {
|
|||
});
|
||||
});
|
||||
CompletableFuture<Void> endApplicationAmount = CompletableFuture.supplyAsync(() -> { // 获取平台建设中数目
|
||||
return jdbcTemplate.queryForObject("SELECT COUNT(DISTINCT data_resource_id) FROM tb_data_attr WHERE attr_type = '应用状态' AND attr_value = '停用';", Long.class);
|
||||
return jdbcTemplate.queryForObject("SELECT COUNT(DISTINCT data_resource_id) FROM tb_data_attr WHERE EXISTS ( SELECT id FROM tb_data_resource WHERE tb_data_resource.id = tb_data_attr.data_resource_id AND tb_data_resource.del_flag = 0 ) AND attr_type = '应用状态' AND attr_value = '停用';", Long.class);
|
||||
}).thenAccept(sum -> {
|
||||
result.add(new HashMap<String, Object>() {
|
||||
{
|
||||
|
@ -183,7 +183,7 @@ public class CensusControllerV2 {
|
|||
String sql = String.format("SELECT COUNT(id) FROM tb_data_resource WHERE dept_id = %s AND type = '应用资源' AND del_flag = 0;", index.get("id").toString());
|
||||
logger.info(sql);
|
||||
Long count = jdbcTemplate.queryForObject(sql, Long.class);
|
||||
if (!"0" .equals(index.get("pid").toString()) && higher) { // 有上级部门 且 配置资源归属上级
|
||||
if (!"0".equals(index.get("pid").toString()) && higher) { // 有上级部门 且 配置资源归属上级
|
||||
Optional<SysDeptDTO> sysDeptDTO =
|
||||
Optional.ofNullable(sysDeptService.get(Long.valueOf(index.get("pid").toString())));
|
||||
if (sysDeptDTO.isPresent() && sysDeptDTO.get().getType() != null && sysDeptDTO.get().getType() >= 2) {
|
||||
|
@ -235,11 +235,9 @@ public class CensusControllerV2 {
|
|||
});
|
||||
|
||||
|
||||
String sqlFormat = "SELECT COUNT( tda.data_resource_id ) FROM tb_data_attr tda JOIN tb_data_resource tdr ON\n" +
|
||||
"tda.data_resource_id = tdr.id AND tda.attr_value = '%s' AND tda.attr_type = '组件类型' AND tda.del_flag = 0 AND tdr.del_flag = 0;";
|
||||
String sqlFormat = "SELECT COUNT( tda.data_resource_id ) FROM tb_data_attr tda JOIN tb_data_resource tdr ON tda.data_resource_id = tdr.id AND MATCH ( tda.attr_value) AGAINST ( '%s' IN BOOLEAN MODE) AND tda.attr_type = '组件类型' AND tda.del_flag = 0 AND tdr.del_flag = 0;";
|
||||
|
||||
CompletableFuture<Void> aiAssemblyAmount = CompletableFuture.supplyAsync(() -> { // 获取平台智能算法组件服务数目
|
||||
// return jdbcTemplate.queryForObject("SELECT COUNT(DISTINCT tb_data_resource.id) FROM tb_data_resource WHERE tb_data_resource.del_flag = 0 AND EXISTS(SELECT tb_data_attr.id FROM tb_data_attr WHERE tb_data_attr.data_resource_id = tb_data_resource.id AND tb_data_attr.attr_value = '智能算法' AND attr_type = '组件类型')", Long.class);
|
||||
return jdbcTemplate.queryForObject(String.format(sqlFormat, "智能算法"), Long.class);
|
||||
}).thenAccept(sum -> {
|
||||
result.add(new HashMap<String, Object>() {
|
||||
|
@ -250,7 +248,6 @@ public class CensusControllerV2 {
|
|||
});
|
||||
});
|
||||
CompletableFuture<Void> gisAssemblyAmount = CompletableFuture.supplyAsync(() -> { // 获取平台图层服务组件服务数目
|
||||
// return jdbcTemplate.queryForObject("SELECT COUNT(DISTINCT tb_data_resource.id) FROM tb_data_resource WHERE tb_data_resource.del_flag = 0 AND EXISTS(SELECT tb_data_attr.id FROM tb_data_attr WHERE tb_data_attr.data_resource_id = tb_data_resource.id AND tb_data_attr.attr_value = '图层服务' AND attr_type = '组件类型')", Long.class);
|
||||
return jdbcTemplate.queryForObject(String.format(sqlFormat, "图层服务"), Long.class);
|
||||
}).thenAccept(sum -> {
|
||||
result.add(new HashMap<String, Object>() {
|
||||
|
@ -261,7 +258,6 @@ public class CensusControllerV2 {
|
|||
});
|
||||
});
|
||||
CompletableFuture<Void> busAssemblyAmount = CompletableFuture.supplyAsync(() -> { // 获取平台业务组件组件服务数目
|
||||
// return jdbcTemplate.queryForObject("SELECT COUNT(DISTINCT tb_data_resource.id) FROM tb_data_resource WHERE tb_data_resource.del_flag = 0 AND EXISTS(SELECT tb_data_attr.id FROM tb_data_attr WHERE tb_data_attr.data_resource_id = tb_data_resource.id AND tb_data_attr.attr_value = '业务组件' AND attr_type = '组件类型')", Long.class);
|
||||
return jdbcTemplate.queryForObject(String.format(sqlFormat, "业务组件"), Long.class);
|
||||
}).thenAccept(sum -> {
|
||||
result.add(new HashMap<String, Object>() {
|
||||
|
@ -272,7 +268,6 @@ public class CensusControllerV2 {
|
|||
});
|
||||
});
|
||||
CompletableFuture<Void> devAssemblyAmount = CompletableFuture.supplyAsync(() -> { // 获取平台业务组件组件服务数目
|
||||
// return jdbcTemplate.queryForObject("SELECT COUNT(DISTINCT tb_data_resource.id) FROM tb_data_resource WHERE tb_data_resource.del_flag = 0 AND EXISTS(SELECT tb_data_attr.id FROM tb_data_attr WHERE tb_data_attr.data_resource_id = tb_data_resource.id AND tb_data_attr.attr_value = '开发组件' AND attr_type = '组件类型')", Long.class);
|
||||
return jdbcTemplate.queryForObject(String.format(sqlFormat, "开发组件"), Long.class);
|
||||
}).thenAccept(sum -> {
|
||||
result.add(new HashMap<String, Object>() {
|
||||
|
|
|
@ -932,6 +932,9 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
public Object capabilityTypeCapabilitySet() {
|
||||
HashMap<String, Object> resultMap = new HashMap<>();
|
||||
List<String> types = resourceDao.selectMaxType();
|
||||
if (types.isEmpty()) {
|
||||
return resultMap;
|
||||
}
|
||||
List<Map> resourceList = resourceDao.selectByType(types.get(0));
|
||||
HashMap<String, Object> maxdeptMap = new HashMap<>();
|
||||
maxdeptMap.put("resourceList", resourceList);
|
||||
|
@ -946,6 +949,9 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
public Object applicationAreaCapabilitySet() {
|
||||
HashMap<String, Object> resultMap = new HashMap<>();
|
||||
List<String> types = resourceDao.selectMaxAppArea();
|
||||
if (types.isEmpty()) {
|
||||
return resultMap;
|
||||
}
|
||||
List<Map> resourceList = resourceDao.selectByAppArea(types.get(0));
|
||||
HashMap<String, Object> maxAppAreaMap = new HashMap<>();
|
||||
maxAppAreaMap.put("resourceList", resourceList);
|
||||
|
|
|
@ -1009,7 +1009,6 @@
|
|||
AND tda.del_flag = 0
|
||||
AND tdr.id = tda.data_resource_id
|
||||
AND MATCH (attr_value) AGAINST ( #{type} IN BOOLEAN MODE)
|
||||
<!-- AND attr_value LIKE CONCAT('%', #{type}, '%') -->
|
||||
</select>
|
||||
|
||||
<select id="selectAppAreaCountList" resultType="java.util.Map">
|
||||
|
|
Loading…
Reference in New Issue