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_face_device_inspection")
|
public class FaceDeviceInspectionResult extends BaseResult {
|
|
/**
|
* 设备名称
|
*/
|
private String deviceName;
|
|
/**
|
* 设备编号
|
*/
|
private String externalIndexCode;
|
|
/**
|
* 卡口内码或采集设备内码,dataType为1时表示卡口内码,dataType为2或11时表示采集设备内码
|
*/
|
private String indexCode;
|
|
/**
|
* IP地址
|
*/
|
private String networkAddr;
|
|
/**
|
* 组织编号
|
*/
|
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 SnapValidity snapValidity;
|
|
/**
|
* 唯一性相关数据
|
*/
|
private SnapUnique snapUnique;
|
|
public String getSnapResultText() {
|
if (snapResult == 1) {
|
snapResultText = "正常";
|
}
|
if (snapResult == 2) {
|
snapResultText = "无数据";
|
}
|
if (snapResult == 4) {
|
snapResultText = "数据量少";
|
}
|
return snapResultText;
|
}
|
|
// 内嵌对象定义
|
|
@Data
|
public static class SnapClock {
|
/**
|
* 时钟准确率
|
*/
|
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 {
|
/**
|
* 及时率
|
*/
|
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 SnapValidity {
|
/**
|
* 建模失败率
|
*/
|
private Float failPercent;
|
|
/**
|
* 建模失败数据量
|
*/
|
private Integer failCount;
|
|
/**
|
* 白天建模失败数据量
|
*/
|
private Integer dayFailCount;
|
|
/**
|
* 低评分数据量
|
*/
|
private Integer lowScoreCount;
|
|
/**
|
* 平均人脸低平分率
|
*/
|
private Float lowScorePercent;
|
|
/**
|
* 白天人脸低平分数据量
|
*/
|
private Integer dayLowCount;
|
}
|
|
@Data
|
public static class SnapUnique {
|
/**
|
* 不唯一数据:设备编号、抓拍时间、人脸总评分相同认为数据相同,则该数据不唯一
|
*/
|
private Integer nouniqueData;
|
|
/**
|
* 不唯一数据量:不唯一数据重复量
|
*/
|
private Integer nouniqueCount;
|
}
|
|
public static SnapClockVO getVO(FaceDeviceInspectionResult 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;
|
}
|
}
|