Compare commits
No commits in common. "8d8238d7e65fb350ea5c832ca0094a3a0bb96baf" and "a30f3b121e7a902eb99dfeddf814263a5a346db2" have entirely different histories.
8d8238d7e6
...
a30f3b121e
|
@ -42,7 +42,6 @@ import java.io.IOException;
|
|||
import java.net.URLEncoder;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.stream.Collectors;
|
||||
|
@ -646,8 +645,8 @@ public class CensusController {
|
|||
|
||||
// TODO 同比环比
|
||||
@GetMapping("/similitude")
|
||||
// @ApiOperation("资源数量环比")
|
||||
// @LogOperation("资源数量环比")
|
||||
@ApiOperation("资源数量环比")
|
||||
@LogOperation("资源数量环比")
|
||||
@ApiImplicitParams({})
|
||||
public Result similitude() {
|
||||
long countApply = tAbilityApplicationService.countApplyAll(); // 资源申请量
|
||||
|
@ -713,30 +712,17 @@ public class CensusController {
|
|||
}
|
||||
|
||||
@GetMapping("/similitude_dept")
|
||||
// @ApiOperation("部门资源数量环比")
|
||||
// @LogOperation("部门资源数量环比")
|
||||
@ApiOperation("部门资源数量环比")
|
||||
@LogOperation("部门资源数量环比")
|
||||
@ApiImplicitParams({})
|
||||
public Result similitudeDept() {
|
||||
List<HashMap<String, Object>> resultList1 = new ArrayList<>();
|
||||
List<HashMap<String, Object>> resultList2 = new ArrayList<>();
|
||||
try {
|
||||
resultList1 = CompletableFuture.supplyAsync(() -> {
|
||||
return (List<HashMap<String, Object>>) resourceService.selectApplyDeptDetailTypeCountList(new HashMap() {{
|
||||
put("snapshot", true);
|
||||
}}); // 能力申请统计原始数据
|
||||
}, executor).get();
|
||||
resultList2 = CompletableFuture.supplyAsync(() -> {
|
||||
return (List<HashMap<String, Object>>) resourceService.selectDeptDetailTypeCountList(new HashMap() {{
|
||||
put("snapshot", true);
|
||||
}}); // 能力上架统计原始数据
|
||||
}, executor).get();
|
||||
} catch (InterruptedException e) {
|
||||
logger.error("", e);
|
||||
throw new RuntimeException(e);
|
||||
} catch (ExecutionException e) {
|
||||
logger.error("", e);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
List<HashMap<String, Object>> resultList1 = (List<HashMap<String, Object>>) resourceService.selectApplyDeptDetailTypeCountList(new HashMap() {{
|
||||
put("snapshot", true);
|
||||
}}); // 能力申请统计原始数据
|
||||
|
||||
List<HashMap<String, Object>> resultList2 = (List<HashMap<String, Object>>) resourceService.selectDeptDetailTypeCountList(new HashMap() {{
|
||||
put("snapshot", true);
|
||||
}}); // 能力上架统计原始数据
|
||||
|
||||
Integer county_apply_sum = resultList1.stream().filter(index -> index.containsKey("level") && "county".equals(index.get("level").toString()))
|
||||
.mapToInt(index -> Integer.valueOf(index.get("count").toString())).sum(); // 区申请总量
|
||||
|
@ -827,7 +813,7 @@ public class CensusController {
|
|||
add(new LinkedHashMap<String, Object>() {{
|
||||
put("tip", "区市部门");
|
||||
put("level", "county");
|
||||
put("dept_count", sysDeptService.countByType(3).longValue());
|
||||
put("dept_count", sysDeptService.countByType(3));
|
||||
put("apply_sum", county_apply_sum);
|
||||
put("resource_sum", county_resource_sum);
|
||||
put("resource_weekly_change", finalCounty_resource_weekly_change);
|
||||
|
@ -838,7 +824,7 @@ public class CensusController {
|
|||
add(new LinkedHashMap<String, Object>() {{
|
||||
put("tip", "市级部门");
|
||||
put("level", "municipal");
|
||||
put("dept_count", sysDeptService.countByType(2).longValue());
|
||||
put("dept_count", sysDeptService.countByType(2));
|
||||
put("apply_sum", municipal_apply_sum);
|
||||
put("resource_sum", municipal_resource_sum);
|
||||
put("resource_weekly_change", finalMunicipal_resource_weekly_change);
|
||||
|
|
Loading…
Reference in New Issue