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 | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 54 insertions(+), 4 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 db21934..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鐪� @@ -84,13 +87,29 @@ private Integer osdTimeCorrect; /** + * osdTimeCorrect鏃堕棿鏄惁姝g‘ + */ + private Boolean osdTimeError; + + /** * osd閫氶亾鍚嶆槸鍚︽纭� 1姝g‘ 0鏈煡 -1閿� */ private Integer osdNameCorrect; + + /** + * osd閫氶亾鍚嶆槸鍚︽纭� + */ + private Boolean osdNameError; + /** * osd鐪佹槸鍚︽纭� */ private Integer osdProvinceCorrect; + + /** + * osd鐪佹槸鍚︽纭� + */ + private Boolean osdProvinceError; /** * osd甯傛槸鍚︽纭� @@ -98,10 +117,19 @@ private Integer osdCityCorrect; /** + * osd甯傛槸鍚︽纭� + */ + private Boolean osdCityError; + + /** * osd鍖烘槸鍚︽纭� */ private Integer osdPartCorrect; + /** + * osd鍖烘槸鍚︽纭� + */ + private Boolean osdPartError; /** * osd宸︿笅瑙掓槸鍚︽纭� */ @@ -119,4 +147,26 @@ public static Boolean checkTime(OsdCheckResult result) { return ApiConstants.OSD_Correct.equals(result.getOsdTimeCorrect()); } + + 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.setOsdNameError(Boolean.FALSE); + else { result.setOsdNameError(Boolean.TRUE); } + + if(ApiConstants.OSD_Correct.equals(result.getOsdProvinceCorrect())) result.setOsdProvinceError(Boolean.FALSE); + else { result.setOsdProvinceError(Boolean.TRUE); } + + if(ApiConstants.OSD_Correct.equals(result.getOsdCityCorrect())) result.setOsdCityError(Boolean.FALSE); + else { result.setOsdCityError(Boolean.TRUE); } + + 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