From 36297e9473ccf82acfe02a3df0083733faf8d9e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=8D=E7=BC=96=E8=AF=91=E5=B7=A5=E4=BD=9C=E5=8C=BA?= Date: Sat, 25 Apr 2026 00:55:24 +0800 Subject: [PATCH] =?UTF-8?q?elevator:=20=E5=8F=8D=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E7=BC=96=E8=AF=91=E4=BF=AE=E5=A4=8D=EF=BC=88equals/hash?= =?UTF-8?q?=E3=80=81Feign=E3=80=81POI4=E3=80=81=E5=88=86=E7=89=87=20DTO?= =?UTF-8?q?=E3=80=81lambda=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Made-with: Cursor --- .../cw-elevator-application-service/pom.xml | 6 ++ .../file/param/part/FilePartAppendParam.java | 44 ++++++++++ .../file/param/part/FilePartFinishParam.java | 44 ++++++++++ .../file/param/part/FilePartInitParam.java | 17 ++++ .../portal/file/result/FilePartResult.java | 26 ++++++ .../device/impl/AcsDeviceTaskServiceImpl.java | 2 +- .../param/AcsDeviceRestructureTaskParam.java | 2 +- .../param/AcsRestructureBindingParam.java | 56 +++---------- .../param/AcsRestructureQueryParam.java | 46 +++------- .../result/AcsDeviceRestructureResult.java | 2 +- .../result/AcsElevatorDeviceListResult.java | 2 +- .../device/result/AcsLabelElevatorResult.java | 24 ++---- .../device/result/KeyValueResult.java | 2 +- .../impl/AcsDeviceSettingServiceImpl.java | 2 +- .../export/AcsAbstractExportAsyncService.java | 4 +- .../ElevatorDeviceRecordExcelResult.java | 84 +++++-------------- .../elevator/export/utils/ExcelUtil.java | 10 ++- .../elevator/mqtt/client/MqttFeignClient.java | 2 +- .../mqtt/param/MqttSendMessageParam.java | 2 + .../passrule/impl/AcsPassRuleServiceImpl.java | 2 +- .../result/AcsPassRuleFloorResult.java | 2 +- .../person/impl/AcsPersonServiceImpl.java | 6 +- .../person/impl/PersonRuleServiceImpl.java | 9 +- .../param/AcsPersonAddVisitorParam.java | 43 +++------- .../person/param/AcsPersonQueryParam.java | 84 ++++--------------- .../person/param/PersonDetailQueryParam.java | 34 +++----- .../impl/AcsElevatorRecordServiceImpl.java | 4 +- .../visitor/client/VisitorFeignClient.java | 2 +- .../elevator/zone/client/ZoneFeignClient.java | 2 +- .../form/AcsDeviceRestructureTaskForm.java | 18 ++-- .../form/AcsRestructureBindingForm.java | 51 +++-------- .../device/form/AcsRestructureQueryForm.java | 46 +++------- .../person/form/AcsPersonAddVisitorForm.java | 43 +++------- .../person/form/AcsPersonQueryForm.java | 54 +++--------- .../person/form/PersonDetailQueryForm.java | 34 +++----- 35 files changed, 321 insertions(+), 490 deletions(-) create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/client/davinci/portal/file/param/part/FilePartAppendParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/client/davinci/portal/file/param/part/FilePartFinishParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/client/davinci/portal/file/param/part/FilePartInitParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/client/davinci/portal/file/result/FilePartResult.java diff --git a/maven-cw-elevator-application/cw-elevator-application-service/pom.xml b/maven-cw-elevator-application/cw-elevator-application-service/pom.xml index 5540cefd..3c72e731 100644 --- a/maven-cw-elevator-application/cw-elevator-application-service/pom.xml +++ b/maven-cw-elevator-application/cw-elevator-application-service/pom.xml @@ -69,6 +69,12 @@ cn.cloudwalk.intelligent intelligent-cwoscomponent-rest + + + org.springframework.cloud + spring-cloud-openfeign-core + 2.1.5.RELEASE + diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/client/davinci/portal/file/param/part/FilePartAppendParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/client/davinci/portal/file/param/part/FilePartAppendParam.java new file mode 100644 index 00000000..98e0b651 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/client/davinci/portal/file/param/part/FilePartAppendParam.java @@ -0,0 +1,44 @@ +package cn.cloudwalk.client.davinci.portal.file.param.part; + +import java.io.Serializable; + +/** 分片追加参数(与存储层 append 调用约定一致)。 */ +public class FilePartAppendParam implements Serializable { + private static final long serialVersionUID = 1L; + private String filePath; + private Integer partNumber; + private String uploadId; + private T content; + + public String getFilePath() { + return filePath; + } + + public void setFilePath(String filePath) { + this.filePath = filePath; + } + + public Integer getPartNumber() { + return partNumber; + } + + public void setPartNumber(Integer partNumber) { + this.partNumber = partNumber; + } + + public String getUploadId() { + return uploadId; + } + + public void setUploadId(String uploadId) { + this.uploadId = uploadId; + } + + public T getContent() { + return content; + } + + public void setContent(T content) { + this.content = content; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/client/davinci/portal/file/param/part/FilePartFinishParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/client/davinci/portal/file/param/part/FilePartFinishParam.java new file mode 100644 index 00000000..e21dcbfd --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/client/davinci/portal/file/param/part/FilePartFinishParam.java @@ -0,0 +1,44 @@ +package cn.cloudwalk.client.davinci.portal.file.param.part; + +import java.io.Serializable; + +/** 分片结束参数(与 PartFinishDTO 字段对齐)。 */ +public class FilePartFinishParam implements Serializable { + private static final long serialVersionUID = 1L; + private String uploadId; + private Long fileSize; + private String filePath; + private Integer returnType; + + public String getUploadId() { + return uploadId; + } + + public void setUploadId(String uploadId) { + this.uploadId = uploadId; + } + + public Long getFileSize() { + return fileSize; + } + + public void setFileSize(Long fileSize) { + this.fileSize = fileSize; + } + + public String getFilePath() { + return filePath; + } + + public void setFilePath(String filePath) { + this.filePath = filePath; + } + + public Integer getReturnType() { + return returnType; + } + + public void setReturnType(Integer returnType) { + this.returnType = returnType; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/client/davinci/portal/file/param/part/FilePartInitParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/client/davinci/portal/file/param/part/FilePartInitParam.java new file mode 100644 index 00000000..82ea1a7d --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/client/davinci/portal/file/param/part/FilePartInitParam.java @@ -0,0 +1,17 @@ +package cn.cloudwalk.client.davinci.portal.file.param.part; + +import java.io.Serializable; + +/** 分片上传初始化参数(与 PartInitDTO 字段对齐,供 BeanCopy 与业务层使用)。 */ +public class FilePartInitParam implements Serializable { + private static final long serialVersionUID = 1L; + private String fileName; + + public String getFileName() { + return fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/client/davinci/portal/file/result/FilePartResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/client/davinci/portal/file/result/FilePartResult.java new file mode 100644 index 00000000..134ebe35 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/client/davinci/portal/file/result/FilePartResult.java @@ -0,0 +1,26 @@ +package cn.cloudwalk.client.davinci.portal.file.result; + +import java.io.Serializable; + +/** 分片初始化/追加返回(与 PartInitResultDTO 字段对齐)。 */ +public class FilePartResult implements Serializable { + private static final long serialVersionUID = 1L; + private String filePath; + private String uploadId; + + public String getFilePath() { + return filePath; + } + + public void setFilePath(String filePath) { + this.filePath = filePath; + } + + public String getUploadId() { + return uploadId; + } + + public void setUploadId(String uploadId) { + this.uploadId = uploadId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/impl/AcsDeviceTaskServiceImpl.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/impl/AcsDeviceTaskServiceImpl.java index 4696b5da..80227f23 100644 --- a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/impl/AcsDeviceTaskServiceImpl.java +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/impl/AcsDeviceTaskServiceImpl.java @@ -79,7 +79,7 @@ public class AcsDeviceTaskServiceImpl extends AbstractAcsDeviceService implement if (!CollectionUtils.isEmpty(delFloorIds)) { List ruleList = this.imageRuleRefDao.listZoneInfoByIds(delFloorIds); Map ruleMap = new HashMap<>(); - ruleList.forEach(rule -> (String)ruleMap.put(rule.getZoneId(), rule.getZoneName())); + ruleList.forEach(rule -> ruleMap.put(rule.getZoneId(), rule.getZoneName())); for (String delFloorId : delFloorIds) { AcsDeviceTaskDTO task = this.acsDeviceTaskDao.getById(param.getTaskId()); if (task.getIsStop().intValue() == 0) { diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsDeviceRestructureTaskParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsDeviceRestructureTaskParam.java index 1c3a8840..3d817a66 100644 --- a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsDeviceRestructureTaskParam.java +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsDeviceRestructureTaskParam.java @@ -12,7 +12,7 @@ public class AcsDeviceRestructureTaskParam implements Serializable { public int hashCode() { int PRIME = 59; - result = 1; + int result = 1; Object $taskId = getTaskId(); return result * 59 + (($taskId == null) ? 43 : $taskId.hashCode()); } diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsRestructureBindingParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsRestructureBindingParam.java index fcf4f5a9..8ab05664 100644 --- a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsRestructureBindingParam.java +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsRestructureBindingParam.java @@ -2,6 +2,7 @@ package cn.cloudwalk.elevator.device.param; import java.io.Serializable; import java.util.List; +import java.util.Objects; public class AcsRestructureBindingParam implements Serializable { private String parentId; @@ -46,36 +47,20 @@ public class AcsRestructureBindingParam implements Serializable { } public boolean equals(Object o) { - if (o == this) + if (o == this) { return true; - if (!(o instanceof AcsRestructureBindingParam)) + } + if (!(o instanceof AcsRestructureBindingParam)) { return false; + } AcsRestructureBindingParam other = (AcsRestructureBindingParam)o; - if (!other.canEqual(this)) + if (!other.canEqual(this)) { return false; - Object this$parentId = getParentId(), other$parentId = other.getParentId(); - if ((this$parentId == null) ? (other$parentId != null) : !this$parentId.equals(other$parentId)) - return false; - Object this$orgId = getOrgId(), other$orgId = other.getOrgId(); - if ((this$orgId == null) ? (other$orgId != null) : !this$orgId.equals(other$orgId)) - return false; - Object this$orgName = getOrgName(), other$orgName = other.getOrgName(); - if ((this$orgName == null) ? (other$orgName != null) : !this$orgName.equals(other$orgName)) - return false; - Object this$labelId = getLabelId(), other$labelId = other.getLabelId(); - if ((this$labelId == null) ? (other$labelId != null) : !this$labelId.equals(other$labelId)) - return false; - Object this$labelName = getLabelName(), other$labelName = other.getLabelName(); - if ((this$labelName == null) ? (other$labelName != null) : !this$labelName.equals(other$labelName)) - return false; - Object this$personId = getPersonId(), other$personId = other.getPersonId(); - if ((this$personId == null) ? (other$personId != null) : !this$personId.equals(other$personId)) - return false; - Object this$zoneIds = (Object)getZoneIds(), other$zoneIds = (Object)other.getZoneIds(); - if ((this$zoneIds == null) ? (other$zoneIds != null) : !this$zoneIds.equals(other$zoneIds)) - return false; - Object this$taskId = getTaskId(), other$taskId = other.getTaskId(); - return !((this$taskId == null) ? (other$taskId != null) : !this$taskId.equals(other$taskId)); + } + return Objects.equals(parentId, other.parentId) && Objects.equals(orgId, other.orgId) + && Objects.equals(orgName, other.orgName) && Objects.equals(labelId, other.labelId) + && Objects.equals(labelName, other.labelName) && Objects.equals(personId, other.personId) + && Objects.equals(zoneIds, other.zoneIds) && Objects.equals(taskId, other.taskId); } protected boolean canEqual(Object other) { @@ -83,24 +68,7 @@ public class AcsRestructureBindingParam implements Serializable { } public int hashCode() { - int PRIME = 59; - result = 1; - Object $parentId = getParentId(); - result = result * 59 + (($parentId == null) ? 43 : $parentId.hashCode()); - Object $orgId = getOrgId(); - result = result * 59 + (($orgId == null) ? 43 : $orgId.hashCode()); - Object $orgName = getOrgName(); - result = result * 59 + (($orgName == null) ? 43 : $orgName.hashCode()); - Object $labelId = getLabelId(); - result = result * 59 + (($labelId == null) ? 43 : $labelId.hashCode()); - Object $labelName = getLabelName(); - result = result * 59 + (($labelName == null) ? 43 : $labelName.hashCode()); - Object $personId = getPersonId(); - result = result * 59 + (($personId == null) ? 43 : $personId.hashCode()); - Object $zoneIds = (Object)getZoneIds(); - result = result * 59 + (($zoneIds == null) ? 43 : $zoneIds.hashCode()); - Object $taskId = getTaskId(); - return result * 59 + (($taskId == null) ? 43 : $taskId.hashCode()); + return Objects.hash(parentId, orgId, orgName, labelId, labelName, personId, zoneIds, taskId); } public String toString() { diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsRestructureQueryParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsRestructureQueryParam.java index 083b8148..97236a12 100644 --- a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsRestructureQueryParam.java +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsRestructureQueryParam.java @@ -2,6 +2,7 @@ package cn.cloudwalk.elevator.device.param; import java.io.Serializable; import java.util.List; +import java.util.Objects; public class AcsRestructureQueryParam implements Serializable { private String orgId; @@ -36,31 +37,19 @@ public class AcsRestructureQueryParam implements Serializable { } public boolean equals(Object o) { - if (o == this) + if (o == this) { return true; - if (!(o instanceof AcsRestructureQueryParam)) + } + if (!(o instanceof AcsRestructureQueryParam)) { return false; + } AcsRestructureQueryParam other = (AcsRestructureQueryParam)o; - if (!other.canEqual(this)) + if (!other.canEqual(this)) { return false; - Object this$orgId = getOrgId(), other$orgId = other.getOrgId(); - if ((this$orgId == null) ? (other$orgId != null) : !this$orgId.equals(other$orgId)) - return false; - Object this$labelId = getLabelId(), other$labelId = other.getLabelId(); - if ((this$labelId == null) ? (other$labelId != null) : !this$labelId.equals(other$labelId)) - return false; - Object this$labelIds = (Object)getLabelIds(), - other$labelIds = (Object)other.getLabelIds(); - if ((this$labelIds == null) ? (other$labelIds != null) : !this$labelIds.equals(other$labelIds)) - return false; - Object this$personId = getPersonId(), other$personId = other.getPersonId(); - if ((this$personId == null) ? (other$personId != null) : !this$personId.equals(other$personId)) - return false; - Object this$zoneId = getZoneId(), other$zoneId = other.getZoneId(); - if ((this$zoneId == null) ? (other$zoneId != null) : !this$zoneId.equals(other$zoneId)) - return false; - Object this$businessId = getBusinessId(), other$businessId = other.getBusinessId(); - return !((this$businessId == null) ? (other$businessId != null) : !this$businessId.equals(other$businessId)); + } + return Objects.equals(orgId, other.orgId) && Objects.equals(labelId, other.labelId) + && Objects.equals(labelIds, other.labelIds) && Objects.equals(personId, other.personId) + && Objects.equals(zoneId, other.zoneId) && Objects.equals(businessId, other.businessId); } protected boolean canEqual(Object other) { @@ -68,20 +57,7 @@ public class AcsRestructureQueryParam implements Serializable { } public int hashCode() { - int PRIME = 59; - result = 1; - Object $orgId = getOrgId(); - result = result * 59 + (($orgId == null) ? 43 : $orgId.hashCode()); - Object $labelId = getLabelId(); - result = result * 59 + (($labelId == null) ? 43 : $labelId.hashCode()); - Object $labelIds = (Object)getLabelIds(); - result = result * 59 + (($labelIds == null) ? 43 : $labelIds.hashCode()); - Object $personId = getPersonId(); - result = result * 59 + (($personId == null) ? 43 : $personId.hashCode()); - Object $zoneId = getZoneId(); - result = result * 59 + (($zoneId == null) ? 43 : $zoneId.hashCode()); - Object $businessId = getBusinessId(); - return result * 59 + (($businessId == null) ? 43 : $businessId.hashCode()); + return Objects.hash(orgId, labelId, labelIds, personId, zoneId, businessId); } public String toString() { diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/AcsDeviceRestructureResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/AcsDeviceRestructureResult.java index 823faa3a..f40540fd 100644 --- a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/AcsDeviceRestructureResult.java +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/AcsDeviceRestructureResult.java @@ -59,7 +59,7 @@ public class AcsDeviceRestructureResult { public int hashCode() { int PRIME = 59; - result = 1; + int result = 1; Object $parentId = getParentId(); result = result * 59 + (($parentId == null) ? 43 : $parentId.hashCode()); Object $zoneId = getZoneId(); diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/AcsElevatorDeviceListResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/AcsElevatorDeviceListResult.java index 119fd635..d0668dea 100644 --- a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/AcsElevatorDeviceListResult.java +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/AcsElevatorDeviceListResult.java @@ -122,7 +122,7 @@ public class AcsElevatorDeviceListResult extends CloudwalkBaseTimes implements S public int hashCode() { int PRIME = 59; - result = 1; + int result = 1; Object $businessId = getBusinessId(); result = result * 59 + (($businessId == null) ? 43 : $businessId.hashCode()); Object $deviceId = getDeviceId(); diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/AcsLabelElevatorResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/AcsLabelElevatorResult.java index 266907c4..3b34d83a 100644 --- a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/AcsLabelElevatorResult.java +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/AcsLabelElevatorResult.java @@ -2,6 +2,7 @@ package cn.cloudwalk.elevator.device.result; import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleLabelResultDto; import java.util.List; +import java.util.Objects; public class AcsLabelElevatorResult { private String labelId; @@ -16,19 +17,17 @@ public class AcsLabelElevatorResult { } public boolean equals(Object o) { - if (o == this) + if (o == this) { return true; - if (!(o instanceof AcsLabelElevatorResult)) + } + if (!(o instanceof AcsLabelElevatorResult)) { return false; + } AcsLabelElevatorResult other = (AcsLabelElevatorResult)o; - if (!other.canEqual(this)) + if (!other.canEqual(this)) { return false; - Object this$labelId = getLabelId(), other$labelId = other.getLabelId(); - if ((this$labelId == null) ? (other$labelId != null) : !this$labelId.equals(other$labelId)) - return false; - Object this$details = (Object)getDetails(), - other$details = (Object)other.getDetails(); - return !((this$details == null) ? (other$details != null) : !this$details.equals(other$details)); + } + return Objects.equals(labelId, other.labelId) && Objects.equals(details, other.details); } protected boolean canEqual(Object other) { @@ -36,12 +35,7 @@ public class AcsLabelElevatorResult { } public int hashCode() { - int PRIME = 59; - result = 1; - Object $labelId = getLabelId(); - result = result * 59 + (($labelId == null) ? 43 : $labelId.hashCode()); - Object $details = (Object)getDetails(); - return result * 59 + (($details == null) ? 43 : $details.hashCode()); + return Objects.hash(labelId, details); } public String toString() { diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/KeyValueResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/KeyValueResult.java index 40ea5d51..ad61576f 100644 --- a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/KeyValueResult.java +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/KeyValueResult.java @@ -41,7 +41,7 @@ public class KeyValueResult { public int hashCode() { int PRIME = 59; - result = 1; + int result = 1; Object $key = getKey(); result = result * 59 + (($key == null) ? 43 : $key.hashCode()); Object $time = getTime(); diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/impl/AcsDeviceSettingServiceImpl.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/impl/AcsDeviceSettingServiceImpl.java index fadcd770..4b7ce432 100644 --- a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/impl/AcsDeviceSettingServiceImpl.java +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/impl/AcsDeviceSettingServiceImpl.java @@ -31,7 +31,7 @@ public class AcsDeviceSettingServiceImpl extends AbstractAcsDeviceService implem AcsDeviceSettingResult result = new AcsDeviceSettingResult(); result.setDeviceId(param.getDeviceId()); DeviceSettingQueryParam deviceSettingQueryParam = new DeviceSettingQueryParam(); - deviceSettingQueryParam.setDeviceIds(Lists.newArrayList((Object[])new String[] {param.getDeviceId()})); + deviceSettingQueryParam.setDeviceIds(Lists.newArrayList(param.getDeviceId())); deviceSettingQueryParam.setHasDefault(Short.valueOf((short)0)); CloudwalkResult> deviceSettingQueryResult = this.deviceSettingService.query(deviceSettingQueryParam); diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/AcsAbstractExportAsyncService.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/AcsAbstractExportAsyncService.java index 677e6d3d..6a3ffd2f 100644 --- a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/AcsAbstractExportAsyncService.java +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/AcsAbstractExportAsyncService.java @@ -17,7 +17,6 @@ import cn.cloudwalk.elevator.export.utils.ExcelUtil; import cn.cloudwalk.elevator.storage.AcsFileStorageService; import cn.cloudwalk.elevator.util.CollectionUtils; import cn.cloudwalk.elevator.util.DateUtils; -import cn.cloudwalk.elevator.util.StringUtils; import cn.cloudwalk.intelligent.davinci.common.exception.DavinciServiceException; import cn.cloudwalk.intelligent.davinci.storage.bean.file.dto.FileRemoveDTO; import cn.cloudwalk.intelligent.davinci.storage.manager.FileStorageManager; @@ -130,8 +129,7 @@ public abstract class AcsAbstractExportAsyncService extends AbstractCloudw this.acsDownloadCenterService.finishDownload(fileFinishParam, context); } else if (StringUtils.isNotBlank(exportRecordContext.getFilePath())) { FileRemoveDTO fileRemoveDTO = new FileRemoveDTO(); - fileRemoveDTO - .setFileList(Lists.newArrayList((Object[])new String[] {exportRecordContext.getFilePath()})); + fileRemoveDTO.setFileList(Lists.newArrayList(exportRecordContext.getFilePath())); try { this.fileStorageManager.remove(fileRemoveDTO); } catch (DavinciServiceException e1) { diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/result/ElevatorDeviceRecordExcelResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/result/ElevatorDeviceRecordExcelResult.java index 835972e5..4667149a 100644 --- a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/result/ElevatorDeviceRecordExcelResult.java +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/result/ElevatorDeviceRecordExcelResult.java @@ -1,5 +1,9 @@ package cn.cloudwalk.elevator.export.result; +import cn.cloudwalk.elevator.export.ExcelAttribute; +import java.io.Serializable; +import java.util.Objects; + public class ElevatorDeviceRecordExcelResult implements Serializable { @ExcelAttribute(name = "设备名称", column = "A") private String deviceName; @@ -68,51 +72,23 @@ public class ElevatorDeviceRecordExcelResult implements Serializable { } public boolean equals(Object o) { - if (o == this) + if (o == this) { return true; - if (!(o instanceof ElevatorDeviceRecordExcelResult)) + } + if (!(o instanceof ElevatorDeviceRecordExcelResult)) { return false; + } ElevatorDeviceRecordExcelResult other = (ElevatorDeviceRecordExcelResult)o; - if (!other.canEqual(this)) + if (!other.canEqual(this)) { return false; - Object this$deviceName = getDeviceName(), other$deviceName = other.getDeviceName(); - if ((this$deviceName == null) ? (other$deviceName != null) : !this$deviceName.equals(other$deviceName)) - return false; - Object this$deviceCode = getDeviceCode(), other$deviceCode = other.getDeviceCode(); - if ((this$deviceCode == null) ? (other$deviceCode != null) : !this$deviceCode.equals(other$deviceCode)) - return false; - Object this$deviceTypeName = getDeviceTypeName(), other$deviceTypeName = other.getDeviceTypeName(); - if ((this$deviceTypeName == null) ? (other$deviceTypeName != null) - : !this$deviceTypeName.equals(other$deviceTypeName)) - return false; - Object this$areaName = getAreaName(), other$areaName = other.getAreaName(); - if ((this$areaName == null) ? (other$areaName != null) : !this$areaName.equals(other$areaName)) - return false; - Object this$currentFloor = getCurrentFloor(), other$currentFloor = other.getCurrentFloor(); - if ((this$currentFloor == null) ? (other$currentFloor != null) : !this$currentFloor.equals(other$currentFloor)) - return false; - Object this$elevatorFloorList = getElevatorFloorList(), other$elevatorFloorList = other.getElevatorFloorList(); - if ((this$elevatorFloorList == null) ? (other$elevatorFloorList != null) - : !this$elevatorFloorList.equals(other$elevatorFloorList)) - return false; - Object this$deviceOnlineStatus = getDeviceOnlineStatus(), - other$deviceOnlineStatus = other.getDeviceOnlineStatus(); - if ((this$deviceOnlineStatus == null) ? (other$deviceOnlineStatus != null) - : !this$deviceOnlineStatus.equals(other$deviceOnlineStatus)) - return false; - Object this$ip = getIp(), other$ip = other.getIp(); - if ((this$ip == null) ? (other$ip != null) : !this$ip.equals(other$ip)) - return false; - Object this$lastHeartbeatTime = getLastHeartbeatTime(), other$lastHeartbeatTime = other.getLastHeartbeatTime(); - if ((this$lastHeartbeatTime == null) ? (other$lastHeartbeatTime != null) - : !this$lastHeartbeatTime.equals(other$lastHeartbeatTime)) - return false; - Object this$status = getStatus(), other$status = other.getStatus(); - if ((this$status == null) ? (other$status != null) : !this$status.equals(other$status)) - return false; - Object this$onlineStatus = getOnlineStatus(), other$onlineStatus = other.getOnlineStatus(); - return !((this$onlineStatus == null) ? (other$onlineStatus != null) - : !this$onlineStatus.equals(other$onlineStatus)); + } + return Objects.equals(deviceName, other.deviceName) && Objects.equals(deviceCode, other.deviceCode) + && Objects.equals(deviceTypeName, other.deviceTypeName) && Objects.equals(areaName, other.areaName) + && Objects.equals(currentFloor, other.currentFloor) + && Objects.equals(elevatorFloorList, other.elevatorFloorList) + && Objects.equals(deviceOnlineStatus, other.deviceOnlineStatus) && Objects.equals(ip, other.ip) + && Objects.equals(lastHeartbeatTime, other.lastHeartbeatTime) && Objects.equals(status, other.status) + && Objects.equals(onlineStatus, other.onlineStatus); } protected boolean canEqual(Object other) { @@ -120,30 +96,8 @@ public class ElevatorDeviceRecordExcelResult implements Serializable { } public int hashCode() { - int PRIME = 59; - result = 1; - Object $deviceName = getDeviceName(); - result = result * 59 + (($deviceName == null) ? 43 : $deviceName.hashCode()); - Object $deviceCode = getDeviceCode(); - result = result * 59 + (($deviceCode == null) ? 43 : $deviceCode.hashCode()); - Object $deviceTypeName = getDeviceTypeName(); - result = result * 59 + (($deviceTypeName == null) ? 43 : $deviceTypeName.hashCode()); - Object $areaName = getAreaName(); - result = result * 59 + (($areaName == null) ? 43 : $areaName.hashCode()); - Object $currentFloor = getCurrentFloor(); - result = result * 59 + (($currentFloor == null) ? 43 : $currentFloor.hashCode()); - Object $elevatorFloorList = getElevatorFloorList(); - result = result * 59 + (($elevatorFloorList == null) ? 43 : $elevatorFloorList.hashCode()); - Object $deviceOnlineStatus = getDeviceOnlineStatus(); - result = result * 59 + (($deviceOnlineStatus == null) ? 43 : $deviceOnlineStatus.hashCode()); - Object $ip = getIp(); - result = result * 59 + (($ip == null) ? 43 : $ip.hashCode()); - Object $lastHeartbeatTime = getLastHeartbeatTime(); - result = result * 59 + (($lastHeartbeatTime == null) ? 43 : $lastHeartbeatTime.hashCode()); - Object $status = getStatus(); - result = result * 59 + (($status == null) ? 43 : $status.hashCode()); - Object $onlineStatus = getOnlineStatus(); - return result * 59 + (($onlineStatus == null) ? 43 : $onlineStatus.hashCode()); + return Objects.hash(deviceName, deviceCode, deviceTypeName, areaName, currentFloor, elevatorFloorList, + deviceOnlineStatus, ip, lastHeartbeatTime, status, onlineStatus); } public String toString() { diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/utils/ExcelUtil.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/utils/ExcelUtil.java index 8423d626..8ec3fa58 100644 --- a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/utils/ExcelUtil.java +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/utils/ExcelUtil.java @@ -33,6 +33,8 @@ import org.apache.poi.hssf.usermodel.HSSFRow; import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.CellType; +import org.apache.poi.ss.usermodel.IndexedColors; import org.apache.poi.ss.usermodel.DataValidation; import org.apache.poi.ss.usermodel.DataValidationConstraint; import org.apache.poi.ss.usermodel.Row; @@ -82,7 +84,7 @@ public class ExcelUtil { if (!fieldsMap.containsKey(fieldName)) { continue; } - cell.setCellType(1); + cell.setCellType(CellType.STRING); String c = cell.getStringCellValue(); if (StringUtils.isNotEmpty(c)) { isNull = false; @@ -332,7 +334,7 @@ public class ExcelUtil { cell.setCellStyle(cellStyle); sheet.setColumnWidth(i, (int)((((attr.name().getBytes()).length <= 4) ? 6 : (attr.name().getBytes()).length) * 1.5D * 256.0D)); - cell.setCellType(1); + cell.setCellType(CellType.STRING); cell.setCellValue(attr.name()); } } @@ -341,9 +343,9 @@ public class ExcelUtil { HSSFFont font = workbook.createFont(); HSSFCellStyle cellStyle = workbook.createCellStyle(); font.setFontName("Arail narrow"); - font.setBoldweight((short)700); + font.setBold(true); if ("1".equals(type)) { - font.setColor('翿'); + font.setColor(IndexedColors.RED.getIndex()); cellStyle.setFont(font); } else { font.setColor((short)10); diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/mqtt/client/MqttFeignClient.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/mqtt/client/MqttFeignClient.java index 21e8718b..3eaf5fea 100644 --- a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/mqtt/client/MqttFeignClient.java +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/mqtt/client/MqttFeignClient.java @@ -4,7 +4,7 @@ import cn.cloudwalk.cloud.exception.ServiceException; import cn.cloudwalk.cloud.result.CloudwalkResult; import cn.cloudwalk.elevator.mqtt.fallback.MqttFeignClientFallback; import cn.cloudwalk.elevator.mqtt.param.MqttSendMessageParam; -import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/mqtt/param/MqttSendMessageParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/mqtt/param/MqttSendMessageParam.java index ef6470c1..b23a8228 100644 --- a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/mqtt/param/MqttSendMessageParam.java +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/mqtt/param/MqttSendMessageParam.java @@ -1,5 +1,7 @@ package cn.cloudwalk.elevator.mqtt.param; +import java.beans.ConstructorProperties; + public class MqttSendMessageParam { private String topic; private String data; diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/impl/AcsPassRuleServiceImpl.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/impl/AcsPassRuleServiceImpl.java index 561054b1..c35d2a75 100644 --- a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/impl/AcsPassRuleServiceImpl.java +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/impl/AcsPassRuleServiceImpl.java @@ -355,7 +355,7 @@ public class AcsPassRuleServiceImpl extends AbstractAcsPassService implements Ac .map(AcsPassRuleResultDto::getImageStoreId).collect(Collectors.toList()); List imageStoreListResult = getImageStorePageResult(imageStoreIds, context); imageStoreResultMap = (Map)imageStoreListResult.stream() - .collect(Collectors.toMap(ImageStoreListResult::getId, imageStoreListResult -> imageStoreListResult)); + .collect(Collectors.toMap(ImageStoreListResult::getId, r -> r)); } for (AcsPassRuleResultDto dto : passRuleResultDtos) { AcsPassRuleResult result = new AcsPassRuleResult(); diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/result/AcsPassRuleFloorResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/result/AcsPassRuleFloorResult.java index 2c43fd9d..4f5372b3 100644 --- a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/result/AcsPassRuleFloorResult.java +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/result/AcsPassRuleFloorResult.java @@ -61,7 +61,7 @@ public class AcsPassRuleFloorResult implements Serializable { public int hashCode() { int PRIME = 59; - result = 1; + int result = 1; Object $id = getId(); result = result * 59 + (($id == null) ? 43 : $id.hashCode()); Object $name = getName(); diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/impl/AcsPersonServiceImpl.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/impl/AcsPersonServiceImpl.java index c41eb966..ba2b4fb8 100644 --- a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/impl/AcsPersonServiceImpl.java +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/impl/AcsPersonServiceImpl.java @@ -293,8 +293,8 @@ public class AcsPersonServiceImpl extends AbstractAcsPassService implements AcsP imageStorePersonQueryParam.setRowsOfPage(1000); CloudwalkResult> imageStorePersonPageResult = this.imageStorePersonService.page(imageStorePersonQueryParam, context); - ImageStorePersonResult imageStoreResult = - ((CloudwalkPageAble)imageStorePersonPageResult.getData()).getDatas().iterator().next(); + CloudwalkPageAble imageStorePage = imageStorePersonPageResult.getData(); + ImageStorePersonResult imageStoreResult = imageStorePage.getDatas().iterator().next(); result.setComparePicture(imageStoreResult.getComparePicture()); result.setPersonName(imageStoreResult.getName()); result.setPersonId(imageStoreResult.getPersonId()); @@ -400,7 +400,7 @@ public class AcsPersonServiceImpl extends AbstractAcsPassService implements AcsP List personList = (List)personResult.getData(); if (personResult.isSuccess() && CollectionUtils.isNotEmpty(personList)) { personIcCardMap = (Map)personList.stream() - .collect(Collectors.toMap(CloudwalkBaseIdentify::getId, personResult -> personResult)); + .collect(Collectors.toMap(CloudwalkBaseIdentify::getId, pr -> pr)); } return personIcCardMap; } diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/impl/PersonRuleServiceImpl.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/impl/PersonRuleServiceImpl.java index 3f1bb4c2..eb8def1e 100644 --- a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/impl/PersonRuleServiceImpl.java +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/impl/PersonRuleServiceImpl.java @@ -116,9 +116,10 @@ public class PersonRuleServiceImpl extends AbstractAcsPassService implements Per CloudwalkResult> personPage = this.imageStorePersonService.page(queryParam, context); List personPageIds = new ArrayList<>(); - if (!CollectionUtils.isEmpty(((CloudwalkPageAble)personPage.getData()).getDatas())) { - for (ImageStorePersonResult personResult : ((CloudwalkPageAble)personPage.getData()).getDatas()) { - personPageIds.add(personResult.getPersonId()); + CloudwalkPageAble personPageData = personPage.getData(); + if (personPageData != null && !CollectionUtils.isEmpty(personPageData.getDatas())) { + for (ImageStorePersonResult imgPerson : personPageData.getDatas()) { + personPageIds.add(imgPerson.getPersonId()); } } List bindPersonIds = new ArrayList<>(); @@ -603,7 +604,7 @@ public class PersonRuleServiceImpl extends AbstractAcsPassService implements Per List personList = (List)personResult.getData(); if (personResult.isSuccess() && CollectionUtils.isNotEmpty(personList)) { personIcCardMap = (Map)personList.stream() - .collect(Collectors.toMap(CloudwalkBaseIdentify::getId, personResult -> personResult)); + .collect(Collectors.toMap(CloudwalkBaseIdentify::getId, pr -> pr)); } return personIcCardMap; } diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonAddVisitorParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonAddVisitorParam.java index 1333495f..31e01742 100644 --- a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonAddVisitorParam.java +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonAddVisitorParam.java @@ -2,6 +2,7 @@ package cn.cloudwalk.elevator.person.param; import java.io.Serializable; import java.util.List; +import java.util.Objects; public class AcsPersonAddVisitorParam implements Serializable { private static final long serialVersionUID = 7916140658162290825L; @@ -32,30 +33,19 @@ public class AcsPersonAddVisitorParam implements Serializable { } public boolean equals(Object o) { - if (o == this) + if (o == this) { return true; - if (!(o instanceof AcsPersonAddVisitorParam)) + } + if (!(o instanceof AcsPersonAddVisitorParam)) { return false; + } AcsPersonAddVisitorParam other = (AcsPersonAddVisitorParam)o; - if (!other.canEqual(this)) + if (!other.canEqual(this)) { return false; - Object this$visitorId = getVisitorId(), other$visitorId = other.getVisitorId(); - if ((this$visitorId == null) ? (other$visitorId != null) : !this$visitorId.equals(other$visitorId)) - return false; - Object this$personId = getPersonId(), other$personId = other.getPersonId(); - if ((this$personId == null) ? (other$personId != null) : !this$personId.equals(other$personId)) - return false; - Object this$begVisitorTime = getBegVisitorTime(), other$begVisitorTime = other.getBegVisitorTime(); - if ((this$begVisitorTime == null) ? (other$begVisitorTime != null) - : !this$begVisitorTime.equals(other$begVisitorTime)) - return false; - Object this$endVisitorTime = getEndVisitorTime(), other$endVisitorTime = other.getEndVisitorTime(); - if ((this$endVisitorTime == null) ? (other$endVisitorTime != null) - : !this$endVisitorTime.equals(other$endVisitorTime)) - return false; - Object this$floorIds = (Object)getFloorIds(), - other$floorIds = (Object)other.getFloorIds(); - return !((this$floorIds == null) ? (other$floorIds != null) : !this$floorIds.equals(other$floorIds)); + } + return Objects.equals(visitorId, other.visitorId) && Objects.equals(personId, other.personId) + && Objects.equals(begVisitorTime, other.begVisitorTime) && Objects.equals(endVisitorTime, other.endVisitorTime) + && Objects.equals(floorIds, other.floorIds); } protected boolean canEqual(Object other) { @@ -63,18 +53,7 @@ public class AcsPersonAddVisitorParam implements Serializable { } public int hashCode() { - int PRIME = 59; - result = 1; - Object $visitorId = getVisitorId(); - result = result * 59 + (($visitorId == null) ? 43 : $visitorId.hashCode()); - Object $personId = getPersonId(); - result = result * 59 + (($personId == null) ? 43 : $personId.hashCode()); - Object $begVisitorTime = getBegVisitorTime(); - result = result * 59 + (($begVisitorTime == null) ? 43 : $begVisitorTime.hashCode()); - Object $endVisitorTime = getEndVisitorTime(); - result = result * 59 + (($endVisitorTime == null) ? 43 : $endVisitorTime.hashCode()); - Object $floorIds = (Object)getFloorIds(); - return result * 59 + (($floorIds == null) ? 43 : $floorIds.hashCode()); + return Objects.hash(visitorId, personId, begVisitorTime, endVisitorTime, floorIds); } public String toString() { diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonQueryParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonQueryParam.java index c89f5f75..f88bc45e 100644 --- a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonQueryParam.java +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonQueryParam.java @@ -2,6 +2,7 @@ package cn.cloudwalk.elevator.person.param; import java.io.Serializable; import java.util.List; +import java.util.Objects; public class AcsPersonQueryParam implements Serializable { private static final long serialVersionUID = -3343979289939890513L; @@ -63,54 +64,23 @@ public class AcsPersonQueryParam implements Serializable { } public boolean equals(Object o) { - if (o == this) + if (o == this) { return true; - if (!(o instanceof AcsPersonQueryParam)) + } + if (!(o instanceof AcsPersonQueryParam)) { return false; + } AcsPersonQueryParam other = (AcsPersonQueryParam)o; - if (!other.canEqual(this)) + if (!other.canEqual(this)) { return false; - Object this$parentId = getParentId(), other$parentId = other.getParentId(); - if ((this$parentId == null) ? (other$parentId != null) : !this$parentId.equals(other$parentId)) - return false; - Object this$zoneId = getZoneId(), other$zoneId = other.getZoneId(); - if ((this$zoneId == null) ? (other$zoneId != null) : !this$zoneId.equals(other$zoneId)) - return false; - Object this$personName = getPersonName(), other$personName = other.getPersonName(); - if ((this$personName == null) ? (other$personName != null) : !this$personName.equals(other$personName)) - return false; - Object this$imageStoreId = getImageStoreId(), other$imageStoreId = other.getImageStoreId(); - if ((this$imageStoreId == null) ? (other$imageStoreId != null) : !this$imageStoreId.equals(other$imageStoreId)) - return false; - Object this$organizationIds = (Object)getOrganizationIds(), - other$organizationIds = (Object)other.getOrganizationIds(); - if ((this$organizationIds == null) ? (other$organizationIds != null) - : !this$organizationIds.equals(other$organizationIds)) - return false; - Object this$labelIds = (Object)getLabelIds(), - other$labelIds = (Object)other.getLabelIds(); - if ((this$labelIds == null) ? (other$labelIds != null) : !this$labelIds.equals(other$labelIds)) - return false; - Object this$personIds = (Object)getPersonIds(), - other$personIds = (Object)other.getPersonIds(); - if ((this$personIds == null) ? (other$personIds != null) : !this$personIds.equals(other$personIds)) - return false; - Object this$isElevator = getIsElevator(), other$isElevator = other.getIsElevator(); - if ((this$isElevator == null) ? (other$isElevator != null) : !this$isElevator.equals(other$isElevator)) - return false; - Object this$delPersonIds = (Object)getDelPersonIds(), - other$delPersonIds = (Object)other.getDelPersonIds(); - if ((this$delPersonIds == null) ? (other$delPersonIds != null) : !this$delPersonIds.equals(other$delPersonIds)) - return false; - Object this$elevatorLabelIds = (Object)getElevatorLabelIds(), - other$elevatorLabelIds = (Object)other.getElevatorLabelIds(); - if ((this$elevatorLabelIds == null) ? (other$elevatorLabelIds != null) - : !this$elevatorLabelIds.equals(other$elevatorLabelIds)) - return false; - Object this$elevatorOrganizationIds = (Object)getElevatorOrganizationIds(), - other$elevatorOrganizationIds = (Object)other.getElevatorOrganizationIds(); - return !((this$elevatorOrganizationIds == null) ? (other$elevatorOrganizationIds != null) - : !this$elevatorOrganizationIds.equals(other$elevatorOrganizationIds)); + } + return Objects.equals(parentId, other.parentId) && Objects.equals(zoneId, other.zoneId) + && Objects.equals(personName, other.personName) && Objects.equals(imageStoreId, other.imageStoreId) + && Objects.equals(organizationIds, other.organizationIds) && Objects.equals(labelIds, other.labelIds) + && Objects.equals(personIds, other.personIds) && Objects.equals(isElevator, other.isElevator) + && Objects.equals(delPersonIds, other.delPersonIds) + && Objects.equals(elevatorLabelIds, other.elevatorLabelIds) + && Objects.equals(elevatorOrganizationIds, other.elevatorOrganizationIds); } protected boolean canEqual(Object other) { @@ -118,30 +88,8 @@ public class AcsPersonQueryParam implements Serializable { } public int hashCode() { - int PRIME = 59; - result = 1; - Object $parentId = getParentId(); - result = result * 59 + (($parentId == null) ? 43 : $parentId.hashCode()); - Object $zoneId = getZoneId(); - result = result * 59 + (($zoneId == null) ? 43 : $zoneId.hashCode()); - Object $personName = getPersonName(); - result = result * 59 + (($personName == null) ? 43 : $personName.hashCode()); - Object $imageStoreId = getImageStoreId(); - result = result * 59 + (($imageStoreId == null) ? 43 : $imageStoreId.hashCode()); - Object $organizationIds = (Object)getOrganizationIds(); - result = result * 59 + (($organizationIds == null) ? 43 : $organizationIds.hashCode()); - Object $labelIds = (Object)getLabelIds(); - result = result * 59 + (($labelIds == null) ? 43 : $labelIds.hashCode()); - Object $personIds = (Object)getPersonIds(); - result = result * 59 + (($personIds == null) ? 43 : $personIds.hashCode()); - Object $isElevator = getIsElevator(); - result = result * 59 + (($isElevator == null) ? 43 : $isElevator.hashCode()); - Object $delPersonIds = (Object)getDelPersonIds(); - result = result * 59 + (($delPersonIds == null) ? 43 : $delPersonIds.hashCode()); - Object $elevatorLabelIds = (Object)getElevatorLabelIds(); - result = result * 59 + (($elevatorLabelIds == null) ? 43 : $elevatorLabelIds.hashCode()); - Object $elevatorOrganizationIds = (Object)getElevatorOrganizationIds(); - return result * 59 + (($elevatorOrganizationIds == null) ? 43 : $elevatorOrganizationIds.hashCode()); + return Objects.hash(parentId, zoneId, personName, imageStoreId, organizationIds, labelIds, personIds, + isElevator, delPersonIds, elevatorLabelIds, elevatorOrganizationIds); } public String toString() { diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/PersonDetailQueryParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/PersonDetailQueryParam.java index 00f20373..c0c8870a 100644 --- a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/PersonDetailQueryParam.java +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/PersonDetailQueryParam.java @@ -2,6 +2,7 @@ package cn.cloudwalk.elevator.person.param; import cn.cloudwalk.cloud.page.CloudwalkBasePageForm; import java.io.Serializable; +import java.util.Objects; public class PersonDetailQueryParam extends CloudwalkBasePageForm implements Serializable { private static final long serialVersionUID = -8830219133147503297L; @@ -27,24 +28,18 @@ public class PersonDetailQueryParam extends CloudwalkBasePageForm implements Ser } public boolean equals(Object o) { - if (o == this) + if (o == this) { return true; - if (!(o instanceof PersonDetailQueryParam)) + } + if (!(o instanceof PersonDetailQueryParam)) { return false; + } PersonDetailQueryParam other = (PersonDetailQueryParam)o; - if (!other.canEqual(this)) + if (!other.canEqual(this)) { return false; - Object this$parentId = getParentId(), other$parentId = other.getParentId(); - if ((this$parentId == null) ? (other$parentId != null) : !this$parentId.equals(other$parentId)) - return false; - Object this$zoneId = getZoneId(), other$zoneId = other.getZoneId(); - if ((this$zoneId == null) ? (other$zoneId != null) : !this$zoneId.equals(other$zoneId)) - return false; - Object this$ruleId = getRuleId(), other$ruleId = other.getRuleId(); - if ((this$ruleId == null) ? (other$ruleId != null) : !this$ruleId.equals(other$ruleId)) - return false; - Object this$personName = getPersonName(), other$personName = other.getPersonName(); - return !((this$personName == null) ? (other$personName != null) : !this$personName.equals(other$personName)); + } + return Objects.equals(parentId, other.parentId) && Objects.equals(zoneId, other.zoneId) + && Objects.equals(ruleId, other.ruleId) && Objects.equals(personName, other.personName); } protected boolean canEqual(Object other) { @@ -52,16 +47,7 @@ public class PersonDetailQueryParam extends CloudwalkBasePageForm implements Ser } public int hashCode() { - int PRIME = 59; - result = 1; - Object $parentId = getParentId(); - result = result * 59 + (($parentId == null) ? 43 : $parentId.hashCode()); - Object $zoneId = getZoneId(); - result = result * 59 + (($zoneId == null) ? 43 : $zoneId.hashCode()); - Object $ruleId = getRuleId(); - result = result * 59 + (($ruleId == null) ? 43 : $ruleId.hashCode()); - Object $personName = getPersonName(); - return result * 59 + (($personName == null) ? 43 : $personName.hashCode()); + return Objects.hash(parentId, zoneId, ruleId, personName); } public String toString() { diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/impl/AcsElevatorRecordServiceImpl.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/impl/AcsElevatorRecordServiceImpl.java index 0cfe4a1c..8ab38b2d 100644 --- a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/impl/AcsElevatorRecordServiceImpl.java +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/impl/AcsElevatorRecordServiceImpl.java @@ -192,7 +192,9 @@ public class AcsElevatorRecordServiceImpl extends AbstractAcsDeviceService imple this.personService.list(personQueryParam, cloudwalkContext); Map maps = new HashMap<>(); if (!CollectionUtils.isEmpty((Collection)personList.getData())) { - ((List)personList.getData()).forEach(person -> (PersonResult)maps.put(person.getId(), person)); + for (PersonResult person : (List)personList.getData()) { + maps.put(person.getId(), person); + } } for (AcsElevatorRecordResult result : acsList) { PersonResult person = maps.get(result.getPersonId()); diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/visitor/client/VisitorFeignClient.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/visitor/client/VisitorFeignClient.java index a897f05c..8043447b 100644 --- a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/visitor/client/VisitorFeignClient.java +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/visitor/client/VisitorFeignClient.java @@ -5,7 +5,7 @@ import cn.cloudwalk.cloud.result.CloudwalkResult; import cn.cloudwalk.elevator.visitor.fallback.VisitorFeignClientFallback; import cn.cloudwalk.elevator.visitor.param.VisitorRecordQueryParam; import cn.cloudwalk.elevator.visitor.result.VisitorQueryResult; -import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/client/ZoneFeignClient.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/client/ZoneFeignClient.java index 470edf1f..c7ef5ebc 100644 --- a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/client/ZoneFeignClient.java +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/client/ZoneFeignClient.java @@ -9,7 +9,7 @@ import cn.cloudwalk.elevator.zone.param.ZoneQueryParam; import cn.cloudwalk.elevator.zone.result.ZoneResult; import cn.cloudwalk.elevator.zone.result.ZoneTreeResult; import java.util.List; -import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsDeviceRestructureTaskForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsDeviceRestructureTaskForm.java index bdda263d..2a9d5e79 100644 --- a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsDeviceRestructureTaskForm.java +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsDeviceRestructureTaskForm.java @@ -1,6 +1,7 @@ package cn.cloudwalk.elevator.handler.device.form; import java.io.Serializable; +import java.util.Objects; public class AcsDeviceRestructureTaskForm implements Serializable { private static final long serialVersionUID = -7349123760464380004L; @@ -11,10 +12,7 @@ public class AcsDeviceRestructureTaskForm implements Serializable { } public int hashCode() { - int PRIME = 59; - result = 1; - Object $taskId = getTaskId(); - return result * 59 + (($taskId == null) ? 43 : $taskId.hashCode()); + return Objects.hash(taskId); } protected boolean canEqual(Object other) { @@ -22,15 +20,17 @@ public class AcsDeviceRestructureTaskForm implements Serializable { } public boolean equals(Object o) { - if (o == this) + if (o == this) { return true; - if (!(o instanceof AcsDeviceRestructureTaskForm)) + } + if (!(o instanceof AcsDeviceRestructureTaskForm)) { return false; + } AcsDeviceRestructureTaskForm other = (AcsDeviceRestructureTaskForm)o; - if (!other.canEqual(this)) + if (!other.canEqual(this)) { return false; - Object this$taskId = getTaskId(), other$taskId = other.getTaskId(); - return !((this$taskId == null) ? (other$taskId != null) : !this$taskId.equals(other$taskId)); + } + return Objects.equals(taskId, other.taskId); } public void setTaskId(String taskId) { diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsRestructureBindingForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsRestructureBindingForm.java index d0ff1f30..ec022c86 100644 --- a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsRestructureBindingForm.java +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsRestructureBindingForm.java @@ -2,6 +2,7 @@ package cn.cloudwalk.elevator.handler.device.form; import java.io.Serializable; import java.util.List; +import java.util.Objects; public class AcsRestructureBindingForm implements Serializable { private String parentId; @@ -41,33 +42,20 @@ public class AcsRestructureBindingForm implements Serializable { } public boolean equals(Object o) { - if (o == this) + if (o == this) { return true; - if (!(o instanceof AcsRestructureBindingForm)) + } + if (!(o instanceof AcsRestructureBindingForm)) { return false; + } AcsRestructureBindingForm other = (AcsRestructureBindingForm)o; - if (!other.canEqual(this)) + if (!other.canEqual(this)) { return false; - Object this$parentId = getParentId(), other$parentId = other.getParentId(); - if ((this$parentId == null) ? (other$parentId != null) : !this$parentId.equals(other$parentId)) - return false; - Object this$orgId = getOrgId(), other$orgId = other.getOrgId(); - if ((this$orgId == null) ? (other$orgId != null) : !this$orgId.equals(other$orgId)) - return false; - Object this$orgName = getOrgName(), other$orgName = other.getOrgName(); - if ((this$orgName == null) ? (other$orgName != null) : !this$orgName.equals(other$orgName)) - return false; - Object this$labelId = getLabelId(), other$labelId = other.getLabelId(); - if ((this$labelId == null) ? (other$labelId != null) : !this$labelId.equals(other$labelId)) - return false; - Object this$labelName = getLabelName(), other$labelName = other.getLabelName(); - if ((this$labelName == null) ? (other$labelName != null) : !this$labelName.equals(other$labelName)) - return false; - Object this$personId = getPersonId(), other$personId = other.getPersonId(); - if ((this$personId == null) ? (other$personId != null) : !this$personId.equals(other$personId)) - return false; - Object this$zoneIds = (Object)getZoneIds(), other$zoneIds = (Object)other.getZoneIds(); - return !((this$zoneIds == null) ? (other$zoneIds != null) : !this$zoneIds.equals(other$zoneIds)); + } + return Objects.equals(parentId, other.parentId) && Objects.equals(orgId, other.orgId) + && Objects.equals(orgName, other.orgName) && Objects.equals(labelId, other.labelId) + && Objects.equals(labelName, other.labelName) && Objects.equals(personId, other.personId) + && Objects.equals(zoneIds, other.zoneIds); } protected boolean canEqual(Object other) { @@ -75,22 +63,7 @@ public class AcsRestructureBindingForm implements Serializable { } public int hashCode() { - int PRIME = 59; - result = 1; - Object $parentId = getParentId(); - result = result * 59 + (($parentId == null) ? 43 : $parentId.hashCode()); - Object $orgId = getOrgId(); - result = result * 59 + (($orgId == null) ? 43 : $orgId.hashCode()); - Object $orgName = getOrgName(); - result = result * 59 + (($orgName == null) ? 43 : $orgName.hashCode()); - Object $labelId = getLabelId(); - result = result * 59 + (($labelId == null) ? 43 : $labelId.hashCode()); - Object $labelName = getLabelName(); - result = result * 59 + (($labelName == null) ? 43 : $labelName.hashCode()); - Object $personId = getPersonId(); - result = result * 59 + (($personId == null) ? 43 : $personId.hashCode()); - Object $zoneIds = (Object)getZoneIds(); - return result * 59 + (($zoneIds == null) ? 43 : $zoneIds.hashCode()); + return Objects.hash(parentId, orgId, orgName, labelId, labelName, personId, zoneIds); } public String toString() { diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsRestructureQueryForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsRestructureQueryForm.java index 0ecf4d7c..405d952d 100644 --- a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsRestructureQueryForm.java +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsRestructureQueryForm.java @@ -2,6 +2,7 @@ package cn.cloudwalk.elevator.handler.device.form; import java.io.Serializable; import java.util.List; +import java.util.Objects; public class AcsRestructureQueryForm implements Serializable { private String orgId; @@ -36,31 +37,19 @@ public class AcsRestructureQueryForm implements Serializable { } public boolean equals(Object o) { - if (o == this) + if (o == this) { return true; - if (!(o instanceof AcsRestructureQueryForm)) + } + if (!(o instanceof AcsRestructureQueryForm)) { return false; + } AcsRestructureQueryForm other = (AcsRestructureQueryForm)o; - if (!other.canEqual(this)) + if (!other.canEqual(this)) { return false; - Object this$orgId = getOrgId(), other$orgId = other.getOrgId(); - if ((this$orgId == null) ? (other$orgId != null) : !this$orgId.equals(other$orgId)) - return false; - Object this$labelId = getLabelId(), other$labelId = other.getLabelId(); - if ((this$labelId == null) ? (other$labelId != null) : !this$labelId.equals(other$labelId)) - return false; - Object this$labelIds = (Object)getLabelIds(), - other$labelIds = (Object)other.getLabelIds(); - if ((this$labelIds == null) ? (other$labelIds != null) : !this$labelIds.equals(other$labelIds)) - return false; - Object this$personId = getPersonId(), other$personId = other.getPersonId(); - if ((this$personId == null) ? (other$personId != null) : !this$personId.equals(other$personId)) - return false; - Object this$zoneId = getZoneId(), other$zoneId = other.getZoneId(); - if ((this$zoneId == null) ? (other$zoneId != null) : !this$zoneId.equals(other$zoneId)) - return false; - Object this$businessId = getBusinessId(), other$businessId = other.getBusinessId(); - return !((this$businessId == null) ? (other$businessId != null) : !this$businessId.equals(other$businessId)); + } + return Objects.equals(orgId, other.orgId) && Objects.equals(labelId, other.labelId) + && Objects.equals(labelIds, other.labelIds) && Objects.equals(personId, other.personId) + && Objects.equals(zoneId, other.zoneId) && Objects.equals(businessId, other.businessId); } protected boolean canEqual(Object other) { @@ -68,20 +57,7 @@ public class AcsRestructureQueryForm implements Serializable { } public int hashCode() { - int PRIME = 59; - result = 1; - Object $orgId = getOrgId(); - result = result * 59 + (($orgId == null) ? 43 : $orgId.hashCode()); - Object $labelId = getLabelId(); - result = result * 59 + (($labelId == null) ? 43 : $labelId.hashCode()); - Object $labelIds = (Object)getLabelIds(); - result = result * 59 + (($labelIds == null) ? 43 : $labelIds.hashCode()); - Object $personId = getPersonId(); - result = result * 59 + (($personId == null) ? 43 : $personId.hashCode()); - Object $zoneId = getZoneId(); - result = result * 59 + (($zoneId == null) ? 43 : $zoneId.hashCode()); - Object $businessId = getBusinessId(); - return result * 59 + (($businessId == null) ? 43 : $businessId.hashCode()); + return Objects.hash(orgId, labelId, labelIds, personId, zoneId, businessId); } public String toString() { diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonAddVisitorForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonAddVisitorForm.java index 93ec74b0..2c37b326 100644 --- a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonAddVisitorForm.java +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonAddVisitorForm.java @@ -2,6 +2,7 @@ package cn.cloudwalk.elevator.person.form; import java.io.Serializable; import java.util.List; +import java.util.Objects; public class AcsPersonAddVisitorForm implements Serializable { private static final long serialVersionUID = 7916140658162290825L; @@ -32,30 +33,19 @@ public class AcsPersonAddVisitorForm implements Serializable { } public boolean equals(Object o) { - if (o == this) + if (o == this) { return true; - if (!(o instanceof AcsPersonAddVisitorForm)) + } + if (!(o instanceof AcsPersonAddVisitorForm)) { return false; + } AcsPersonAddVisitorForm other = (AcsPersonAddVisitorForm)o; - if (!other.canEqual(this)) + if (!other.canEqual(this)) { return false; - Object this$visitorId = getVisitorId(), other$visitorId = other.getVisitorId(); - if ((this$visitorId == null) ? (other$visitorId != null) : !this$visitorId.equals(other$visitorId)) - return false; - Object this$personId = getPersonId(), other$personId = other.getPersonId(); - if ((this$personId == null) ? (other$personId != null) : !this$personId.equals(other$personId)) - return false; - Object this$begVisitorTime = getBegVisitorTime(), other$begVisitorTime = other.getBegVisitorTime(); - if ((this$begVisitorTime == null) ? (other$begVisitorTime != null) - : !this$begVisitorTime.equals(other$begVisitorTime)) - return false; - Object this$endVisitorTime = getEndVisitorTime(), other$endVisitorTime = other.getEndVisitorTime(); - if ((this$endVisitorTime == null) ? (other$endVisitorTime != null) - : !this$endVisitorTime.equals(other$endVisitorTime)) - return false; - Object this$floorIds = (Object)getFloorIds(), - other$floorIds = (Object)other.getFloorIds(); - return !((this$floorIds == null) ? (other$floorIds != null) : !this$floorIds.equals(other$floorIds)); + } + return Objects.equals(visitorId, other.visitorId) && Objects.equals(personId, other.personId) + && Objects.equals(begVisitorTime, other.begVisitorTime) && Objects.equals(endVisitorTime, other.endVisitorTime) + && Objects.equals(floorIds, other.floorIds); } protected boolean canEqual(Object other) { @@ -63,18 +53,7 @@ public class AcsPersonAddVisitorForm implements Serializable { } public int hashCode() { - int PRIME = 59; - result = 1; - Object $visitorId = getVisitorId(); - result = result * 59 + (($visitorId == null) ? 43 : $visitorId.hashCode()); - Object $personId = getPersonId(); - result = result * 59 + (($personId == null) ? 43 : $personId.hashCode()); - Object $begVisitorTime = getBegVisitorTime(); - result = result * 59 + (($begVisitorTime == null) ? 43 : $begVisitorTime.hashCode()); - Object $endVisitorTime = getEndVisitorTime(); - result = result * 59 + (($endVisitorTime == null) ? 43 : $endVisitorTime.hashCode()); - Object $floorIds = (Object)getFloorIds(); - return result * 59 + (($floorIds == null) ? 43 : $floorIds.hashCode()); + return Objects.hash(visitorId, personId, begVisitorTime, endVisitorTime, floorIds); } public String toString() { diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonQueryForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonQueryForm.java index 9950b3ab..0cf0c98b 100644 --- a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonQueryForm.java +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonQueryForm.java @@ -2,6 +2,7 @@ package cn.cloudwalk.elevator.person.form; import java.io.Serializable; import java.util.List; +import java.util.Objects; public class AcsPersonQueryForm implements Serializable { private static final long serialVersionUID = -8830219133147503297L; @@ -40,36 +41,20 @@ public class AcsPersonQueryForm implements Serializable { } public boolean equals(Object o) { - if (o == this) + if (o == this) { return true; - if (!(o instanceof AcsPersonQueryForm)) + } + if (!(o instanceof AcsPersonQueryForm)) { return false; + } AcsPersonQueryForm other = (AcsPersonQueryForm)o; - if (!other.canEqual(this)) + if (!other.canEqual(this)) { return false; - Object this$parentId = getParentId(), other$parentId = other.getParentId(); - if ((this$parentId == null) ? (other$parentId != null) : !this$parentId.equals(other$parentId)) - return false; - Object this$zoneId = getZoneId(), other$zoneId = other.getZoneId(); - if ((this$zoneId == null) ? (other$zoneId != null) : !this$zoneId.equals(other$zoneId)) - return false; - Object this$personName = getPersonName(), other$personName = other.getPersonName(); - if ((this$personName == null) ? (other$personName != null) : !this$personName.equals(other$personName)) - return false; - Object this$organizationIds = (Object)getOrganizationIds(), - other$organizationIds = (Object)other.getOrganizationIds(); - if ((this$organizationIds == null) ? (other$organizationIds != null) - : !this$organizationIds.equals(other$organizationIds)) - return false; - Object this$labelIds = (Object)getLabelIds(), - other$labelIds = (Object)other.getLabelIds(); - if ((this$labelIds == null) ? (other$labelIds != null) : !this$labelIds.equals(other$labelIds)) - return false; - Object this$pageSize = getPageSize(), other$pageSize = other.getPageSize(); - if ((this$pageSize == null) ? (other$pageSize != null) : !this$pageSize.equals(other$pageSize)) - return false; - Object this$pageNo = getPageNo(), other$pageNo = other.getPageNo(); - return !((this$pageNo == null) ? (other$pageNo != null) : !this$pageNo.equals(other$pageNo)); + } + return Objects.equals(parentId, other.parentId) && Objects.equals(zoneId, other.zoneId) + && Objects.equals(personName, other.personName) && Objects.equals(organizationIds, other.organizationIds) + && Objects.equals(labelIds, other.labelIds) && Objects.equals(pageSize, other.pageSize) + && Objects.equals(pageNo, other.pageNo); } protected boolean canEqual(Object other) { @@ -77,22 +62,7 @@ public class AcsPersonQueryForm implements Serializable { } public int hashCode() { - int PRIME = 59; - result = 1; - Object $parentId = getParentId(); - result = result * 59 + (($parentId == null) ? 43 : $parentId.hashCode()); - Object $zoneId = getZoneId(); - result = result * 59 + (($zoneId == null) ? 43 : $zoneId.hashCode()); - Object $personName = getPersonName(); - result = result * 59 + (($personName == null) ? 43 : $personName.hashCode()); - Object $organizationIds = (Object)getOrganizationIds(); - result = result * 59 + (($organizationIds == null) ? 43 : $organizationIds.hashCode()); - Object $labelIds = (Object)getLabelIds(); - result = result * 59 + (($labelIds == null) ? 43 : $labelIds.hashCode()); - Object $pageSize = getPageSize(); - result = result * 59 + (($pageSize == null) ? 43 : $pageSize.hashCode()); - Object $pageNo = getPageNo(); - return result * 59 + (($pageNo == null) ? 43 : $pageNo.hashCode()); + return Objects.hash(parentId, zoneId, personName, organizationIds, labelIds, pageSize, pageNo); } public String toString() { diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/PersonDetailQueryForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/PersonDetailQueryForm.java index eb8be386..29fda5d1 100644 --- a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/PersonDetailQueryForm.java +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/PersonDetailQueryForm.java @@ -2,6 +2,7 @@ package cn.cloudwalk.elevator.person.form; import cn.cloudwalk.cloud.page.CloudwalkBasePageForm; import java.io.Serializable; +import java.util.Objects; public class PersonDetailQueryForm extends CloudwalkBasePageForm implements Serializable { private static final long serialVersionUID = -8830219133147503297L; @@ -27,24 +28,18 @@ public class PersonDetailQueryForm extends CloudwalkBasePageForm implements Seri } public boolean equals(Object o) { - if (o == this) + if (o == this) { return true; - if (!(o instanceof PersonDetailQueryForm)) + } + if (!(o instanceof PersonDetailQueryForm)) { return false; + } PersonDetailQueryForm other = (PersonDetailQueryForm)o; - if (!other.canEqual(this)) + if (!other.canEqual(this)) { return false; - Object this$parentId = getParentId(), other$parentId = other.getParentId(); - if ((this$parentId == null) ? (other$parentId != null) : !this$parentId.equals(other$parentId)) - return false; - Object this$zoneId = getZoneId(), other$zoneId = other.getZoneId(); - if ((this$zoneId == null) ? (other$zoneId != null) : !this$zoneId.equals(other$zoneId)) - return false; - Object this$ruleId = getRuleId(), other$ruleId = other.getRuleId(); - if ((this$ruleId == null) ? (other$ruleId != null) : !this$ruleId.equals(other$ruleId)) - return false; - Object this$personName = getPersonName(), other$personName = other.getPersonName(); - return !((this$personName == null) ? (other$personName != null) : !this$personName.equals(other$personName)); + } + return Objects.equals(parentId, other.parentId) && Objects.equals(zoneId, other.zoneId) + && Objects.equals(ruleId, other.ruleId) && Objects.equals(personName, other.personName); } protected boolean canEqual(Object other) { @@ -52,16 +47,7 @@ public class PersonDetailQueryForm extends CloudwalkBasePageForm implements Seri } public int hashCode() { - int PRIME = 59; - result = 1; - Object $parentId = getParentId(); - result = result * 59 + (($parentId == null) ? 43 : $parentId.hashCode()); - Object $zoneId = getZoneId(); - result = result * 59 + (($zoneId == null) ? 43 : $zoneId.hashCode()); - Object $ruleId = getRuleId(); - result = result * 59 + (($ruleId == null) ? 43 : $ruleId.hashCode()); - Object $personName = getPersonName(); - return result * 59 + (($personName == null) ? 43 : $personName.hashCode()); + return Objects.hash(parentId, zoneId, ruleId, personName); } public String toString() {