From e05049e8cc736ab6db1ea2791641120e024665a3 Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期二, 25 三月 2025 15:48:43 +0800
Subject: [PATCH] echarts 新增无录像列
---
ycl-server/src/main/java/com/ycl/platform/service/impl/TMonitorServiceImpl.java | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/ycl-server/src/main/java/com/ycl/platform/service/impl/TMonitorServiceImpl.java b/ycl-server/src/main/java/com/ycl/platform/service/impl/TMonitorServiceImpl.java
index 41b58a6..3865624 100644
--- a/ycl-server/src/main/java/com/ycl/platform/service/impl/TMonitorServiceImpl.java
+++ b/ycl-server/src/main/java/com/ycl/platform/service/impl/TMonitorServiceImpl.java
@@ -67,6 +67,7 @@
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.math.BigDecimal;
+import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
@@ -970,7 +971,14 @@
))
.append("loseCount", new Document("$sum",
new Document("$cond", Arrays.asList(
- new Document("$in", Arrays.asList("$recordStatus", Arrays.asList(-1, 0))),
+ new Document("$eq", Arrays.asList("$recordStatus", 0)),
+ 1,
+ 0
+ ))
+ ))
+ .append("errCount", new Document("$sum",
+ new Document("$cond", Arrays.asList(
+ new Document("$eq", Arrays.asList("$recordStatus", -1)),
1,
0
))
@@ -984,6 +992,7 @@
homeVideoVO.setCreateDate(doc.getDate("_id"));
homeVideoVO.setIntegrityNum(doc.getInteger("normalCount"));
homeVideoVO.setLoseNum(doc.getInteger("loseCount"));
+ homeVideoVO.setErrNum(doc.getInteger("errCount"));
results.add(homeVideoVO);
}
@@ -1425,7 +1434,7 @@
field.setAccessible(true);
//闃叉杞崲涓虹瀛﹁鏁版硶
BigDecimal bigDecimal = BigDecimal.valueOf(recordResult.getMissDuration() == null ? 0 : (recordResult.getMissDuration()) * 60);
- field.set(videoDailyExp, bigDecimal.toString());
+ field.set(videoDailyExp, bigDecimal.setScale(2, RoundingMode.HALF_UP).toString());
}
}
}
--
Gitblit v1.8.0