Commit 9569c7a0 by 向延琳

测试存储过程

1 parent 34e18a78
......@@ -220,10 +220,12 @@ public class DashboardService extends AbstractCommonService {
log.info("{} 耗时:{} ms", "看板统计信息 - sn查询", stopWatch.getLastTaskTimeMillis());
//断电报警
CompletableFuture<Integer> powerOffFutureFuture = CompletableFuture.supplyAsync(() -> getPowerOffCount(sns));
int powerOffCount = getPowerOffCount(sns);
// CompletableFuture<Integer> powerOffFutureFuture = CompletableFuture.supplyAsync(() -> getPowerOffCount(sns));
//光感报警
CompletableFuture<Integer> lightFutureFuture = CompletableFuture.supplyAsync(() -> getLightCount(sns));
int lightCount = getLightCount(sns);
// CompletableFuture<Integer> lightFutureFuture = CompletableFuture.supplyAsync(() -> getLightCount(sns));
//围栏报警
stopWatch.start();
......@@ -234,14 +236,14 @@ public class DashboardService extends AbstractCommonService {
//在线率
String onlineRate = getOnLineRate(totalActiveDevice);
int powerOffCount;
int lightCount;
try {
powerOffCount = powerOffFutureFuture.get();
lightCount = lightFutureFuture.get();
} catch (InterruptedException | ExecutionException e) {
throw new RuntimeException(e);
}
// int powerOffCount;
// int lightCount;
// try {
// powerOffCount = powerOffFutureFuture.get();
// lightCount = lightFutureFuture.get();
// } catch (InterruptedException | ExecutionException e) {
// throw new RuntimeException(e);
// }
long t2 = System.currentTimeMillis();
log.info("{} 总耗时:{} ms", "看板统计信息", t2 - t1);
return new StatisticalInfoVO(totalActiveDevice, totalVehicle, todayActiveDevice, powerOffCount, fenceCount, lightCount, onlineRate);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!