fuliqi
2025-01-02 73caf5a7072976021f43a764ed2ad73404f4d040
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
package com.ycl.platform.domain.result.HK;
 
import com.ycl.platform.domain.result.BaseResult;
import com.ycl.platform.domain.vo.DataCenter.BigPicUsefulVO;
import lombok.Data;
import org.springframework.beans.BeanUtils;
import org.springframework.data.mongodb.core.index.TextIndexed;
import org.springframework.data.mongodb.core.mapping.Document;
 
import java.math.BigDecimal;
import java.math.RoundingMode;
 
/**
 * 人脸设备抽检指标监测结果:人脸(人脸卡口信息采集准确率、人脸卡口设备抓拍数据大图可用性)
 *
 * @author gonghl
 */
@Data
@Document(collection = "hk_face_device_sampling")
public class FaceDeviceSamplingResult extends BaseResult {
 
    /**
     * 设备名称
     */
    private String deviceName;
 
    /**
     * 卡口内码或采集设备内码,dataType为1时表示卡口内码,dataType为2或11时表示采集设备内码
     */
    private String indexCode;
 
    /**
     * 设备或卡口国标编码
     */
    private String externalIndexCode;
 
    /**
     * IP地址
     */
    private String networkAddr;
 
    /**
     * 组织编号
     */
    private String orgCode;
 
    /**
     * 组织名称
     */
    private String orgName;
 
    // 以下为嵌套对象的字段
 
    /**
     * 大图可用性相关数据
     */
    private BigUsefulness bigUseful;
 
    /**
     * 人脸合格性相关数据
     */
    private FaceEligibility faceEligibility;
 
    // 内嵌对象定义
 
    @Data
    public static class BigUsefulness {
        /**
         * 大图可用性抽检量
         */
        private Integer sampleCount;
 
        /**
         * 大图不可用率
         */
        private Float bigUsefulPercent;
 
        /**
         * 大图访问异常数据量
         */
        private Integer bigPicExpCount;
 
        /**
         * 人脸大小图不一致数据量:小图不在大图中
         */
        private Integer imgDiffCount;
 
        /**
         * OSD标注异常数据量
         */
        private Integer osdExpCount;
 
    }
 
    @Data
    public static class FaceEligibility {
        /**
         * 人脸合格性抽检量
         */
        private Integer sampleCount;
 
        /**
         * 人脸合格率
         */
        private Float faceEligPercent;
 
        /**
         * 人脸不唯一量
         */
        private Integer unfaceEligCount;
    }
 
    public static BigPicUsefulVO getPicVO(FaceDeviceSamplingResult result){
        BigPicUsefulVO vo = new BigPicUsefulVO();
        BeanUtils.copyProperties(result,vo);
        vo.setBigPicExpCount(result.getBigUseful().getBigPicExpCount());
        vo.setBigUsefulPercent(result.getBigUseful().getBigUsefulPercent());
        vo.setSampleCount(result.getBigUseful().getSampleCount());
        vo.setOsdExpCount(result.getBigUseful().getOsdExpCount());
        vo.setImgDiffCount(result.getBigUseful().getImgDiffCount());
        return vo;
    }
    public static BigPicUsefulVO getEligeVO(FaceDeviceSamplingResult result){
        BigPicUsefulVO vo = new BigPicUsefulVO();
        BeanUtils.copyProperties(result,vo);
        vo.setSampleCount(result.getFaceEligibility().getSampleCount());
        vo.setUnfaceEligCount(result.getFaceEligibility().getUnfaceEligCount());
        vo.setFaceEligPercent(result.getFaceEligibility().getFaceEligPercent());
        return vo;
    }
}