|
|
@@ -152,7 +152,7 @@ public class ResumptionReportServiceImpl implements ResumptionReportService {
|
|
|
|
|
|
CompletableFuture<Void> allQueries = CompletableFuture.allOf(completableFutureList.toArray(new CompletableFuture[0]));
|
|
|
|
|
|
- allQueries.get(10L, TimeUnit.SECONDS);
|
|
|
+ allQueries.get(15L, TimeUnit.SECONDS);
|
|
|
|
|
|
completableFutureList.forEach(x -> {
|
|
|
resumptionDayVOS.add(x.join());
|
|
|
@@ -257,7 +257,7 @@ public class ResumptionReportServiceImpl implements ResumptionReportService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void intrusionTestExport(ResumptionDTO resumptionDTO, HttpServletResponse response) throws IOException {
|
|
|
+ public void intrusionTestExport(ResumptionDTO resumptionDTO, HttpServletResponse response) throws IOException , ExecutionException, InterruptedException, TimeoutException{
|
|
|
String orgName = null;
|
|
|
if (null != resumptionDTO.getOrgId()) {
|
|
|
SysOrg sysOrg = orgService.selectSysOrgById(resumptionDTO.getOrgId(), SecurityConstants.INNER);
|
|
|
@@ -287,7 +287,7 @@ public class ResumptionReportServiceImpl implements ResumptionReportService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<IntrusionTestReportVO> intrusionTest(ResumptionDTO resumptionDTO) {
|
|
|
+ public List<IntrusionTestReportVO> intrusionTest(ResumptionDTO resumptionDTO) throws ExecutionException, InterruptedException, TimeoutException {
|
|
|
if (null == resumptionDTO.getOrgId()) {
|
|
|
resumptionDTO.setOrgId(SecurityUtils.getLoginUser().getOrgId());
|
|
|
}
|
|
|
@@ -305,43 +305,93 @@ public class ResumptionReportServiceImpl implements ResumptionReportService {
|
|
|
return Collections.emptyList();
|
|
|
}
|
|
|
List<IntrusionTestReportVO> intrusionTestReportVOList = new ArrayList<>(16);
|
|
|
+// sysOrgs.forEach(o -> {
|
|
|
+// IntrusionTestReportVO intrusionTestReportVO = new IntrusionTestReportVO();
|
|
|
+//// SysOrg sysOrg1;
|
|
|
+//// if (sysOrg.getType() < 3 || sysOrg.getShortName().endsWith("地区行社") || sysOrg.getType() == 9) {
|
|
|
+//// sysOrg1 = orgService.selectOrgById(o.getParentId(), SecurityConstants.INNER);
|
|
|
+//// } else {
|
|
|
+//// sysOrg1 = orgService.selectOrgById(orgService.selectOrgById(o.getParentId(), SecurityConstants.INNER).getParentId(), SecurityConstants.INNER);
|
|
|
+//// if (-1 == sysOrg1.getShortName().indexOf("地区行社")) {
|
|
|
+//// sysOrg1 = orgService.selectOrgById(orgService.selectOrgById(orgService.selectOrgById(o.getParentId(), SecurityConstants.INNER).getParentId(), SecurityConstants.INNER).getParentId(), SecurityConstants.INNER);
|
|
|
+//// }
|
|
|
+//// }
|
|
|
+// IntrusionTestReportVO intrusionTestReportVO1 = resumptionReportMapper.selectIntrusionTestReport(null, resumptionDTO.getSearchTime(), o.getPath());
|
|
|
+// Integer integer = monitorAccessReportMapper.selectOrgNumByPathAndType(o.getPath(), OrgTypeEnum.YINGYE_WANGDIAN.getCode());
|
|
|
+// //隐患
|
|
|
+// Map map = resumptionReportMapper.selectIntrusionTestAbnormalNumber(null, resumptionDTO.getSearchTime(), o.getPath());
|
|
|
+// if (o.getType() == 4) {
|
|
|
+// integer = 1;
|
|
|
+// intrusionTestReportVO1 = resumptionReportMapper.selectIntrusionTestReport(o.getId(), resumptionDTO.getSearchTime(), null);
|
|
|
+// map = resumptionReportMapper.selectIntrusionTestAbnormalNumber(o.getId(), resumptionDTO.getSearchTime(), null);
|
|
|
+// }
|
|
|
+// BeanUtils.copyProperties(intrusionTestReportVO1, intrusionTestReportVO);
|
|
|
+// Object abnormalNumber = map.get("abnormalNumber");
|
|
|
+// Object realityRectificationNumber = map.get("realityRectificationNumber");
|
|
|
+// Object realityRectificationRate = map.get("realityRectificationRate");
|
|
|
+// intrusionTestReportVO.setAbnormalNumber(Integer.valueOf(abnormalNumber.toString()));
|
|
|
+// intrusionTestReportVO.setRealityRectificationNumber(Integer.valueOf(realityRectificationNumber.toString()));
|
|
|
+// intrusionTestReportVO.setRealityRectificationRate(realityRectificationRate.toString());
|
|
|
+//// intrusionTestReportVO.setCity(sysOrg1.getShortName().indexOf("地区行社") == -1 ? sysOrg1.getShortName().substring(0, 2) : sysOrg1.getShortName().split("地区行社")[0]);
|
|
|
+// intrusionTestReportVO.setCity(o.getAffiliatedArea());
|
|
|
+// intrusionTestReportVO.setOrgName(o.getShortName());
|
|
|
+// intrusionTestReportVO.setNetworkNumber(integer);
|
|
|
+// intrusionTestReportVOList.add(intrusionTestReportVO);
|
|
|
+// });
|
|
|
+// return intrusionTestReportVOList;
|
|
|
+
|
|
|
+ List<CompletableFuture<IntrusionTestReportVO>> completableFutureList = new ArrayList<>();
|
|
|
sysOrgs.forEach(o -> {
|
|
|
- IntrusionTestReportVO intrusionTestReportVO = new IntrusionTestReportVO();
|
|
|
- SysOrg sysOrg1;
|
|
|
- if (sysOrg.getType() < 3 || sysOrg.getShortName().endsWith("地区行社") || sysOrg.getType() == 9) {
|
|
|
- sysOrg1 = orgService.selectOrgById(o.getParentId(), SecurityConstants.INNER);
|
|
|
- } else {
|
|
|
- sysOrg1 = orgService.selectOrgById(orgService.selectOrgById(o.getParentId(), SecurityConstants.INNER).getParentId(), SecurityConstants.INNER);
|
|
|
- if (-1 == sysOrg1.getShortName().indexOf("地区行社")) {
|
|
|
- sysOrg1 = orgService.selectOrgById(orgService.selectOrgById(orgService.selectOrgById(o.getParentId(), SecurityConstants.INNER).getParentId(), SecurityConstants.INNER).getParentId(), SecurityConstants.INNER);
|
|
|
- }
|
|
|
- }
|
|
|
- IntrusionTestReportVO intrusionTestReportVO1 = resumptionReportMapper.selectIntrusionTestReport(null, resumptionDTO.getSearchTime(), o.getPath());
|
|
|
- Integer integer = monitorAccessReportMapper.selectOrgNumByPathAndType(o.getPath(), OrgTypeEnum.YINGYE_WANGDIAN.getCode());
|
|
|
- //隐患
|
|
|
- Map map = resumptionReportMapper.selectIntrusionTestAbnormalNumber(null, resumptionDTO.getSearchTime(), o.getPath());
|
|
|
- if (o.getType() == 4) {
|
|
|
- integer = 1;
|
|
|
- intrusionTestReportVO1 = resumptionReportMapper.selectIntrusionTestReport(o.getId(), resumptionDTO.getSearchTime(), null);
|
|
|
- map = resumptionReportMapper.selectIntrusionTestAbnormalNumber(o.getId(), resumptionDTO.getSearchTime(), null);
|
|
|
- }
|
|
|
- BeanUtils.copyProperties(intrusionTestReportVO1, intrusionTestReportVO);
|
|
|
- Object abnormalNumber = map.get("abnormalNumber");
|
|
|
- Object realityRectificationNumber = map.get("realityRectificationNumber");
|
|
|
- Object realityRectificationRate = map.get("realityRectificationRate");
|
|
|
- intrusionTestReportVO.setAbnormalNumber(Integer.valueOf(abnormalNumber.toString()));
|
|
|
- intrusionTestReportVO.setRealityRectificationNumber(Integer.valueOf(realityRectificationNumber.toString()));
|
|
|
- intrusionTestReportVO.setRealityRectificationRate(realityRectificationRate.toString());
|
|
|
- intrusionTestReportVO.setCity(sysOrg1.getShortName().indexOf("地区行社") == -1 ? sysOrg1.getShortName().substring(0, 2) : sysOrg1.getShortName().split("地区行社")[0]);
|
|
|
- intrusionTestReportVO.setOrgName(o.getShortName());
|
|
|
- intrusionTestReportVO.setNetworkNumber(integer);
|
|
|
- intrusionTestReportVOList.add(intrusionTestReportVO);
|
|
|
+ CompletableFuture<IntrusionTestReportVO> getOneOrgIntrusionTestVO = CompletableFuture.supplyAsync(() ->
|
|
|
+ getOneIntrusionTestData(o, resumptionDTO), threadPoolTaskExecutor
|
|
|
+ );
|
|
|
+ completableFutureList.add(getOneOrgIntrusionTestVO);
|
|
|
+ });
|
|
|
+
|
|
|
+ CompletableFuture<Void> allQueries = CompletableFuture.allOf(completableFutureList.toArray(new CompletableFuture[0]));
|
|
|
+
|
|
|
+ allQueries.get(15L, TimeUnit.SECONDS);
|
|
|
+
|
|
|
+ completableFutureList.forEach(x -> {
|
|
|
+ intrusionTestReportVOList.add(x.join());
|
|
|
});
|
|
|
return intrusionTestReportVOList;
|
|
|
}
|
|
|
|
|
|
+ private IntrusionTestReportVO getOneIntrusionTestData(SysOrg o,ResumptionDTO resumptionDTO){
|
|
|
+ IntrusionTestReportVO resultVo = new IntrusionTestReportVO();
|
|
|
+ IntrusionTestReportVO tempIntrusionTestReportVO1 =null;
|
|
|
+ Integer networkNumber =null;
|
|
|
+ Map map =null;
|
|
|
+
|
|
|
+ if(o.getType()==4)
|
|
|
+ {
|
|
|
+ networkNumber =1;
|
|
|
+ tempIntrusionTestReportVO1 = resumptionReportMapper.selectIntrusionTestReport(o.getId(), resumptionDTO.getSearchTime(), null);
|
|
|
+ map = resumptionReportMapper.selectIntrusionTestAbnormalNumber(o.getId(), resumptionDTO.getSearchTime(), null);
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ networkNumber = monitorAccessReportMapper.selectOrgNumByPathAndType(o.getPath(), OrgTypeEnum.YINGYE_WANGDIAN.getCode());
|
|
|
+ tempIntrusionTestReportVO1 = resumptionReportMapper.selectIntrusionTestReport(null, resumptionDTO.getSearchTime(), o.getPath());
|
|
|
+ //隐患
|
|
|
+ map = resumptionReportMapper.selectIntrusionTestAbnormalNumber(null, resumptionDTO.getSearchTime(), o.getPath());
|
|
|
+
|
|
|
+ }
|
|
|
+ BeanUtils.copyProperties(tempIntrusionTestReportVO1, resultVo);
|
|
|
+ Object abnormalNumber = map.get("abnormalNumber");
|
|
|
+ Object realityRectificationNumber = map.get("realityRectificationNumber");
|
|
|
+ Object realityRectificationRate = map.get("realityRectificationRate");
|
|
|
+ resultVo.setAbnormalNumber(Integer.valueOf(abnormalNumber.toString()));
|
|
|
+ resultVo.setRealityRectificationNumber(Integer.valueOf(realityRectificationNumber.toString()));
|
|
|
+ resultVo.setRealityRectificationRate(realityRectificationRate.toString());
|
|
|
+ resultVo.setCity(o.getAffiliatedArea());
|
|
|
+ resultVo.setOrgName(o.getShortName());
|
|
|
+ resultVo.setNetworkNumber(networkNumber);
|
|
|
+ return resultVo;
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
- public void standbyPowerExport(ResumptionDTO resumptionDTO, HttpServletResponse response) throws IOException {
|
|
|
+ public void standbyPowerExport(ResumptionDTO resumptionDTO, HttpServletResponse response) throws IOException,ExecutionException, InterruptedException, TimeoutException {
|
|
|
String orgName = null;
|
|
|
if (null != resumptionDTO.getOrgId()) {
|
|
|
SysOrg sysOrg = orgService.selectSysOrgById(resumptionDTO.getOrgId(), SecurityConstants.INNER);
|
|
|
@@ -372,21 +422,24 @@ public class ResumptionReportServiceImpl implements ResumptionReportService {
|
|
|
|
|
|
|
|
|
@Override
|
|
|
- public List<LhSelfBankInspectionReport> serviceBank(ResumptionDTO resumptionDTO) throws Exception {
|
|
|
+ public List<LhSelfBankInspectionReport> serviceBank(ResumptionDTO resumptionDTO) throws Exception,ExecutionException, InterruptedException, TimeoutException {
|
|
|
if (null == resumptionDTO.getOrgId()) {
|
|
|
resumptionDTO.setOrgId(SecurityUtils.getLoginUser().getOrgId());
|
|
|
}
|
|
|
//判断机构类型,如果机构类型大于行社,都展示行社数据
|
|
|
SysOrg sysOrg = orgService.selectSysOrgById(resumptionDTO.getOrgId(), SecurityConstants.INNER);
|
|
|
- List<SysOrg> sysOrgs = orgService.selectSysOrgByPathAndType(sysOrg.getPath(), 3, SecurityConstants.INNER);
|
|
|
if (null == sysOrg.getType()) {
|
|
|
return Collections.emptyList();
|
|
|
}
|
|
|
+ List<SysOrg> sysOrgs = orgService.selectSysOrgByPathAndType(sysOrg.getPath(), 3, SecurityConstants.INNER);
|
|
|
+
|
|
|
//如果查看省联社/地区 数据,那么就展示离行机构数量
|
|
|
//如果查看行社数据,那么列表上展示离行机构名称
|
|
|
boolean showOrgName = sysOrg.getType() == 3;
|
|
|
List<LhSelfBankInspectionReport> intrusionTestReportVOList = new ArrayList<>();
|
|
|
+ List<CompletableFuture<LhSelfBankInspectionReport>> completableFutureList = new ArrayList<>();
|
|
|
if (!showOrgName) {
|
|
|
+
|
|
|
for (SysOrg hsOrg : sysOrgs) {
|
|
|
CompletableFuture<LhSelfBankInspectionReport> future = CompletableFuture.supplyAsync(() -> {
|
|
|
LhSelfBankInspectionReport intrusionTestReportVO = resumptionReportMapper.selectServiceBankReport(null, resumptionDTO.getSearchTime(), hsOrg.getPath());
|
|
|
@@ -396,8 +449,14 @@ public class ResumptionReportServiceImpl implements ResumptionReportService {
|
|
|
intrusionTestReportVO.setNetworkNumber(orgNums);
|
|
|
return intrusionTestReportVO;
|
|
|
}, threadPoolTaskExecutor);
|
|
|
- intrusionTestReportVOList.add(future.get(5, TimeUnit.SECONDS));
|
|
|
+ completableFutureList.add(future);
|
|
|
+// intrusionTestReportVOList.add(future.get(5, TimeUnit.SECONDS));
|
|
|
}
|
|
|
+ CompletableFuture<Void> allQueries = CompletableFuture.allOf(completableFutureList.toArray(new CompletableFuture[0]));
|
|
|
+ allQueries.get(15L, TimeUnit.SECONDS);
|
|
|
+ completableFutureList.forEach(x -> {
|
|
|
+ intrusionTestReportVOList.add(x.join());
|
|
|
+ });
|
|
|
} else {
|
|
|
for (SysOrg hsOrg : sysOrgs) {
|
|
|
List<SysOrg> lhOrgList = orgService.selectSysOrgByPathAndType(sysOrg.getPath(), OrgTypeEnum.LIHANG_ZIZHU_YINGHANG.getCode(), SecurityConstants.INNER);
|
|
|
@@ -409,7 +468,16 @@ public class ResumptionReportServiceImpl implements ResumptionReportService {
|
|
|
intrusionTestReportVO.setLhOrgName(lhOrg.getShortName());
|
|
|
return intrusionTestReportVO;
|
|
|
}, threadPoolTaskExecutor);
|
|
|
- intrusionTestReportVOList.add(future.get(5, TimeUnit.SECONDS));
|
|
|
+ completableFutureList.add(future);
|
|
|
+// intrusionTestReportVOList.add(future.get(5, TimeUnit.SECONDS));
|
|
|
+ }
|
|
|
+ if(completableFutureList.size()>0)
|
|
|
+ {
|
|
|
+ CompletableFuture<Void> allQueries = CompletableFuture.allOf(completableFutureList.toArray(new CompletableFuture[0]));
|
|
|
+ allQueries.get(15L, TimeUnit.SECONDS);
|
|
|
+ completableFutureList.forEach(x -> {
|
|
|
+ intrusionTestReportVOList.add(x.join());
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -421,7 +489,7 @@ public class ResumptionReportServiceImpl implements ResumptionReportService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<IntrusionTestReportVO> standbyPower(ResumptionDTO resumptionDTO) {
|
|
|
+ public List<IntrusionTestReportVO> standbyPower(ResumptionDTO resumptionDTO) throws ExecutionException, InterruptedException, TimeoutException{
|
|
|
if (null != resumptionDTO.getSearchTime()) {
|
|
|
String[] split = resumptionDTO.getSearchTime().split("-");
|
|
|
Integer s = Integer.valueOf(split[1]);
|
|
|
@@ -455,40 +523,87 @@ public class ResumptionReportServiceImpl implements ResumptionReportService {
|
|
|
return Collections.emptyList();
|
|
|
}
|
|
|
List<IntrusionTestReportVO> intrusionTestReportVOList = new ArrayList<>(16);
|
|
|
+// sysOrgs.forEach(o -> {
|
|
|
+// IntrusionTestReportVO intrusionTestReportVO = new IntrusionTestReportVO();
|
|
|
+//// SysOrg sysOrg1;
|
|
|
+//// if (sysOrg.getType() < 3 || sysOrg.getShortName().endsWith("地区行社") || sysOrg.getType() == 9) {
|
|
|
+//// sysOrg1 = orgService.selectOrgById(o.getParentId(), SecurityConstants.INNER);
|
|
|
+//// } else {
|
|
|
+//// sysOrg1 = orgService.selectOrgById(orgService.selectOrgById(o.getParentId(), SecurityConstants.INNER).getParentId(), SecurityConstants.INNER);
|
|
|
+//// }
|
|
|
+// IntrusionTestReportVO intrusionTestReportVO1 = resumptionReportMapper.selectStandbyPower(null, resumptionDTO.getStartTime(), resumptionDTO.getEndTime(), o.getPath());
|
|
|
+// //隐患
|
|
|
+// Map map = resumptionReportMapper.selectStandbyPowerAbnormalNumber(null, resumptionDTO.getStartTime(), resumptionDTO.getEndTime(), o.getPath());
|
|
|
+// Integer integer = monitorAccessReportMapper.selectOrgNumByPathAndType(o.getPath(), OrgTypeEnum.YINGYE_WANGDIAN.getCode());
|
|
|
+// if (o.getType() == 4) {
|
|
|
+// integer = 1;
|
|
|
+// map = resumptionReportMapper.selectStandbyPowerAbnormalNumber(o.getId(), resumptionDTO.getStartTime(), resumptionDTO.getEndTime(), null);
|
|
|
+// intrusionTestReportVO1 = resumptionReportMapper.selectStandbyPower(null, resumptionDTO.getStartTime(), resumptionDTO.getEndTime(), o.getPath());
|
|
|
+// }
|
|
|
+// BeanUtils.copyProperties(intrusionTestReportVO1, intrusionTestReportVO);
|
|
|
+// Object abnormalNumber = map.get("abnormalNumber");
|
|
|
+// intrusionTestReportVO.setAbnormalNumber(Integer.valueOf(abnormalNumber.toString()));
|
|
|
+//
|
|
|
+// Object realityRectificationNumber = map.get("realityRectificationNumber");
|
|
|
+// intrusionTestReportVO.setRealityRectificationNumber(Integer.valueOf(realityRectificationNumber.toString()));
|
|
|
+//
|
|
|
+// Object realityRectificationRate = map.get("realityRectificationRate");
|
|
|
+// intrusionTestReportVO.setRealityRectificationRate(realityRectificationRate.toString());
|
|
|
+// intrusionTestReportVO.setNetworkNumber(integer);
|
|
|
+// intrusionTestReportVO.setCity(o.getAffiliatedArea());
|
|
|
+// intrusionTestReportVO.setOrgName(o.getShortName());
|
|
|
+// intrusionTestReportVOList.add(intrusionTestReportVO);
|
|
|
+// });
|
|
|
+ List<CompletableFuture<IntrusionTestReportVO>> completableFutureList = new ArrayList<>();
|
|
|
sysOrgs.forEach(o -> {
|
|
|
- IntrusionTestReportVO intrusionTestReportVO = new IntrusionTestReportVO();
|
|
|
- SysOrg sysOrg1;
|
|
|
- if (sysOrg.getType() < 3 || sysOrg.getShortName().endsWith("地区行社") || sysOrg.getType() == 9) {
|
|
|
- sysOrg1 = orgService.selectOrgById(o.getParentId(), SecurityConstants.INNER);
|
|
|
- } else {
|
|
|
- sysOrg1 = orgService.selectOrgById(orgService.selectOrgById(o.getParentId(), SecurityConstants.INNER).getParentId(), SecurityConstants.INNER);
|
|
|
- }
|
|
|
- IntrusionTestReportVO intrusionTestReportVO1 = resumptionReportMapper.selectStandbyPower(null, resumptionDTO.getStartTime(), resumptionDTO.getEndTime(), o.getPath());
|
|
|
- //隐患
|
|
|
- Map map = resumptionReportMapper.selectStandbyPowerAbnormalNumber(null, resumptionDTO.getStartTime(), resumptionDTO.getEndTime(), o.getPath());
|
|
|
- Integer integer = monitorAccessReportMapper.selectOrgNumByPathAndType(o.getPath(), OrgTypeEnum.YINGYE_WANGDIAN.getCode());
|
|
|
- if (o.getType() == 4) {
|
|
|
- integer = 1;
|
|
|
- map = resumptionReportMapper.selectStandbyPowerAbnormalNumber(o.getId(), resumptionDTO.getStartTime(), resumptionDTO.getEndTime(), null);
|
|
|
- intrusionTestReportVO1 = resumptionReportMapper.selectStandbyPower(null, resumptionDTO.getStartTime(), resumptionDTO.getEndTime(), o.getPath());
|
|
|
- }
|
|
|
- BeanUtils.copyProperties(intrusionTestReportVO1, intrusionTestReportVO);
|
|
|
- Object abnormalNumber = map.get("abnormalNumber");
|
|
|
- intrusionTestReportVO.setAbnormalNumber(Integer.valueOf(abnormalNumber.toString()));
|
|
|
-
|
|
|
- Object realityRectificationNumber = map.get("realityRectificationNumber");
|
|
|
- intrusionTestReportVO.setRealityRectificationNumber(Integer.valueOf(realityRectificationNumber.toString()));
|
|
|
-
|
|
|
- Object realityRectificationRate = map.get("realityRectificationRate");
|
|
|
- intrusionTestReportVO.setRealityRectificationRate(realityRectificationRate.toString());
|
|
|
- intrusionTestReportVO.setNetworkNumber(integer);
|
|
|
- intrusionTestReportVO.setCity(sysOrg1.getShortName().indexOf("地区行社") == -1 ? sysOrg1.getShortName().substring(0, 2) : sysOrg1.getShortName().split("地区行社")[0]);
|
|
|
- intrusionTestReportVO.setOrgName(o.getShortName());
|
|
|
- intrusionTestReportVOList.add(intrusionTestReportVO);
|
|
|
+ CompletableFuture<IntrusionTestReportVO> future = CompletableFuture.supplyAsync(() ->
|
|
|
+ getOneOrgStandByPower(o, resumptionDTO), threadPoolTaskExecutor
|
|
|
+ );
|
|
|
+ completableFutureList.add(future);
|
|
|
+ });
|
|
|
+
|
|
|
+ CompletableFuture<Void> allQueries = CompletableFuture.allOf(completableFutureList.toArray(new CompletableFuture[0]));
|
|
|
+
|
|
|
+ allQueries.get(15L, TimeUnit.SECONDS);
|
|
|
+
|
|
|
+ completableFutureList.forEach(x -> {
|
|
|
+ intrusionTestReportVOList.add(x.join());
|
|
|
});
|
|
|
return intrusionTestReportVOList;
|
|
|
}
|
|
|
|
|
|
+ private IntrusionTestReportVO getOneOrgStandByPower(SysOrg o,ResumptionDTO resumptionDTO)
|
|
|
+ {
|
|
|
+ IntrusionTestReportVO resultVo = new IntrusionTestReportVO();
|
|
|
+ IntrusionTestReportVO tempIntrusionTestReportVO1 =null;
|
|
|
+ Integer networkNumber =null;
|
|
|
+ Map map =null;
|
|
|
+
|
|
|
+ if (o.getType() == 4) {
|
|
|
+ networkNumber = 1;
|
|
|
+ map = resumptionReportMapper.selectStandbyPowerAbnormalNumber(o.getId(), resumptionDTO.getStartTime(), resumptionDTO.getEndTime(), null);
|
|
|
+ tempIntrusionTestReportVO1 = resumptionReportMapper.selectStandbyPower(null, resumptionDTO.getStartTime(), resumptionDTO.getEndTime(), o.getPath());
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ networkNumber = monitorAccessReportMapper.selectOrgNumByPathAndType(o.getPath(), OrgTypeEnum.YINGYE_WANGDIAN.getCode());
|
|
|
+ tempIntrusionTestReportVO1 = resumptionReportMapper.selectStandbyPower(null, resumptionDTO.getStartTime(), resumptionDTO.getEndTime(), o.getPath());
|
|
|
+ //隐患
|
|
|
+ map = resumptionReportMapper.selectStandbyPowerAbnormalNumber(null, resumptionDTO.getStartTime(), resumptionDTO.getEndTime(), o.getPath());
|
|
|
+ }
|
|
|
+
|
|
|
+ BeanUtils.copyProperties(tempIntrusionTestReportVO1, resultVo);
|
|
|
+ Object abnormalNumber = map.get("abnormalNumber");
|
|
|
+ resultVo.setAbnormalNumber(Integer.valueOf(abnormalNumber.toString()));
|
|
|
+ Object realityRectificationNumber = map.get("realityRectificationNumber");
|
|
|
+ resultVo.setRealityRectificationNumber(Integer.valueOf(realityRectificationNumber.toString()));
|
|
|
+ Object realityRectificationRate = map.get("realityRectificationRate");
|
|
|
+ resultVo.setRealityRectificationRate(realityRectificationRate.toString());
|
|
|
+ resultVo.setNetworkNumber(networkNumber);
|
|
|
+ resultVo.setCity(o.getAffiliatedArea());
|
|
|
+ resultVo.setOrgName(o.getShortName());
|
|
|
+ return resultVo;
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public void serviceBankExport(ResumptionDTO resumptionDTO, HttpServletResponse response) throws Exception {
|
|
|
String orgName = null;
|