Merge branch 'master' into docker_package
This commit is contained in:
commit
a3e320ea4c
|
@ -101,7 +101,7 @@ public class AbilityCenterControllerV2 {
|
|||
return new Result().error("无应用资源");
|
||||
}
|
||||
List<Map<String, String>> system = system_.stream().map(index ->
|
||||
index.entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey, e -> (String) e.getValue()))
|
||||
index.entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey, e -> e.getValue().toString()))
|
||||
).collect(Collectors.toList());
|
||||
abilityBatchApplicationDTO.setSystem(system); // 申请所有的正常的应用资源
|
||||
|
||||
|
@ -109,7 +109,9 @@ public class AbilityCenterControllerV2 {
|
|||
abilityBatchApplicationDTO.setApplyFlag(applyFlag); // 同一次的申请标识
|
||||
final Optional<SysDeptDTO> deptDTO = Optional.ofNullable(sysDeptService.getByName(bigDateDeptName));
|
||||
final UserDetail user = SecurityUser.getUser();
|
||||
deal(abilityBatchApplicationDTO, deptDTO, applyFlag, user);
|
||||
CompletableFuture.runAsync(() -> {
|
||||
deal(abilityBatchApplicationDTO, deptDTO, applyFlag, user);
|
||||
}, executor);
|
||||
return new Result().ok(LocalDateTime.now().toString());
|
||||
}
|
||||
|
||||
|
@ -130,7 +132,9 @@ public class AbilityCenterControllerV2 {
|
|||
|
||||
final Optional<SysDeptDTO> deptDTO = Optional.ofNullable(sysDeptService.getByName(bigDateDeptName));
|
||||
final UserDetail user = SecurityUser.getUser();
|
||||
deal(abilityBatchApplicationDTO, deptDTO, applyFlag, user);
|
||||
CompletableFuture.runAsync(() -> {
|
||||
deal(abilityBatchApplicationDTO, deptDTO, applyFlag, user);
|
||||
}, executor);
|
||||
return new Result().ok(LocalDateTime.now().toString());
|
||||
}
|
||||
|
||||
|
@ -181,13 +185,19 @@ public class AbilityCenterControllerV2 {
|
|||
if (!tAbilityApplicationDTOList.isEmpty()) {
|
||||
codeGenerationUtils.setApplyNumber("NLSY", tAbilityApplicationDTOList.stream().map(TAbilityApplicationDTO::getId).collect(Collectors.toList()), jdbcTemplate);
|
||||
|
||||
Map<Long, List<TAbilityApplicationDTO>> temp = tAbilityApplicationDTOList.stream().filter(index -> StringUtils.isNotEmpty(index.getResourceId())).collect(Collectors.groupingBy(t -> {
|
||||
ResourceDTO resourceDTO = resourceService.get(Long.valueOf(t.getResourceId()));
|
||||
if (resourceDTO == null && deptDTO.isPresent()) { // 资源不存在时
|
||||
return deptDTO.get().getId();
|
||||
}
|
||||
return resourceDTO.getDeptId();
|
||||
})); // 按部门分组
|
||||
Map<Long, List<TAbilityApplicationDTO>> temp = tAbilityApplicationDTOList.stream()
|
||||
.filter(index -> index != null)
|
||||
.filter(index -> StringUtils.isNotEmpty(index.getResourceId()))
|
||||
.collect(Collectors.groupingBy(t -> {
|
||||
ResourceDTO resourceDTO = resourceService.get(Long.valueOf(t.getResourceId()));
|
||||
if (resourceDTO == null && deptDTO.isPresent()) { // 资源不存在时
|
||||
return deptDTO.get().getId();
|
||||
}
|
||||
if (resourceDTO.getDeptId() == null && deptDTO.isPresent()) {
|
||||
return deptDTO.get().getId();
|
||||
}
|
||||
return resourceDTO.getDeptId();
|
||||
})); // 按部门分组
|
||||
temp.keySet().stream().distinct().forEach(deptId -> {
|
||||
if (deptId == 0L) { // 部门id不存在时
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue