10 changed files with 273 additions and 9 deletions
-
5APIService/pom.xml
-
17APIService/src/main/java/com/storeroom/controller/TestApiServiceController.java
-
15APIService/src/main/java/com/storeroom/service/ApiService.java
-
82APIService/src/main/java/com/storeroom/service/dto/GetCurAlarmDto.java
-
40APIService/src/main/java/com/storeroom/service/dto/RealTimeDataDto.java
-
91APIService/src/main/java/com/storeroom/service/impl/ApiServiceImpl.java
-
2common/src/main/java/com/storeroom/utils/FastjsonUtils.java
-
19common/src/main/java/com/storeroom/utils/HttpUtils.java
-
3pom.xml
-
8storeroom/src/main/java/com/storeroom/modules/device/service/impl/DeviceImpl.java
@ -0,0 +1,82 @@ |
|||
package com.storeroom.service.dto; |
|||
|
|||
|
|||
import lombok.Getter; |
|||
import lombok.Setter; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.sql.Timestamp; |
|||
import java.util.Objects; |
|||
|
|||
@Getter |
|||
@Setter |
|||
public class GetCurAlarmDto implements Serializable { |
|||
|
|||
/** |
|||
* 告警id |
|||
*/ |
|||
private String event_id; |
|||
|
|||
|
|||
/** |
|||
* 告警名称 |
|||
*/ |
|||
private String event_name; |
|||
|
|||
/** |
|||
* 设备ID |
|||
*/ |
|||
private String device_id; |
|||
|
|||
|
|||
/** |
|||
* 设备名称 |
|||
*/ |
|||
private String device_name; |
|||
|
|||
/** |
|||
* 分类名称 |
|||
*/ |
|||
private String category_name; |
|||
|
|||
/** |
|||
* 区域名称 |
|||
*/ |
|||
private String area_name; |
|||
|
|||
/** |
|||
* 告警等级 |
|||
*/ |
|||
private String event_level_name; |
|||
|
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private String alarm_time; |
|||
|
|||
/** |
|||
* 告警值 |
|||
*/ |
|||
private String alarm_value; |
|||
|
|||
|
|||
/** |
|||
* 告警值描述 |
|||
*/ |
|||
private String alarm_value_descript; |
|||
|
|||
@Override |
|||
public boolean equals(Object o) { |
|||
if (this == o) return true; |
|||
if (o == null || getClass() != o.getClass()) return false; |
|||
GetCurAlarmDto that = (GetCurAlarmDto) o; |
|||
return Objects.equals(event_id, that.event_id) && Objects.equals(event_name, that.event_name) && Objects.equals(device_id, that.device_id) && Objects.equals(device_name, that.device_name); |
|||
} |
|||
|
|||
@Override |
|||
public int hashCode() { |
|||
return Objects.hash(event_id, event_name, device_id, device_name); |
|||
} |
|||
} |
@ -0,0 +1,40 @@ |
|||
package com.storeroom.service.dto; |
|||
|
|||
|
|||
import lombok.Getter; |
|||
import lombok.Setter; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Objects; |
|||
|
|||
@Getter |
|||
@Setter |
|||
public class RealTimeDataDto implements Serializable { |
|||
|
|||
private String property_id; |
|||
|
|||
private String property_name; |
|||
|
|||
private String device_id; |
|||
|
|||
private String curvalue; |
|||
|
|||
private String value_descript; |
|||
|
|||
private String unit; |
|||
|
|||
private String curstatus; |
|||
|
|||
@Override |
|||
public boolean equals(Object o) { |
|||
if (this == o) return true; |
|||
if (o == null || getClass() != o.getClass()) return false; |
|||
RealTimeDataDto that = (RealTimeDataDto) o; |
|||
return Objects.equals(property_id, that.property_id) && Objects.equals(property_name, that.property_name) && Objects.equals(device_id, that.device_id) && Objects.equals(curvalue, that.curvalue) && Objects.equals(value_descript, that.value_descript) && Objects.equals(unit, that.unit) && Objects.equals(curstatus, that.curstatus); |
|||
} |
|||
|
|||
@Override |
|||
public int hashCode() { |
|||
return Objects.hash(property_id, property_name, device_id, curvalue, value_descript, unit, curstatus); |
|||
} |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue