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