龚焕茏
2024-08-30 dffa4edacd228bb7aa385525e4a30db2384bc78f
ycl-pojo/src/main/java/com/ycl/platform/domain/result/HK/VehicleDeviceInspectionResult.java
@@ -2,41 +2,47 @@
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;
/**
 * 车辆设备全检指标监测结果,2.3.0版本新增
 * 车辆设备全检指标监测结果:车辆(车辆卡口设备时钟准确性、)
 *
 * @author gonghl
 */
@Data
@Document(collection = "vehicle_device_inspection")
@Document(collection = "hk_vehicle_device_inspection")
public class VehicleDeviceInspectionResult extends BaseResult {
    /**
     * 设备编号,dataType为1时表示卡口内码,dataType为11时表示采集设备内码
     */
    @TextIndexed
    private String externalIndexCode;
    /**
     * 设备名称
     */
    @TextIndexed
    private String deviceName;
    /**
     * 卡口内码或采集设备内码
     */
    @TextIndexed
    private String indexCode;
    /**
     * 组织编号
     */
    @TextIndexed
    private String orgCode;
    /**
     * 组织名称
     */
    @TextIndexed
    private String orgName;
    /**
@@ -63,6 +69,11 @@
     * 抓拍数据量监测结果,1:正常 2:无数据 4:数据量少
     */
    private Integer snapResult;
    /**
     * 抓拍数据量监测结果,1:正常 2:无数据 4:数据量少
     */
    private String snapResultText;
    // 以下为嵌套对象的字段
@@ -91,12 +102,25 @@
     */
    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;
@@ -111,6 +135,11 @@
        private Integer todayClockResult;
        /**
         * 当日接收的当日抓拍数据时钟准确性判定结果:1是合格,0是不合格
         */
        private String todayClockResultText;
        /**
         * 当日接收的全部抓拍数据时钟准确数据量
         */
        private Integer allClockCount;
@@ -119,12 +148,37 @@
         * 当日接收的全部抓拍数据时钟准确性判定结果: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;
@@ -154,6 +208,11 @@
        private Integer todayTimelyResult;
        /**
         * 当日接收的当日抓拍数据数据及时性判定结果:1是合格,0是不合格
         */
        private String todayTimelyResultText;
        /**
         * 当日接收的全部数据延迟量
         */
        private Integer allDelayCount;
@@ -177,6 +236,31 @@
         * 当日接收的全部数据及时性判定结果: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
@@ -208,6 +292,24 @@
         * 车牌识别异常:结果类型 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