提交 3ec48a7f authored 作者: Matrix's avatar Matrix

[核查模块] 优化debug日志

上级 efe0566d
......@@ -192,8 +192,9 @@ public class DeviceCheckController {
/**
* 该接口负责处理以下跳转情况
* 1 - 统计跳转
* 1-1 省核查页面 - 市的检查以及省直属的自查任务
* 1-1 省核查页面 - 市的检查以及省直属的自查任务
* 2 - 详情跳转
*
* @param type 7 统计 8 详情
* @param billId 业务id
* @return
......@@ -235,6 +236,7 @@ public class DeviceCheckController {
// 处理子节点,子节点有两种类型 - 检查类统计与自查类数据
if (childBusType.equals(CONFIRM_CHECK_STAT.id)) {
log.info("[处理子节点] 子节点为检查类子节点");
startTime = System.currentTimeMillis();
//市检查
Integer unitId = child.getOwnUnit();
......@@ -271,6 +273,7 @@ public class DeviceCheckController {
finalTime = System.currentTimeMillis();
log.info("[TEST] child-BILL id = {}的检查任务 , COST {} MS", child.getBillId(), finalTime - startTime);
} else {
log.info("[处理子节点] 子节点为自查类子节点");
startTime = System.currentTimeMillis();
// 省直属 ,省本级自查
......@@ -279,6 +282,8 @@ public class DeviceCheckController {
String unitName = childDetail.getCheckUnit();
List<CheckDeviceStatVo> list = parseStatString2Vo(child.parse2Bto(), childDetail);
finalTime = System.currentTimeMillis();
log.info("[test] 自查装备数据转换消耗了{}ms", finalTime - startTime);
List<CheckAreaStatVo> casList = list.stream()
.map(CheckDeviceStatVo::getAreaStatList)
.flatMap(checkAreaStatVos -> checkAreaStatVos.stream())
......@@ -302,7 +307,7 @@ public class DeviceCheckController {
ledList.add(led);
finalTime = System.currentTimeMillis();
log.info("[TEST] CHILD BILL ID = {} 的自查任务COST {} MS", child.getBillId(), finalTime - startTime);
log.info("[TEST] 子节点账单 ID = {} 的自查任务消耗了 {} MS", child.getBillId(), finalTime - startTime);
}
}
linkVo.setLcDetail(lcdList);
......@@ -1280,7 +1285,7 @@ public class DeviceCheckController {
String[] statArray = statString.split(",");
//将 id - status 转化为 model - count - status(只统计新增和无误的作为数量)
// 根这里uuid可以从detail里拿,根据unitId 查到 areaId 根据 areaId 查询到 areaName
// 根这里unid可以从detail里拿,根据unitId 查到 areaId 根据 areaId 查询到 areaName
String areaName = auService.findOne(AuExample.UnitName, detail.getCheckUnit()).getName();
// detailId与statId只需要查询一次
......@@ -1295,9 +1300,13 @@ public class DeviceCheckController {
.map(s -> s.split("-")[0])
.map(Integer::parseInt)
.collect(toList());
long start = System.currentTimeMillis();
Map<Integer, DeviceLibrary> deviceMap = deviceRepo.findAllByIdIn(idList)
.stream()
.collect(toMap(DeviceLibrary::getId, Function.identity()));
long end = System.currentTimeMillis();
log.info("[核查TEST] 批量查询id集合耗时 {} ms ", end - start);
for (String s : statArray) {
if (StringUtils.isEmpty(s)) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论