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

[核查模块] 优化debug日志

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