From 58c5c6e49c8b4d67cd9d1637beea4706f9b5ae83 Mon Sep 17 00:00:00 2001
From: 龚焕茏 <2842157468@qq.com>
Date: 星期四, 22 八月 2024 16:52:18 +0800
Subject: [PATCH] feat:新增工单故障类型记录、支持多个

---
 ycl-pojo/src/main/java/com/ycl/platform/domain/result/UY/RecordMetaDSumResult.java |   31 ++++++++++++++++++++++++++++++-
 1 files changed, 30 insertions(+), 1 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 94819a5..be732c7 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
@@ -1,19 +1,27 @@
 package com.ycl.platform.domain.result.UY;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ycl.platform.domain.result.BaseResult;
 import lombok.Data;
+import org.springframework.data.mongodb.core.index.TextIndexed;
+import org.springframework.data.mongodb.core.mapping.Document;
 
 import java.util.Date;
+import java.util.Objects;
 
 /**
  * 褰曞儚鍙敤鎬�
+ *
  * @author gonghl
  */
 @Data
-public class RecordMetaDSumResult {
+@Document(collection = "uy_record_meta_d_sum")
+public class RecordMetaDSumResult extends BaseResult {
 
     /**
      * 琛屾斂鍖哄煙鍚嶇О
      */
+    @TextIndexed
     private String arealayername;
 
     /**
@@ -24,6 +32,7 @@
     /**
      * 鍒涘缓鏃堕棿锛屾牸寮忎负鏃ユ湡鏃堕棿瀛楃涓�
      */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date createTime;
 
     /**
@@ -34,6 +43,7 @@
     /**
      * 鎽勫儚鏈哄悕绉�
      */
+    @TextIndexed
     private String deviceName;
 
     /**
@@ -49,6 +59,7 @@
     /**
      * 鍥芥爣骞冲彴ID
      */
+    @TextIndexed
     private String platId;
 
     /**
@@ -62,8 +73,14 @@
     private Integer recordStatus;
 
     /**
+     * 褰曞儚瀹屾暣鐘舵�侊紝1锛氬畬鏁达紝0锛氶棿姝囷紝-1锛氬紓甯�
+     */
+    private String recordStatusText;
+
+    /**
      * 缁熻鏃堕棿锛屾牸寮忎负鏃ユ湡瀛楃涓�
      */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date statTime;
 
     /**
@@ -71,4 +88,16 @@
      */
     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