From b31a2529ad309413a23d8ff208d6b15b76efc1cc Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期三, 08 一月 2025 17:58:40 +0800
Subject: [PATCH] OSD导出加上标签

---
 ycl-pojo/src/main/java/com/ycl/platform/domain/result/HK/VehicleDeviceInspectionResult.java |  120 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 116 insertions(+), 4 deletions(-)

diff --git a/ycl-pojo/src/main/java/com/ycl/platform/domain/result/HK/VehicleDeviceInspectionResult.java b/ycl-pojo/src/main/java/com/ycl/platform/domain/result/HK/VehicleDeviceInspectionResult.java
index 0f87d90..6a6b806 100644
--- a/ycl-pojo/src/main/java/com/ycl/platform/domain/result/HK/VehicleDeviceInspectionResult.java
+++ b/ycl-pojo/src/main/java/com/ycl/platform/domain/result/HK/VehicleDeviceInspectionResult.java
@@ -1,16 +1,19 @@
 package com.ycl.platform.domain.result.HK;
 
 import com.ycl.platform.domain.result.BaseResult;
+import com.ycl.platform.domain.vo.DataCenter.SnapClockVO;
 import lombok.Data;
+import org.springframework.beans.BeanUtils;
+import org.springframework.data.mongodb.core.index.TextIndexed;
 import org.springframework.data.mongodb.core.mapping.Document;
 
 /**
- * 杞﹁締璁惧鍏ㄦ鎸囨爣鐩戞祴缁撴灉锛�2.3.0鐗堟湰鏂板
+ * 杞﹁締璁惧鍏ㄦ鎸囨爣鐩戞祴缁撴灉锛氳溅杈嗭紙杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬с�侊級
  *
  * @author gonghl
  */
 @Data
