diff --git a/renren-admin/src/main/java/io/renren/common/controller/CensusControllerV2.java b/renren-admin/src/main/java/io/renren/common/controller/CensusControllerV2.java index cfdf9fd8..2ffaf28d 100644 --- a/renren-admin/src/main/java/io/renren/common/controller/CensusControllerV2.java +++ b/renren-admin/src/main/java/io/renren/common/controller/CensusControllerV2.java @@ -42,6 +42,8 @@ import java.util.stream.Collectors; public class CensusControllerV2 { @Value("${project.place}") private Integer projectPlace; + @Value("${project.higher}") + private Boolean higher; private static final Logger logger = LoggerFactory.getLogger(CensusControllerV2.class); @Autowired @@ -175,7 +177,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())) { // 有上级部门 + if (!"0".equals(index.get("pid").toString()) && higher) { // 有上级部门 且 配置资源归属上级 Optional sysDeptDTO = Optional.ofNullable(sysDeptService.get(Long.valueOf(index.get("pid").toString()))); if (sysDeptDTO.isPresent() && sysDeptDTO.get().getType() != null && sysDeptDTO.get().getType() >= 2) { diff --git a/renren-admin/src/main/resources/application.yml b/renren-admin/src/main/resources/application.yml index 35bf83c3..d7b7112e 100644 --- a/renren-admin/src/main/resources/application.yml +++ b/renren-admin/src/main/resources/application.yml @@ -1,6 +1,8 @@ project: -# 平台部署位置 0:青岛市区 1:青岛西海岸 2:包头 + # 平台部署位置 0:青岛市区 1:青岛西海岸 2:包头 place: 0 + # 是否将资源归为上级 + higher: false # 大数据部门相关配置 big_date: name: 青岛市大数据发展管理局