From 71f61d13531b3e2a0099ba5afe3f268c99c5bacf Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期四, 29 五月 2025 18:13:33 +0800
Subject: [PATCH] 修改大屏录像可用率指标,点位在线指标,数据中心录像可用率,

---
 ycl-pojo/src/main/java/com/ycl/platform/domain/result/UY/RecordMetaDSumResult.java |   36 +++++++++++++++++++++++++++++++++---
 1 files changed, 33 insertions(+), 3 deletions(-)

diff --git a/ycl-pojo/src/main/java/com/ycl/platform/domain/result/UY/RecordMetaDSumResult.java b/ycl-pojo/src/main/java/com/ycl/platform/domain/result/UY/RecordMetaDSumResult.java
index 9ed4af2..0b06b83 100644
--- a/ycl-pojo/src/main/java/com/ycl/platform/domain/result/UY/RecordMetaDSumResult.java
+++ b/ycl-pojo/src/main/java/com/ycl/platform/domain/result/UY/RecordMetaDSumResult.java
@@ -2,11 +2,17 @@
 
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.ycl.platform.domain.result.BaseResult;
+import com.ycl.platform.domain.vo.DynamicColumnVO;
 import lombok.Data;
+import org.springframework.data.mongodb.core.index.CompoundIndex;
+import org.springframework.data.mongodb.core.index.CompoundIndexes;
+import org.springframework.data.mongodb.core.index.Indexed;
 import org.springframework.data.mongodb.core.index.TextIndexed;
 import org.springframework.data.mongodb.core.mapping.Document;
 
 import java.util.Date;
+import java.util.List;
+import java.util.Objects;
 
 /**
  * 褰曞儚鍙敤鎬�
@@ -15,12 +21,16 @@
  */
 @Data
 @Document(collection = "uy_record_meta_d_sum")
+@CompoundIndexes({
+        //name锛氱储寮曞悕绉� def锛氬瓧娈�(1姝e簭 -1鍊掑簭) unique锛氭槸鍚﹀敮涓�绱㈠紩
+        //鐩存帴鍔犲埌瀛楁涓婇潰娌$敤
+        @CompoundIndex(name = "video_record", def = "{statTime:-1, no:1}")
+})
 public class RecordMetaDSumResult extends BaseResult {
 
     /**
      * 琛屾斂鍖哄煙鍚嶇О
      */
-    @TextIndexed
     private String arealayername;
 
     /**
@@ -42,7 +52,6 @@
     /**
      * 鎽勫儚鏈哄悕绉�
      */
-    @TextIndexed
     private String deviceName;
 
     /**
@@ -58,7 +67,6 @@
     /**
      * 鍥芥爣骞冲彴ID
      */
-    @TextIndexed
     private String platId;
 
     /**
@@ -72,14 +80,36 @@
     private Integer recordStatus;
 
     /**
+     * 褰曞儚瀹屾暣鐘舵�侊紝1锛氬畬鏁达紝0锛氶棿姝囷紝-1锛氬紓甯�
+     */
+    private String recordStatusText;
+    /**
      * 缁熻鏃堕棿锛屾牸寮忎负鏃ユ湡瀛楃涓�
      */
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Indexed(background = true)
     private Date statTime;
+
+    /**
+     * 鍔ㄦ�佸垪
+     */
+    private List<DynamicColumnVO> dynamicColumnList;
 
     /**
      * 绉熸埛ID
      */
     private String tenantId;
 
+    public String getRecordStatusText() {
+        if (Objects.equals(recordStatus, 1)) {
+            recordStatusText = "瀹屾暣";
+        }
+        if (Objects.equals(recordStatus, 0)) {
+            recordStatusText = "闂存瓏";
+        }
+        if (Objects.equals(recordStatus, -1)) {
+            recordStatusText = "寮傚父";
+        }
+        return recordStatusText;
+    }
 }

--
Gitblit v1.8.0