|
@@ -3,6 +3,7 @@ package com.zcxk.rmcp.api.dto.readmeter;
|
|
|
import cn.hutool.core.util.NumberUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
|
+import com.zcxk.core.utils.NumberDistri;
|
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
|
import lombok.Data;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -106,11 +107,22 @@ public class WaterMeterDto implements Comparable<WaterMeterDto> {
|
|
|
|
|
|
@Override
|
|
|
public int compareTo(WaterMeterDto dto) {
|
|
|
- if(!StrUtil.equals(tenantId,dto.tenantId))return 0;
|
|
|
- if(!NumberUtil.equals(categoryId,dto.categoryId))return 0;
|
|
|
- if(!NumberUtil.equals(companyOrgId,dto.companyOrgId))return 0;
|
|
|
- if(!NumberUtil.equals(deptOrgId,dto.deptOrgId))return 0;
|
|
|
-
|
|
|
- return 1;
|
|
|
+ if(!StrUtil.equals(tenantId,dto.tenantId))return -1;
|
|
|
+ if(!NumberDistri.integerEquals(categoryId,dto.categoryId))return -1;
|
|
|
+ if(!NumberDistri.integerEquals(companyOrgId,dto.companyOrgId))return -1;
|
|
|
+ if(!StrUtil.equals(companyName,dto.companyName))return -1;
|
|
|
+ if(!NumberDistri.integerEquals(deptOrgId,dto.deptOrgId))return -1;
|
|
|
+ if(!StrUtil.equals(deptName,dto.deptName))return -1;
|
|
|
+ if(!NumberDistri.integerEquals(communityId,dto.communityId))return -1;
|
|
|
+ if(!StrUtil.equals(communityName,dto.communityName))return -1;
|
|
|
+ if(!StrUtil.equals(deviceNo,dto.deviceNo))return -1;
|
|
|
+ if(!StrUtil.equals(meterNo,dto.meterNo))return -1;
|
|
|
+ if(!StrUtil.equals(fileNo,dto.fileNo))return -1;
|
|
|
+ if(!StrUtil.equals(address,dto.address))return -1;
|
|
|
+ if(!NumberDistri.integerEquals(productId,dto.productId))return -1;
|
|
|
+ if(!StrUtil.equals(productName,dto.productName))return -1;
|
|
|
+ if(!StrUtil.equals(productModel,dto.productModel))return -1;
|
|
|
+ if(!StrUtil.equals(manufacturerName,dto.manufacturerName))return -1;
|
|
|
+ return 0;
|
|
|
}
|
|
|
}
|