From 3b0516a2959e25576e4f3fda697a3b025d06c8c9 Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期二, 24 六月 2025 14:09:07 +0800
Subject: [PATCH] 每日录像可用指标添加日志,修改大屏为查看当前月平均

---
 ycl-pojo/src/main/java/com/ycl/platform/domain/result/UY/MonitorQualifyResult.java |   62 ++++++++++++++++++++++++++++++-
 1 files changed, 60 insertions(+), 2 deletions(-)

diff --git a/ycl-pojo/src/main/java/com/ycl/platform/domain/result/UY/MonitorQualifyResult.java b/ycl-pojo/src/main/java/com/ycl/platform/domain/result/UY/MonitorQualifyResult.java
index 1bc167e..14fc361 100644
--- a/ycl-pojo/src/main/java/com/ycl/platform/domain/result/UY/MonitorQualifyResult.java
+++ b/ycl-pojo/src/main/java/com/ycl/platform/domain/result/UY/MonitorQualifyResult.java
@@ -1,7 +1,9 @@
 package com.ycl.platform.domain.result.UY;
 
 import com.ycl.platform.domain.result.BaseResult;
+import com.ycl.platform.domain.vo.DataCenter.MonitorQualifyResultVO;
 import lombok.Data;
+import org.springframework.data.mongodb.core.index.TextIndexed;
 import org.springframework.data.mongodb.core.mapping.Document;
 
 @Data
@@ -64,16 +66,72 @@
     public static class QualifyResult {
         /**
          * 鏄惁閿欒 姝e父鏄痜alse锛宼ure琛ㄧず鏈夐棶棰�
-         * */
+         */
         private Boolean error;
         private String errorMessage;
         /**
          * 灞曠ず鍊�
-         * */
+         */
         private String showValue;
         /**
          * 鏁版嵁鍘熷鍊硷紝濡傚浗鏍囩爜绛�
          */
         private String value;
     }
+
+    //鍏ㄥ杩攖ure
+    public static boolean correct(MonitorQualifyResult result) {
+        return checkError(result.getName()) &&
+                checkError(result.getCivilCode()) &&
+                checkError(result.getIp()) &&
+                checkError(result.getSerialNumber()) &&
+                checkError(result.getMacdz()) &&
+                checkError(result.getLatitude()) &&
+                checkError(result.getLongitude()) &&
+                checkError(result.getSbzt()) &&
+                checkError(result.getSxjcjqy()) &&
+                checkError(result.getSxjgnlx()) &&
+                checkError(result.getJkdwlx()) &&
+                checkError(result.getIntegrated_device())
+                ;
+    }
+
+    //妫�鏌ユ寚鏍囷紝姝e父杩斿洖true
+    public static boolean checkError(MonitorQualifyResult.QualifyResult result) {
+        return result!=null && result.getError() != null && !result.getError();
+    }
+
+    public static MonitorQualifyResultVO getVO(MonitorQualifyResult result) {
+        MonitorQualifyResultVO vo = new MonitorQualifyResultVO();
+        vo.setCivilCode(result.getCivilCode()!=null?result.getCivilCode().getShowValue():"");
+        vo.setCivilCodeError(result.getCivilCode()!=null?result.getCivilCode().getError():Boolean.FALSE);
+        vo.setIp(result.getIp()!=null?result.getIp().getShowValue():"");
+        vo.setIpError(result.getIp()!=null?result.getIp().getError():Boolean.FALSE);
+        vo.setIntegratedDevice(result.getIntegrated_device()!=null?result.getIntegrated_device().getShowValue():"");
+        vo.setIntegratedDeviceError(result.getIntegrated_device()!=null?result.getIntegrated_device().getError():Boolean.FALSE);
+        vo.setJkdwlx(result.getJkdwlx()!=null?result.getJkdwlx().getShowValue():"");
+        vo.setJkdwlxError(result.getJkdwlx()!=null?result.getJkdwlx().getError():Boolean.FALSE);
+        vo.setLatitude(result.getLatitude()!=null?result.getLatitude().getShowValue():"");
+        vo.setLatitudeError(result.getLatitude()!=null?result.getLatitude().getError():Boolean.FALSE);
+        vo.setLongitude(result.getLongitude()!=null?result.getLongitude().getShowValue():"");
+        vo.setLongitudeError(result.getLongitude()!=null?result.getLongitude().getError():Boolean.FALSE);
+        vo.setMacdz(result.getMacdz()!=null?result.getMacdz().getShowValue():"");
+        vo.setMacdzError(result.getMacdz()!=null?result.getMacdz().getError():Boolean.FALSE);
+        vo.setName(result.getName()!=null?result.getName().getShowValue():"");
+        vo.setNameError(result.getName()!=null?result.getName().getError():Boolean.FALSE);
+        vo.setSbzt(result.getSbzt()!=null?result.getSbzt().getShowValue():"");
+        vo.setSbztError(result.getSbzt()!=null?result.getSbzt().getError():Boolean.FALSE);
+        vo.setSerialNumber(result.getSerialNumber()!=null?result.getSerialNumber().getShowValue():"");
+        vo.setSerialNumberError(result.getSerialNumber()!=null?result.getSerialNumber().getError():Boolean.FALSE);
+        vo.setSxjcjqy(result.getSxjcjqy()!=null?result.getSxjcjqy().getShowValue():"");
+        vo.setSxjcjqyError(result.getSxjcjqy()!=null?result.getSxjcjqy().getError():Boolean.FALSE);
+        vo.setSxjgnlx(result.getSxjgnlx()!=null?result.getSxjgnlx().getShowValue():"");
+        vo.setSxjgnlxError(result.getSxjgnlx()!=null?result.getSxjgnlx().getError():Boolean.FALSE);
+        if (result.getNewDevice()!=null && result.getNewDevice()) {
+            vo.setNewDevice("鏄�");
+        } else {
+            vo.setNewDevice("鍚�");
+        }
+        return vo;
+    }
 }

--
Gitblit v1.8.0