package com.ycl.platform.domain.result.HK;
|
|
import com.ycl.platform.domain.result.BaseResult;
|
import com.ycl.platform.domain.vo.DataCenter.SnapClockVO;
|
import lombok.Data;
|
import org.springframework.beans.BeanUtils;
|
import org.springframework.data.mongodb.core.index.TextIndexed;
|
import org.springframework.data.mongodb.core.mapping.Document;
|
|
/**
|
* 车辆设备全检指标监测结果:车辆(车辆卡口设备时钟准确性、)
|
*
|
* @author gonghl
|
*/
|
@Data
|
@Document(collection = "hk_vehicle_device_inspection")
|
public class VehicleDeviceInspectionResult extends BaseResult {
|
|
/**
|
* 设备编号,dataType为1时表示卡口内码,dataType为11时表示采集设备内码
|
*/
|
private String externalIndexCode;
|
|
/**
|
* 设备名称
|
*/
|
private String deviceName;
|
|
|
/**
|
* 卡口内码或采集设备内码
|
*/
|
private String indexCode;
|
|
/**
|
* 组织编号
|
*/
|
private String orgCode;
|
|
/**
|
* 组织名称
|
*/
|
private String orgName;
|
|
/**
|
* 当日接收到的当日抓拍量
|
*/
|
private Integer dataCount;
|
|
/**
|
* 当日接收到的白天抓拍量
|
*/
|
private Integer daySnapCount;
|
|
/**
|
* 当日接收到的非当日抓拍量
|
*/
|
private Integer noTodayCount;
|
|
/**
|
* 持续无数据天数
|
*/
|
private Integer continueNoDataCount;
|
|
/**
|
* 抓拍数据量监测结果,1:正常 2:无数据 4:数据量少
|
*/
|
private Integer snapResult;
|
|
/**
|
* 抓拍数据量监测结果,1:正常 2:无数据 4:数据量少
|
*/
|
private String snapResultText;
|
|
// 以下为嵌套对象的字段
|
|
/**
|
* 过车时钟准确性
|
*/
|
private SnapClock snapClock;
|
|
/**
|
* 过车上传及时性
|
*/
|
private SnapTimely snapTimely;
|
|
/**
|
* 过车数据唯一性相关
|
*/
|
private SnapUnique snapUnique;
|
|
/**
|
* 车辆车牌合规性相关
|
*/
|
private SnapPlate snapPlate;
|
|
/**
|
* 车辆属性完整性相关数量
|
*/
|
private Integrity integrity;
|
|
public String getSnapResultText() {
|
if (snapResult == 1) {
|
snapResultText = "正常";
|
}
|
if (snapResult == 2) {
|
snapResultText = "无数据";
|
}
|
if (snapResult == 4) {
|
snapResultText = "数据量少";
|
}
|
return snapResultText;
|
}
|
|
// 内嵌对象定义
|
|
@Data
|
public static class SnapClock {
|
/**
|
* 时钟准确率:1 == 100%
|
*/
|
private Float clockPercent;
|
|
/**
|
* 当日接收的当日抓拍数据时钟准确数据量
|
*/
|
private Integer todayClockCount;
|
|
/**
|
* 当日接收的当日抓拍数据时钟准确性判定结果:1是合格,0是不合格
|
*/
|
private Integer todayClockResult;
|
|
/**
|
* 当日接收的当日抓拍数据时钟准确性判定结果:1是合格,0是不合格
|
*/
|
private String todayClockResultText;
|
|
/**
|
* 当日接收的全部抓拍数据时钟准确数据量
|
*/
|
private Integer allClockCount;
|
|
/**
|
* 当日接收的全部抓拍数据时钟准确性判定结果:1是合格,0是不合格
|
*/
|
private Integer allClockResult;
|
|
/**
|
* 当日接收的全部抓拍数据时钟准确性判定结果:1是合格,0是不合格
|
*/
|
private String allClockResultText;
|
|
public String getTodayClockResultText() {
|
if (todayClockResult == 1) {
|
todayClockResultText = "合格";
|
}
|
if (todayClockResult == 0) {
|
todayClockResultText = "不合格";
|
}
|
return todayClockResultText;
|
}
|
|
public String getAllClockResultText() {
|
if (allClockResult == 1) {
|
allClockResultText = "合格";
|
}
|
if (allClockResult == 0) {
|
allClockResultText = "不合格";
|
}
|
return allClockResultText;
|
}
|
}
|
|
@Data
|
public static class SnapTimely {
|
/**
|
* 及时率 1 == 100%
|
*/
|
private Float timelyPercent;
|
|
/**
|
* 当日接收的当日抓拍数据延迟量
|
*/
|
private Integer todayDelayCount;
|
|
/**
|
* 当日接收的当日抓拍数据延迟30s以上数据量
|
*/
|
private Integer todayDelayCount2;
|
|
/**
|
* 当日接收的当日抓拍数据延迟1m以上数据量
|
*/
|
private Integer todayDelayCount3;
|
|
/**
|
* 当日接收的当日抓拍数据延迟5m以上数据量
|
*/
|
private Integer todayDelayCount4;
|
|
/**
|
* 当日接收的当日抓拍数据数据及时性判定结果:1是合格,0是不合格
|
*/
|
private Integer todayTimelyResult;
|
|
/**
|
* 当日接收的当日抓拍数据数据及时性判定结果:1是合格,0是不合格
|
*/
|
private String todayTimelyResultText;
|
|
/**
|
* 当日接收的全部数据延迟量
|
*/
|
private Integer allDelayCount;
|
|
/**
|
* 当日接收的全部数据中延迟30s以上数据量
|
*/
|
private Integer allDelayCount2;
|
|
/**
|
* 当日接收的全部数据中延迟1m以上数据量
|
*/
|
private Integer allDelayCount3;
|
|
/**
|
* 当日接收的全部数据中延迟5m以上数据量
|
*/
|
private Integer allDelayCount4;
|
|
/**
|
* 当日接收的全部数据及时性判定结果:1是合格,0是不合格
|
*/
|
private Integer allTimelyResult;
|
|
/**
|
* 当日接收的全部数据及时性判定结果:1是合格,0是不合格
|
*/
|
private String allTimelyResultText;
|
|
public String getTodayTimelyResultText() {
|
if (todayTimelyResult == 1) {
|
todayTimelyResultText = "合格";
|
}
|
if (todayTimelyResult == 0) {
|
todayTimelyResultText = "不合格";
|
}
|
return todayTimelyResultText;
|
}
|
|
public String getAllTimelyResultText() {
|
if (allTimelyResult == 1) {
|
allTimelyResultText = "合格";
|
}
|
if (allTimelyResult == 0) {
|
allTimelyResultText = "不合格";
|
}
|
return allTimelyResultText;
|
}
|
}
|
|
@Data
|
public static class SnapUnique {
|
/**
|
* 不唯一数据量:不唯一数据重复量
|
*/
|
private Integer nouniqueData;
|
|
/**
|
* 不唯一数据量
|
*/
|
private Integer nouniqueCount;
|
}
|
|
@Data
|
public static class SnapPlate {
|
/**
|
* 车牌未识别量
|
*/
|
private Integer noNumberCount;
|
|
/**
|
* 白天未识别量
|
*/
|
private Integer dayNoNumberCount;
|
|
/**
|
* 车牌识别异常:结果类型 1:正常 2:识别率低 3:昼夜识别率突变
|
*/
|
private Integer recgResult;
|
|
/**
|
* 车牌识别异常:结果类型 1:正常 2:识别率低 3:昼夜识别率突变
|
*/
|
private String recgResultText;
|
|
public String getRecgResultText() {
|
if (recgResult == 1) {
|
recgResultText = "正常";
|
}
|
if (recgResult == 2) {
|
recgResultText = "识别率低";
|
}
|
if (recgResult == 3) {
|
recgResultText = "昼夜识别率突变";
|
}
|
return recgResultText;
|
}
|
}
|
|
@Data
|
public static class Integrity {
|
/**
|
* 车牌号不完整量
|
*/
|
private Integer plateNoItgrCount;
|
|
/**
|
* 车牌颜色不完整量
|
*/
|
private Integer plateColorItgrCount;
|
|
/**
|
* 车辆类型不完整量
|
*/
|
private Integer vehTypeItgrCount;
|
|
/**
|
* 车辆品牌不完整量
|
*/
|
private Integer vehBrandItgrCount;
|
|
/**
|
* 车辆颜色不完整量
|
*/
|
private Integer vehColorItgrCount;
|
|
/**
|
* 车辆型号不完整量
|
*/
|
private Integer vehModelItgrCount;
|
|
/**
|
* 主要属性不完整量
|
*/
|
private Integer mainNoIntegrityCount;
|
|
/**
|
* 全量属性不完整量
|
*/
|
private Integer noIntegrityCount;
|
}
|
|
public static SnapClockVO getVO(VehicleDeviceInspectionResult result){
|
SnapClockVO snapClockVO = new SnapClockVO();
|
BeanUtils.copyProperties(result,snapClockVO);
|
snapClockVO.setClockPercent(result.getSnapClock().getClockPercent());
|
snapClockVO.setTodayClockCount(result.getSnapClock().getTodayClockCount());
|
snapClockVO.setTodayClockResult(result.getSnapClock().getTodayClockResult());
|
snapClockVO.setAllClockCount(result.getSnapClock().getAllClockCount());
|
snapClockVO.setAllClockResult(result.getSnapClock().getAllClockResult());
|
snapClockVO.setAllClockResultText(result.getSnapClock().getAllClockResultText());
|
snapClockVO.setTodayClockResultText(result.getSnapClock().getTodayClockResultText());
|
return snapClockVO;
|
}
|
}
|