配置统计时,资源是否归属上级
This commit is contained in:
parent
3dc4676491
commit
6a07620ba3
|
@ -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> sysDeptDTO =
|
||||
Optional.ofNullable(sysDeptService.get(Long.valueOf(index.get("pid").toString())));
|
||||
if (sysDeptDTO.isPresent() && sysDeptDTO.get().getType() != null && sysDeptDTO.get().getType() >= 2) {
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
project:
|
||||
# 平台部署位置 0:青岛市区 1:青岛西海岸 2:包头
|
||||
place: 0
|
||||
# 是否将资源归为上级
|
||||
higher: false
|
||||
# 大数据部门相关配置
|
||||
big_date:
|
||||
name: 青岛市大数据发展管理局
|
||||
|
|
Loading…
Reference in New Issue