-@Document(collection = "vehicle_device_inspection")
+@Document(collection = "hk_vehicle_device_inspection")
 public class VehicleDeviceInspectionResult extends BaseResult {
 
     /**
@@ -64,6 +67,11 @@
      */
     private Integer snapResult;
 
+    /**
+     * 鎶撴媿鏁版嵁閲忕洃娴嬬粨鏋滐紝1:姝e父 2:鏃犳暟鎹� 4:鏁版嵁閲忓皯
+     */
+    private String snapResultText;
+
     // 浠ヤ笅涓哄祵濂楀璞$殑瀛楁
 
     /**
@@ -91,12 +99,25 @@
      */
     private Integrity integrity;
 
+    public String getSnapResultText() {
+        if (snapResult == 1) {
+            snapResultText = "姝e父";
+        }
+        if (snapResult == 2) {
+            snapResultText = "鏃犳暟鎹�";
+        }
+        if (snapResult == 4) {
+            snapResultText = "鏁版嵁閲忓皯";
+        }
+        return snapResultText;
+    }
+
     // 鍐呭祵瀵硅薄瀹氫箟
 
     @Data
     public static class SnapClock {
         /**
-         * 鏃堕挓鍑嗙‘鐜�
+         * 鏃堕挓鍑嗙‘鐜囷細1 == 100%
          */
         private Float clockPercent;
 
@@ -111,6 +132,11 @@
         private Integer todayClockResult;
 
         /**
+         * 褰撴棩鎺ユ敹鐨勫綋鏃ユ姄鎷嶆暟鎹椂閽熷噯纭�у垽瀹氱粨鏋滐細1鏄悎鏍硷紝0鏄笉鍚堟牸
+         */
+        private String todayClockResultText;
+
+        /**
          * 褰撴棩鎺ユ敹鐨勫叏閮ㄦ姄鎷嶆暟鎹椂閽熷噯纭暟鎹噺
          */
         private Integer allClockCount;
@@ -119,12 +145,37 @@
          * 褰撴棩鎺ユ敹鐨勫叏閮ㄦ姄鎷嶆暟鎹椂閽熷噯纭�у垽瀹氱粨鏋滐細1鏄悎鏍硷紝0鏄笉鍚堟牸
          */
         private Integer allClockResult;
+
+        /**
+         * 褰撴棩鎺ユ敹鐨勫叏閮ㄦ姄鎷嶆暟鎹椂閽熷噯纭�у垽瀹氱粨鏋滐細1鏄悎鏍硷紝0鏄笉鍚堟牸
+         */
+        private String allClockResultText;
+
+        public String getTodayClockResultText() {
+            if (todayClockResult == 1) {
+                todayClockResultText = "鍚堟牸";
+            }
+            if (todayClockResult == 0) {
+                todayClockResultText = "涓嶅悎鏍�";
+            }
+            return todayClockResultText;
+        }
+
+        public String getAllClockResultText() {
+            if (allClockResult == 1) {
+                allClockResultText = "鍚堟牸";
+            }
+            if (allClockResult == 0) {
+                allClockResultText = "涓嶅悎鏍�";
+            }
+            return allClockResultText;
+        }
     }
 
     @Data
     public static class SnapTimely {
         /**
-         * 鍙婃椂鐜�
+         * 鍙婃椂鐜� 1 == 100%
          */
         private Float timelyPercent;
 
@@ -154,6 +205,11 @@
         private Integer todayTimelyResult;
 
         /**
+         * 褰撴棩鎺ユ敹鐨勫綋鏃ユ姄鎷嶆暟鎹暟鎹強鏃舵�у垽瀹氱粨鏋滐細1鏄悎鏍硷紝0鏄笉鍚堟牸
+         */
+        private String todayTimelyResultText;
+
+        /**
          * 褰撴棩鎺ユ敹鐨勫叏閮ㄦ暟鎹欢杩熼噺
          */
         private Integer allDelayCount;
@@ -177,6 +233,31 @@
          * 褰撴棩鎺ユ敹鐨勫叏閮ㄦ暟鎹強鏃舵�у垽瀹氱粨鏋滐細1鏄悎鏍硷紝0鏄笉鍚堟牸
          */
         private Integer allTimelyResult;
+
+        /**
+         * 褰撴棩鎺ユ敹鐨勫叏閮ㄦ暟鎹強鏃舵�у垽瀹氱粨鏋滐細1鏄悎鏍硷紝0鏄笉鍚堟牸
+         */
+        private String allTimelyResultText;
+
+        public String getTodayTimelyResultText() {
+            if (todayTimelyResult == 1) {
+                todayTimelyResultText = "鍚堟牸";
+            }
+            if (todayTimelyResult == 0) {
+                todayTimelyResultText = "涓嶅悎鏍�";
+            }
+            return todayTimelyResultText;
+        }
+
+        public String getAllTimelyResultText() {
+            if (allTimelyResult == 1) {
+                allTimelyResultText = "鍚堟牸";
+            }
+            if (allTimelyResult == 0) {
+                allTimelyResultText = "涓嶅悎鏍�";
+            }
+            return allTimelyResultText;
+        }
     }
 
     @Data
@@ -208,6 +289,24 @@
          * 杞︾墝璇嗗埆寮傚父锛氱粨鏋滅被鍨� 1:姝e父 2:璇嗗埆鐜囦綆 3:鏄煎璇嗗埆鐜囩獊鍙�
          */
         private Integer recgResult;
+
+        /**
+         * 杞︾墝璇嗗埆寮傚父锛氱粨鏋滅被鍨� 1:姝e父 2:璇嗗埆鐜囦綆 3:鏄煎璇嗗埆鐜囩獊鍙�
+         */
+        private String recgResultText;
+
+        public String getRecgResultText() {
+            if (recgResult == 1) {
+                recgResultText = "姝e父";
+            }
+            if (recgResult == 2) {
+                recgResultText = "璇嗗埆鐜囦綆";
+            }
+            if (recgResult == 3) {
+                recgResultText = "鏄煎璇嗗埆鐜囩獊鍙�";
+            }
+            return recgResultText;
+        }
     }
 
     @Data
@@ -252,4 +351,17 @@
          */
         private Integer noIntegrityCount;
     }
+
+    public static SnapClockVO getVO(VehicleDeviceInspectionResult result){
+        SnapClockVO snapClockVO = new SnapClockVO();
+        BeanUtils.copyProperties(result,snapClockVO);
+        snapClockVO.setClockPercent(result.getSnapClock().getClockPercent());
+        snapClockVO.setTodayClockCount(result.getSnapClock().getTodayClockCount());
+        snapClockVO.setTodayClockResult(result.getSnapClock().getTodayClockResult());
+        snapClockVO.setAllClockCount(result.getSnapClock().getAllClockCount());
+        snapClockVO.setAllClockResult(result.getSnapClock().getAllClockResult());
+        snapClockVO.setAllClockResultText(result.getSnapClock().getAllClockResultText());
+        snapClockVO.setTodayClockResultText(result.getSnapClock().getTodayClockResultText());
+        return snapClockVO;
+    }
 }

--
Gitblit v1.8.0