From db75b45e9a7ce347162b8d3a36e4a7f46cfe199e Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期一, 10 二月 2025 15:30:18 +0800
Subject: [PATCH] 核算导出单独对录像扣分的数量做处理

---
 ycl-pojo/src/main/java/com/ycl/platform/domain/result/HK/FaceDeviceInspectionResult.java |   98 ++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 96 insertions(+), 2 deletions(-)

diff --git a/ycl-pojo/src/main/java/com/ycl/platform/domain/result/HK/FaceDeviceInspectionResult.java b/ycl-pojo/src/main/java/com/ycl/platform/domain/result/HK/FaceDeviceInspectionResult.java
index 6bf7b78..d2037c4 100644
--- a/ycl-pojo/src/main/java/com/ycl/platform/domain/result/HK/FaceDeviceInspectionResult.java
+++ b/ycl-pojo/src/main/java/com/ycl/platform/domain/result/HK/FaceDeviceInspectionResult.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 = "face_device_inspection")
+@Document(collection = "hk_face_device_inspection")
 public class FaceDeviceInspectionResult extends BaseResult {
 
     /**
@@ -68,6 +71,11 @@
      */
     private Integer snapResult;
 
+    /**
+     * 鎶撴媿鏁版嵁閲忕洃娴嬬粨鏋滐紝1:姝e父 2:鏃犳暟鎹� 4:鏁版嵁閲忓皯
+     */
+    private String snapResultText;
+
     // 浠ヤ笅涓哄祵濂楀璞$殑瀛楁
 
     /**
@@ -90,6 +98,19 @@
      */
     private SnapUnique snapUnique;
 
+    public String getSnapResultText() {
+        if (snapResult == 1) {
+            snapResultText = "姝e父";
+        }
+        if (snapResult == 2) {
+            snapResultText = "鏃犳暟鎹�";
+        }
+        if (snapResult == 4) {
+            snapResultText = "鏁版嵁閲忓皯";
+        }
+        return snapResultText;
+    }
+
     // 鍐呭祵瀵硅薄瀹氫箟
 
     @Data
@@ -110,6 +131,11 @@
         private Integer todayClockResult;
 
         /**
+         * 褰撴棩鎺ユ敹鐨勫綋鏃ユ姄鎷嶆暟鎹椂閽熷噯纭�у垽瀹氱粨鏋滐細1鏄悎鏍硷紝0鏄笉鍚堟牸
+         */
+        private String todayClockResultText;
+
+        /**
          * 褰撴棩鎺ユ敹鐨勫叏閮ㄦ姄鎷嶆暟鎹腑鏃堕挓鍑嗙‘鏁版嵁閲�
          */
         private Integer allClockCount;
@@ -118,6 +144,31 @@
          * 褰撴棩鎺ユ敹鐨勫叏閮ㄦ姄鎷嶆暟鎹腑鏃堕挓鍑嗙‘鎬у垽瀹氱粨鏋滐細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
@@ -153,6 +204,11 @@
         private Integer todayTimelyResult;
 
         /**
+         * 褰撴棩鎺ユ敹鐨勫綋鏃ユ姄鎷嶆暟鎹強鏃舵�у垽瀹氱粨鏋滐細1鏄悎鏍硷紝0鏄笉鍚堟牸
+         */
+        private String todayTimelyResultText;
+
+        /**
          * 褰撴棩鎺ユ敹鐨勫叏閮ㄦ姄鎷嶆暟鎹腑寤惰繜鏁版嵁閲�
          */
         private Integer allDelayCount;
@@ -176,6 +232,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
@@ -223,4 +304,17 @@
          */
         private Integer nouniqueCount;
     }
+
+    public static SnapClockVO getVO(FaceDeviceInspectionResult 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