Merge remote-tracking branch '备份/dev' into dev
This commit is contained in:
commit
49d94eda9d
|
@ -213,7 +213,7 @@ public class AbilityCenterControllerV2 {
|
|||
tAbilityApplicationDTO.setEnclosureName(abilityBatchApplicationDTO.getEnclosureName());
|
||||
tAbilityApplicationDTO.setCreateDate(new Date());
|
||||
tAbilityApplicationDTO.setExpireDate(abilityBatchApplicationDTO.getExpireDate());
|
||||
tAbilityApplicationDTO.setResourceOwnerDept(sysDeptService.getByName(index.get("managementUnitName")));
|
||||
//tAbilityApplicationDTO.setResourceOwnerDept(sysDeptService.getByName(index.get("managementUnitName")));
|
||||
|
||||
|
||||
// 归为同一次申请
|
||||
|
@ -233,7 +233,6 @@ public class AbilityCenterControllerV2 {
|
|||
}).filter(ObjectUtil::isNotNull).collect(Collectors.toList()); // 申请入库
|
||||
if (!tAbilityApplicationDTOList.isEmpty()) {
|
||||
codeGenerationUtils.setApplyNumber("NLSY", tAbilityApplicationDTOList.stream().map(TAbilityApplicationDTO::getId).collect(Collectors.toList()), jdbcTemplate);
|
||||
|
||||
Map<Long, List<TAbilityApplicationDTO>> temp = tAbilityApplicationDTOList.stream()
|
||||
.filter(Objects::nonNull)
|
||||
.filter(index -> StringUtils.isNotEmpty(index.getResourceId()))
|
||||
|
|
|
@ -1953,19 +1953,63 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
public Object selectInfrastructureList() {
|
||||
HashMap<String, Object> resultMap = new HashMap<>();
|
||||
//云资源
|
||||
CompletableFuture<Void> yzy = CompletableFuture.runAsync(() -> {
|
||||
resultMap.put("云资源", resourceDao.selectYzyCount());
|
||||
}, executor);
|
||||
CompletableFuture<Void> yzy = CompletableFuture.runAsync(() -> resultMap.put("云资源", resourceDao.selectYzyCount()), executor);
|
||||
|
||||
//视频资源
|
||||
CompletableFuture<Void> jcss = CompletableFuture.runAsync(() -> {
|
||||
|
||||
switch (Constant.ProjectPlace.getByFlag(projectPlace)) {
|
||||
case TSINGTAO_XHA: { // 青岛西海岸
|
||||
CompletableFuture allAmount = CompletableFuture.supplyAsync(() -> { // 获取平台总基础设施数目
|
||||
List<Long> result = new CopyOnWriteArrayList<>();
|
||||
CompletableFuture cloud = CompletableFuture.runAsync(() -> { // 云脑专网
|
||||
String url = tsingtao_xhaProperties.getCamCount();
|
||||
logger.info(url);
|
||||
Request request = new Request.Builder().url(url).build();
|
||||
try (Response response = client.newCall(request).execute()) {
|
||||
if (response.isSuccessful()) {
|
||||
JSONObject jsonObject = JSON.parseObject(response.body().string());
|
||||
if (jsonObject.containsKey("errorNo") && jsonObject.getLongValue("errorNo") == 200) {
|
||||
result.add(jsonObject.getLongValue("body"));
|
||||
}
|
||||
} else {
|
||||
logger.error("青岛西海岸获取失败");
|
||||
}
|
||||
} catch (Exception exception) {
|
||||
logger.error("青岛西海岸失败", exception);
|
||||
}
|
||||
}, executor);
|
||||
CompletableFuture local = CompletableFuture.runAsync(() -> { // 金宏网
|
||||
String url = tsingtao_xhaProperties.getLocalcam();
|
||||
logger.info(url);
|
||||
Request request = new Request.Builder().url(url).build();
|
||||
try (Response response = client.newCall(request).execute()) {
|
||||
if (response.isSuccessful()) {
|
||||
JSONObject jsonObject = JSON.parseObject(response.body().string());
|
||||
if (jsonObject.containsKey("errorNo") && jsonObject.getLongValue("errorNo") == 200) {
|
||||
result.add(jsonObject.getLongValue("body"));
|
||||
}
|
||||
} else {
|
||||
logger.error("青岛西海岸获取失败");
|
||||
}
|
||||
} catch (Exception exception) {
|
||||
logger.error("青岛西海岸失败", exception);
|
||||
}
|
||||
}, executor);
|
||||
CompletableFuture all = CompletableFuture.allOf(cloud, local);
|
||||
all.join();
|
||||
return result.stream().filter(Objects::nonNull).findAny().orElse(0L);
|
||||
}).thenAccept(sum -> resultMap.put("视频资源", sum));
|
||||
allAmount.join();
|
||||
}
|
||||
break;
|
||||
case TSINGTAO: {
|
||||
QueryWrapper<CameraChannel> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("check_status", 1).ne("gps_x", "").ne("gps_y", "").isNotNull("gps_x").isNotNull("gps_y");
|
||||
resultMap.put("视频资源", cameraChannelMapper.selectCount(queryWrapper));
|
||||
|
||||
|
||||
}, executor);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
//新增会客厅和视频会议统计
|
||||
//会客厅
|
||||
|
@ -1977,10 +2021,9 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
}, executor);
|
||||
|
||||
//视频会议
|
||||
CompletableFuture<Void> sphy = CompletableFuture.runAsync(() -> {
|
||||
resultMap.put("视频会议", enkeService.page(new HashMap<>()).getTotal());
|
||||
}, executor);
|
||||
CompletableFuture<Void> all = CompletableFuture.allOf(jcss, hkt, sphy);
|
||||
CompletableFuture<Void> sphy = CompletableFuture.runAsync(() -> resultMap.put("视频会议", enkeService.page(new HashMap<>()).getTotal()), executor);
|
||||
|
||||
CompletableFuture<Void> all = CompletableFuture.allOf(yzy, hkt, sphy);
|
||||
all.join();
|
||||
|
||||
return resultMap;
|
||||
|
|
Loading…
Reference in New Issue