From c83101eb62f5d4906b9c01ceea6b21a37f9e84d8 Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期二, 18 十一月 2025 09:24:53 +0800
Subject: [PATCH] bug修复
---
ycl-pojo/src/main/java/com/ycl/platform/domain/result/UY/MonitorQualifyResult.java | 48 +++++++++++++++++++++++++++++++++++++++---------
1 files changed, 39 insertions(+), 9 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 eee213c..14fc361 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,6 +1,7 @@
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;
@@ -19,7 +20,6 @@
/**
* IP鍦板潃
*/
- @TextIndexed
private QualifyResult ip;
/**
* 鐩戞帶鐐逛綅绫诲瀷
@@ -40,7 +40,6 @@
/**
* 璁惧鍚�
*/
- @TextIndexed
private QualifyResult name;
/**
* 璁惧鐘舵��
@@ -49,7 +48,6 @@
/**
* 璁惧缂栫爜
*/
- @TextIndexed
private QualifyResult serialNumber;
/**
* 鎽勫儚鏈洪噰闆嗗尯鍩�
@@ -68,24 +66,22 @@
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()) &&
+ return checkError(result.getName()) &&
checkError(result.getCivilCode()) &&
checkError(result.getIp()) &&
checkError(result.getSerialNumber()) &&
@@ -102,6 +98,40 @@
//妫�鏌ユ寚鏍囷紝姝e父杩斿洖true
public static boolean checkError(MonitorQualifyResult.QualifyResult result) {
- return result.getError() != null && !result.getError();
+ return result!=null && result.getError() != null && !result.getError();
+ }
+
+ public static MonitorQualifyResultVO getVO(MonitorQualifyResult result) {
+ MonitorQualifyResultVO vo = new MonitorQualifyResultVO();
+ vo.setCivilCode(result.getCivilCode()!=null?result.getCivilCode().getShowValue():"");
+ vo.setCivilCodeError(result.getCivilCode()!=null?result.getCivilCode().getError():Boolean.FALSE);
+ vo.setIp(result.getIp()!=null?result.getIp().getShowValue():"");
+ vo.setIpError(result.getIp()!=null?result.getIp().getError():Boolean.FALSE);
+ vo.setIntegratedDevice(result.getIntegrated_device()!=null?result.getIntegrated_device().getShowValue():"");
+ vo.setIntegratedDeviceError(result.getIntegrated_device()!=null?result.getIntegrated_device().getError():Boolean.FALSE);
+ vo.setJkdwlx(result.getJkdwlx()!=null?result.getJkdwlx().getShowValue():"");
+ vo.setJkdwlxError(result.getJkdwlx()!=null?result.getJkdwlx().getError():Boolean.FALSE);
+ vo.setLatitude(result.getLatitude()!=null?result.getLatitude().getShowValue():"");
+ vo.setLatitudeError(result.getLatitude()!=null?result.getLatitude().getError():Boolean.FALSE);
+ vo.setLongitude(result.getLongitude()!=null?result.getLongitude().getShowValue():"");
+ vo.setLongitudeError(result.getLongitude()!=null?result.getLongitude().getError():Boolean.FALSE);
+ vo.setMacdz(result.getMacdz()!=null?result.getMacdz().getShowValue():"");
+ vo.setMacdzError(result.getMacdz()!=null?result.getMacdz().getError():Boolean.FALSE);
+ vo.setName(result.getName()!=null?result.getName().getShowValue():"");
+ vo.setNameError(result.getName()!=null?result.getName().getError():Boolean.FALSE);
+ vo.setSbzt(result.getSbzt()!=null?result.getSbzt().getShowValue():"");
+ vo.setSbztError(result.getSbzt()!=null?result.getSbzt().getError():Boolean.FALSE);
+ vo.setSerialNumber(result.getSerialNumber()!=null?result.getSerialNumber().getShowValue():"");
+ vo.setSerialNumberError(result.getSerialNumber()!=null?result.getSerialNumber().getError():Boolean.FALSE);
+ vo.setSxjcjqy(result.getSxjcjqy()!=null?result.getSxjcjqy().getShowValue():"");
+ vo.setSxjcjqyError(result.getSxjcjqy()!=null?result.getSxjcjqy().getError():Boolean.FALSE);
+ vo.setSxjgnlx(result.getSxjgnlx()!=null?result.getSxjgnlx().getShowValue():"");
+ vo.setSxjgnlxError(result.getSxjgnlx()!=null?result.getSxjgnlx().getError():Boolean.FALSE);
+ if (result.getNewDevice()!=null && result.getNewDevice()) {
+ vo.setNewDevice("鏄�");
+ } else {
+ vo.setNewDevice("鍚�");
+ }
+ return vo;
}
}
--
Gitblit v1.8.0