From e23edcf2619ad46fd77a710fca6c21de78234bc0 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期二, 07 一月 2025 17:33:06 +0800
Subject: [PATCH] 核算重构完成

---
 ycl-pojo/src/main/java/com/ycl/platform/domain/result/UY/OsdCheckResult.java |   55 +++++++++++++++++++++++++++++--------------------------
 1 files changed, 29 insertions(+), 26 deletions(-)

diff --git a/ycl-pojo/src/main/java/com/ycl/platform/domain/result/UY/OsdCheckResult.java b/ycl-pojo/src/main/java/com/ycl/platform/domain/result/UY/OsdCheckResult.java
index 4f3c3ac..1c04824 100644
--- a/ycl-pojo/src/main/java/com/ycl/platform/domain/result/UY/OsdCheckResult.java
+++ b/ycl-pojo/src/main/java/com/ycl/platform/domain/result/UY/OsdCheckResult.java
@@ -3,6 +3,7 @@
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.ycl.platform.domain.result.BaseResult;
 import constant.ApiConstants;
+import enumeration.DeviceType;
 import lombok.Data;
 import org.springframework.data.mongodb.core.index.TextIndexed;
 import org.springframework.data.mongodb.core.mapping.Document;
@@ -22,14 +23,17 @@
     /**
      * 鍥芥爣鐮�
      */
-    @TextIndexed
     private String deviceNo;
 
     /**
-     *  鎽勫儚鏈哄搧鐗�
+     *  鎽勫儚鏈哄搧鐗�0/1/2 娴峰悍/澶у崕/瀹囪
      */
     private Integer deviceBrand;
 
+    /**
+     *  鎽勫儚鏈哄搧鐗�0/1/2 娴峰悍/澶у崕/瀹囪
+     */
+    private String deviceBrandStr;
     /**
      * 璁惧绫诲瀷
      */
@@ -38,7 +42,6 @@
     /**
      * ip
      */
-    @TextIndexed
     private String ip;
 
     /**
@@ -53,10 +56,10 @@
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date setTime;
 
+
     /**
      * osd閫氶亾鍚�
      */
-    @TextIndexed
     private String osdName;
     /**
      * osd鐪�
@@ -86,7 +89,7 @@
     /**
      * osdTimeCorrect鏃堕棿鏄惁姝g‘
      */
-    private String osdTimeCorrectText;
+    private Boolean osdTimeError;
 
     /**
      * osd閫氶亾鍚嶆槸鍚︽纭�   1姝g‘  0鏈煡  -1閿�
@@ -94,9 +97,9 @@
     private Integer osdNameCorrect;
 
     /**
-     * osd閫氶亾鍚嶆槸鍚︽纭�   1姝g‘  0鏈煡  -1閿�
+     * osd閫氶亾鍚嶆槸鍚︽纭�
      */
-    private String osdNameCorrectText;
+    private Boolean osdNameError;
 
     /**
      * osd鐪佹槸鍚︽纭�
@@ -106,7 +109,7 @@
     /**
      * osd鐪佹槸鍚︽纭�
      */
-    private String osdProvinceCorrectText;
+    private Boolean osdProvinceError;
 
     /**
      * osd甯傛槸鍚︽纭�
@@ -116,7 +119,7 @@
     /**
      * osd甯傛槸鍚︽纭�
      */
-    private String osdCityCorrectText;
+    private Boolean osdCityError;
 
     /**
      * osd鍖烘槸鍚︽纭�
@@ -126,7 +129,7 @@
     /**
      * osd鍖烘槸鍚︽纭�
      */
-    private String osdPartCorrectText;
+    private Boolean osdPartError;
     /**
      * osd宸︿笅瑙掓槸鍚︽纭�
      */
@@ -145,25 +148,25 @@
         return ApiConstants.OSD_Correct.equals(result.getOsdTimeCorrect());
     }
 
-    public static void getText(OsdCheckResult result) {
-        if(ApiConstants.OSD_Correct.equals(result.getOsdTimeCorrect())) result.setOsdTimeCorrectText("姝g‘");
-        else if(ApiConstants.OSD_Error.equals(result.getOsdTimeCorrect())) result.setOsdTimeCorrectText("閿欒");
-        else { result.setOsdTimeCorrectText("鏈煡"); }
+    public static void getError(OsdCheckResult result) {
+        if(ApiConstants.OSD_Correct.equals(result.getOsdTimeCorrect())) result.setOsdTimeError(Boolean.FALSE);
+        else {result.setOsdTimeError(Boolean.TRUE); }
 
-        if(ApiConstants.OSD_Correct.equals(result.getOsdNameCorrect())) result.setOsdNameCorrectText("姝g‘");
-        else if(ApiConstants.OSD_Error.equals(result.getOsdNameCorrect())) result.setOsdNameCorrectText("閿欒");
-        else { result.setOsdNameCorrectText("鏈煡"); }
+        if(ApiConstants.OSD_Correct.equals(result.getOsdNameCorrect())) result.setOsdNameError(Boolean.FALSE);
+        else { result.setOsdNameError(Boolean.TRUE); }
 
-        if(ApiConstants.OSD_Correct.equals(result.getOsdProvinceCorrect())) result.setOsdProvinceCorrectText("姝g‘");
-        else if(ApiConstants.OSD_Error.equals(result.getOsdProvinceCorrect())) result.setOsdProvinceCorrectText("閿欒");
-        else { result.setOsdProvinceCorrectText("鏈煡"); }
+        if(ApiConstants.OSD_Correct.equals(result.getOsdProvinceCorrect())) result.setOsdProvinceError(Boolean.FALSE);
+        else { result.setOsdProvinceError(Boolean.TRUE); }
 
-        if(ApiConstants.OSD_Correct.equals(result.getOsdCityCorrect())) result.setOsdCityCorrectText("姝g‘");
-        else if(ApiConstants.OSD_Error.equals(result.getOsdCityCorrect())) result.setOsdCityCorrectText("閿欒");
-        else { result.setOsdCityCorrectText("鏈煡"); }
+        if(ApiConstants.OSD_Correct.equals(result.getOsdCityCorrect())) result.setOsdCityError(Boolean.FALSE);
+        else { result.setOsdCityError(Boolean.TRUE); }
 
-        if(ApiConstants.OSD_Correct.equals(result.getOsdPartCorrect())) result.setOsdPartCorrectText("姝g‘");
-        else if(ApiConstants.OSD_Error.equals(result.getOsdPartCorrect())) result.setOsdPartCorrectText("閿欒");
-        else { result.setOsdPartCorrectText("鏈煡"); }
+        if(ApiConstants.OSD_Correct.equals(result.getOsdPartCorrect())) result.setOsdPartError(Boolean.FALSE);
+        else { result.setOsdPartError(Boolean.TRUE); }
+
+        if(DeviceType.DH.getType().equals(result.getDeviceBrand())) result.setDeviceBrandStr(DeviceType.DH.getDesc());
+        else if(DeviceType.HK.getType().equals(result.getDeviceBrand())) result.setDeviceBrandStr(DeviceType.HK.getDesc());
+        else if(DeviceType.YS.getType().equals(result.getDeviceBrand())) result.setDeviceBrandStr(DeviceType.YS.getDesc());
+        else { result.setDeviceBrandStr("鏈煡"); }
     }
 }

--
Gitblit v1.8.0