|
@@ -55,15 +55,18 @@ public class ComputeIndicatorDataService {
|
|
|
public void computeIndicatorData() throws Exception {
|
|
|
//查询项目列表
|
|
|
List<ProjectDTO> projectDTOList = saasWebServiceImpl.queryProjectDTOList(null);
|
|
|
- if(CollectionUtils.isEmpty(projectDTOList)){
|
|
|
+ if (CollectionUtils.isEmpty(projectDTOList)) {
|
|
|
return;
|
|
|
}
|
|
|
- Map<String,ProjectIndicatorCompute> projectIdAndProjectCompute = projectIndicatorComputeService.getProjectIdAndProjectCompute();
|
|
|
+ Map<String, ProjectIndicatorCompute> projectIdAndProjectCompute = projectIndicatorComputeService.getProjectIdAndProjectCompute();
|
|
|
|
|
|
List<Future<String>> futureList = new ArrayList<>();
|
|
|
CountDownLatch latch = new CountDownLatch(projectDTOList.size());
|
|
|
for (ProjectDTO projectDTO : projectDTOList) {
|
|
|
- futureList.add(monitorIndicatorRecordService.computeIndicatorData(projectDTO,projectIdAndProjectCompute.get(projectDTO.getProjectId()),latch));
|
|
|
+ if (!projectDTO.getProjectId().equals("Pj1101060001")) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ futureList.add(monitorIndicatorRecordService.computeIndicatorData(projectDTO, projectIdAndProjectCompute.get(projectDTO.getProjectId()), latch));
|
|
|
}
|
|
|
//等待所有任务执行完
|
|
|
latch.await();
|
|
@@ -79,13 +82,16 @@ public class ComputeIndicatorDataService {
|
|
|
public void sendIndicatorData() throws Exception {
|
|
|
//查询项目列表
|
|
|
List<ProjectDTO> projectDTOList = saasWebServiceImpl.queryProjectDTOList(null);
|
|
|
- if(CollectionUtils.isEmpty(projectDTOList)){
|
|
|
+ if (CollectionUtils.isEmpty(projectDTOList)) {
|
|
|
return;
|
|
|
}
|
|
|
List<Future<String>> futureList = new ArrayList<>();
|
|
|
CountDownLatch latch = new CountDownLatch(projectDTOList.size());
|
|
|
for (ProjectDTO projectDTO : projectDTOList) {
|
|
|
- futureList.add(monitorIndicatorRecordService.sendIndicatorData(projectDTO,latch));
|
|
|
+ if (!projectDTO.getProjectId().equals("Pj1101051029")||!projectDTO.getProjectId().equals("Pj1101051029")) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ futureList.add(monitorIndicatorRecordService.sendIndicatorData(projectDTO, latch));
|
|
|
}
|
|
|
//等待所有任务执行完
|
|
|
latch.await();
|