From 6a07620ba362197f89673f66e85d50a86b555edf Mon Sep 17 00:00:00 2001 From: wangliwen Date: Wed, 22 Jun 2022 09:11:39 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E7=BB=9F=E8=AE=A1=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E8=B5=84=E6=BA=90=E6=98=AF=E5=90=A6=E5=BD=92=E5=B1=9E?= =?UTF-8?q?=E4=B8=8A=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/renren/common/controller/CensusControllerV2.java | 4 +++- renren-admin/src/main/resources/application.yml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) 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: 青岛市大数据发展管理局