From 918b26794c7d3b3faa2c57e6a6cb0c11ea4e73e8 Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期四, 05 十二月 2024 16:34:56 +0800 Subject: [PATCH] 省厅标签拆分2 --- ycl-pojo/src/main/java/com/ycl/platform/domain/result/UY/MonitorQualifyResult.java | 129 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 127 insertions(+), 2 deletions(-) diff --git a/ycl-pojo/src/main/java/com/ycl/platform/domain/result/UY/MonitorQualifyResult.java b/ycl-pojo/src/main/java/com/ycl/platform/domain/result/UY/MonitorQualifyResult.java index 33bf7f3..3c48e69 100644 --- a/ycl-pojo/src/main/java/com/ycl/platform/domain/result/UY/MonitorQualifyResult.java +++ b/ycl-pojo/src/main/java/com/ycl/platform/domain/result/UY/MonitorQualifyResult.java @@ -1,17 +1,142 @@ package com.ycl.platform.domain.result.UY; +import com.ycl.platform.domain.result.BaseResult; +import com.ycl.platform.domain.vo.DataCenter.MonitorQualifyResultVO; import lombok.Data; +import org.springframework.data.mongodb.core.index.TextIndexed; +import org.springframework.data.mongodb.core.mapping.Document; @Data -public class MonitorQualifyResult { +@Document(collection = "uy_monitor_qualify") +public class MonitorQualifyResult extends BaseResult { + /** + * 琛屾斂缂栫爜 + */ private QualifyResult civilCode; - + /** + * 鏄惁闆嗘垚璁惧 + */ + private QualifyResult integrated_device; + /** + * IP鍦板潃 + */ + @TextIndexed + private QualifyResult ip; + /** + * 鐩戞帶鐐逛綅绫诲瀷 + */ + private QualifyResult jkdwlx; + /** + * 绾害 + */ + private QualifyResult latitude; + /** + * 缁忓害 + */ + private QualifyResult longitude; + /** + * mac鍦板潃 + */ + private QualifyResult macdz; + /** + * 璁惧鍚� + */ + @TextIndexed + private QualifyResult name; + /** + * 璁惧鐘舵�� + */ + private QualifyResult sbzt; + /** + * 璁惧缂栫爜 + */ + @TextIndexed + private QualifyResult serialNumber; + /** + * 鎽勫儚鏈洪噰闆嗗尯鍩� + */ + private QualifyResult sxjcjqy; + /** + * 鎽勫儚鏈哄姛鑳界被鍨� + */ + private QualifyResult sxjgnlx; + /** + * 绉熸埛id + */ + private QualifyResult tenantId; @Data public static class QualifyResult { + /** + * 鏄惁閿欒 姝e父鏄痜alse锛宼ure琛ㄧず鏈夐棶棰� + */ private Boolean error; private String errorMessage; + /** + * 灞曠ず鍊� + */ + @TextIndexed private String showValue; + /** + * 鏁版嵁鍘熷鍊硷紝濡傚浗鏍囩爜绛� + */ + @TextIndexed private String value; } + + //鍏ㄥ杩攖ure + public static boolean correct(MonitorQualifyResult result) { + return checkError(result.getName()) && + checkError(result.getCivilCode()) && + checkError(result.getIp()) && + checkError(result.getSerialNumber()) && + checkError(result.getMacdz()) && + checkError(result.getLatitude()) && + checkError(result.getLongitude()) && + checkError(result.getSbzt()) && + checkError(result.getSxjcjqy()) && + checkError(result.getSxjgnlx()) && + checkError(result.getJkdwlx()) && + checkError(result.getIntegrated_device()) + ; + } + + //妫�鏌ユ寚鏍囷紝姝e父杩斿洖true + public static boolean checkError(MonitorQualifyResult.QualifyResult result) { + return result!=null && result.getError() != null && !result.getError(); + } + + public static MonitorQualifyResultVO getVO(MonitorQualifyResult result) { + MonitorQualifyResultVO vo = new MonitorQualifyResultVO(); + vo.setCivilCode(result.getCivilCode().getShowValue()); + vo.setCivilCodeError(result.getCivilCode().getError()); + vo.setIp(result.getIp().getShowValue()); + vo.setIpError(result.getIp().getError()); + vo.setIntegratedDevice(result.getIntegrated_device().getShowValue()); + vo.setIntegratedDeviceError(result.getIntegrated_device().getError()); + vo.setJkdwlx(result.getJkdwlx().getShowValue()); + vo.setJkdwlxError(result.getJkdwlx().getError()); + vo.setLatitude(result.getLatitude().getShowValue()); + vo.setLatitudeError(result.getLatitude().getError()); + vo.setLongitude(result.getLongitude().getShowValue()); + vo.setLongitudeError(result.getLongitude().getError()); + vo.setMacdz(result.getMacdz().getShowValue()); + vo.setMacdzError(result.getMacdz().getError()); + vo.setName(result.getName().getShowValue()); + vo.setNameError(result.getName().getError()); + vo.setSbzt(result.getSbzt().getShowValue()); + vo.setSbztError(result.getSbzt().getError()); + vo.setSerialNumber(result.getSerialNumber().getShowValue()); + vo.setSerialNumberError(result.getSerialNumber().getError()); + vo.setSxjcjqy(result.getSxjcjqy().getShowValue()); + vo.setSxjcjqyError(result.getSxjcjqy().getError()); + vo.setSxjgnlx(result.getSxjgnlx().getShowValue()); + vo.setSxjgnlxError(result.getSxjgnlx().getError()); + if (result.getNewDevice()) { + vo.setNewDevice("鏄�"); + } else { + vo.setNewDevice("鍚�"); + } + return vo; + } } -- Gitblit v1.8.0