|
|
@ -60,9 +60,6 @@ import java.util.concurrent.CompletableFuture; |
|
|
|
import java.util.concurrent.ExecutionException; |
|
|
|
import java.util.concurrent.ExecutorService; |
|
|
|
import java.util.concurrent.atomic.AtomicInteger; |
|
|
|
import java.util.concurrent.CompletableFuture; |
|
|
|
import java.util.concurrent.ExecutionException; |
|
|
|
import java.util.concurrent.atomic.AtomicReference; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
@Slf4j |
|
|
@ -269,22 +266,22 @@ public class CoverageServiceImpl implements CoverageService { |
|
|
|
List<CompletableFuture<List<ResourceInfoResultDTO>>> futures = new ArrayList<>(); |
|
|
|
for (String resource : resources) { |
|
|
|
if (MenusEnums.IC_SUPERIOR_RESOURCE.getUrl().equals(resource)){ |
|
|
|
CompletableFuture<List<ResourceInfoResultDTO>> c = CompletableFuture.supplyAsync(() -> govOrgService.getSuperiorResourceInfos(formDTO)); |
|
|
|
CompletableFuture<List<ResourceInfoResultDTO>> c = CompletableFuture.supplyAsync(() -> govOrgService.getSuperiorResourceInfos(formDTO),executorService); |
|
|
|
futures.add(c); |
|
|
|
}else if (MenusEnums.IC_CITY_MANAGEMENT.getUrl().equals(resource)){ |
|
|
|
CompletableFuture<List<ResourceInfoResultDTO>> c = CompletableFuture.supplyAsync(() -> govOrgService.getCityManageInfos(formDTO)); |
|
|
|
CompletableFuture<List<ResourceInfoResultDTO>> c = CompletableFuture.supplyAsync(() -> govOrgService.getCityManageInfos(formDTO),executorService); |
|
|
|
futures.add(c); |
|
|
|
}else if (MenusEnums.IC_COMMUNITY_SELF_ORGANIZATION.getUrl().equals(resource)){ |
|
|
|
CompletableFuture<List<ResourceInfoResultDTO>> c = CompletableFuture.supplyAsync(() -> heartService.getCommunitySelOrgInfos(formDTO)); |
|
|
|
CompletableFuture<List<ResourceInfoResultDTO>> c = CompletableFuture.supplyAsync(() -> heartService.getCommunitySelOrgInfos(formDTO),executorService); |
|
|
|
futures.add(c); |
|
|
|
}else if (MenusEnums.IC_DANGEROUS_CHEMICALS.getUrl().equals(resource)){ |
|
|
|
CompletableFuture<List<ResourceInfoResultDTO>> c = CompletableFuture.supplyAsync(() -> govOrgService.getDangerousChemicalsInfos(formDTO)); |
|
|
|
CompletableFuture<List<ResourceInfoResultDTO>> c = CompletableFuture.supplyAsync(() -> govOrgService.getDangerousChemicalsInfos(formDTO),executorService); |
|
|
|
futures.add(c); |
|
|
|
}else if (MenusEnums.IC_ENTERPRISE.getUrl().equals(resource)){ |
|
|
|
CompletableFuture<List<ResourceInfoResultDTO>> c = CompletableFuture.supplyAsync(() -> govOrgService.getEnterpriseInfos(formDTO)); |
|
|
|
CompletableFuture<List<ResourceInfoResultDTO>> c = CompletableFuture.supplyAsync(() -> govOrgService.getEnterpriseInfos(formDTO),executorService); |
|
|
|
futures.add(c); |
|
|
|
}else if (MenusEnums.IC_PUBLIC_SERVICE.getUrl().equals(resource)){ |
|
|
|
CompletableFuture<List<ResourceInfoResultDTO>> c = CompletableFuture.supplyAsync(() -> govOrgService.getPublicServiceInfos(formDTO)); |
|
|
|
CompletableFuture<List<ResourceInfoResultDTO>> c = CompletableFuture.supplyAsync(() -> govOrgService.getPublicServiceInfos(formDTO),executorService); |
|
|
|
futures.add(c); |
|
|
|
} |
|
|
|
} |
|
|
|