package com.ycl.platform.domain.result.UY;
|
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.ycl.platform.domain.result.BaseResult;
|
import lombok.Data;
|
import org.springframework.data.mongodb.core.index.TextIndexed;
|
import org.springframework.data.mongodb.core.mapping.Document;
|
|
import java.util.Date;
|
import java.util.Objects;
|
|
/**
|
* 录像可用性
|
*
|
* @author gonghl
|
*/
|
@Data
|
@Document(collection = "uy_record_meta_d_sum")
|
public class RecordMetaDSumResult extends BaseResult {
|
|
/**
|
* 行政区域名称
|
*/
|
@TextIndexed
|
private String arealayername;
|
|
/**
|
* 行政区域ID
|
*/
|
private String arealayerno;
|
|
/**
|
* 创建时间,格式为日期时间字符串
|
*/
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
private Date createTime;
|
|
/**
|
* 摄像机ID
|
*/
|
private String deviceId;
|
|
/**
|
* 摄像机名称
|
*/
|
@TextIndexed
|
private String deviceName;
|
|
/**
|
* 主键ID
|
*/
|
private String id;
|
|
/**
|
* 缺失时长,数值类型为双精度浮点数
|
*/
|
private Double missDuration;
|
|
/**
|
* 国标平台ID
|
*/
|
@TextIndexed
|
private String platId;
|
|
/**
|
* 录像时长,数值类型为双精度浮点数
|
*/
|
private Double recordDuration;
|
|
/**
|
* 录像完整状态,1:完整,0:间歇,-1:异常
|
*/
|
private Integer recordStatus;
|
|
/**
|
* 录像完整状态,1:完整,0:间歇,-1:异常
|
*/
|
private String recordStatusText;
|
|
/**
|
* 统计时间,格式为日期字符串
|
*/
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
private Date statTime;
|
|
/**
|
* 租户ID
|
*/
|
private String tenantId;
|
|
public String getRecordStatusText() {
|
if (Objects.equals(recordStatus, 1)) {
|
recordStatusText = "完整";
|
}
|
if (Objects.equals(recordStatus, 0)) {
|
recordStatusText = "间歇";
|
}
|
if (Objects.equals(recordStatus, -1)) {
|
recordStatusText = "异常";
|
}
|
return recordStatusText;
|
}
|
}
|