fuliqi
2024-09-14 a776ca9959e0c4696db0ab96cb59efcfe4061201
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
package com.ycl.platform.domain.result.HK;
 
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.math.BigDecimal;
import java.math.RoundingMode;
 
/**
 * 车辆设备抽检指标监测结果:车辆(车辆卡口设备抓拍数据大图可用性)
 *
 * @author gonghl
 */
@Data
@Document(collection = "hk_vehicle_device_sampling")
public class VehicleDeviceSamplingResult extends BaseResult {
 
    /**
     * 卡口内码或采集设备内码,dataType为1时表示卡口内码,dataType为11时表示采集设备内码
     */
    @TextIndexed
    private String indexCode;
 
    /**
     * 设备或卡口国标编码
     */
    @TextIndexed
    private String externalIndexCode;
 
    /**
     * 设备或卡口名称
     */
    @TextIndexed
    private String deviceName;
 
    /**
     * 组织编号
     */
    @TextIndexed
    private String orgCode;
 
    /**
     * 组织名称
     */
    @TextIndexed
    private String orgName;
 
    // 以下为嵌套对象的字段
 
    /**
     * 大图可用性相关数据
     */
    private BigUsefulness bigUseful;
 
    /**
     * 车辆属性不一致相关数量
     */
    private VehicleDifference vehDiff;
 
    // 内嵌对象定义
 
    @Data
    public static class BigUsefulness {
        /**
         * 大图可用性数据抽检量
         */
        private Integer sampleCount;
 
        /**
         * 大图可用率
         */
        private Float bigUsefulPercent;
 
        /**
         * 大图访问异常数据量
         */
        private Integer bigPicExpCount;
 
        /**
         * OSD标注异常数据量
         */
        private Integer osdExpCount;
 
        public static BigDecimal calUrl(BigUsefulness bigUseful) {
            BigDecimal url = BigDecimal.ZERO;
            if (bigUseful.getSampleCount() != 0) {
                //图片访问正常量 = 抽检量-异常量
                BigDecimal picNormalCount = new BigDecimal(bigUseful.getSampleCount() - bigUseful.getBigPicExpCount());
                //图片抽检量
                BigDecimal sampleCount = new BigDecimal(bigUseful.getSampleCount());
                url = picNormalCount.divide(sampleCount, 4, RoundingMode.HALF_UP);
            }
            return url;
        }
    }
 
    @Data
    public static class VehicleDifference {
        /**
         * 车辆属性不一致数据抽检量
         */
        private Integer sampleCount;
 
        /**
         * 车牌号码不一致数据量
         */
        private Integer plateNoDiffCount;
 
        /**
         * 车牌颜色不一致数据量
         */
        private Integer plateColorDiffCount;
 
        /**
         * 车辆类型不一致数据量
         */
        private Integer vehTypeDiffCount;
 
        /**
         * 车辆品牌不一致数据量
         */
        private Integer vehBrandDiffCount;
 
        /**
         * 主要属性不一致数据量
         */
        private Integer majorDiffCount;
 
        /**
         * 主要属性一致率
         */
        private Float majorConPercent;
 
        /**
         * 重要属性不一致数据量
         */
        private Integer importDiffCount;
 
        /**
         * 重要属性一致率
         */
        private Float importantConPercent;
    }
 
 
}