临时提交

This commit is contained in:
panlinlin
2024-08-17 07:01:40 +08:00
parent aeb3cd6a22
commit 635458d19a
4 changed files with 65 additions and 21 deletions

View File

@@ -1,6 +1,7 @@
package com.genersoft.iot.vmp.gb28181.bean;
import com.genersoft.iot.vmp.common.CivilCodePo;
import com.genersoft.iot.vmp.jt1078.proc.request.Re;
import com.genersoft.iot.vmp.utils.CivilCodeUtil;
import com.genersoft.iot.vmp.utils.DateUtil;
import io.swagger.v3.oas.annotations.media.Schema;
@@ -88,4 +89,29 @@ public class Region implements Comparable<Region>{
public int compareTo(@NotNull Region region) {
return Integer.compare(Integer.parseInt(this.deviceId), Integer.parseInt(region.getDeviceId()));
}
@Override
public boolean equals(Object obj) {
if (obj == null)
return false;
if (this == obj)
return true;
if (obj instanceof Region) {
Region region = (Region) obj;
// 比较每个属性的值一致时才返回true
if (region.getId() == this.id) {
return true;
}
}
return false;
}
/**
* 重写hashcode方法返回的hashCode一样才再去比较每个属性的值
*/
@Override
public int hashCode() {
return id;
}
}