Dana
2025-12-01 faf9ab5bc6f172819dd5c0cd6dcc0ebb82391c1e
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
package com.anyun.h264.model;
 
/**
 * 水印信息数据模型
 * 包含车牌、学员、教练、经度、纬度、驾校、车速等信息
 */
public class WatermarkInfo {
    /** 车牌号 */
    private String plateNumber;
    
    /** 学员姓名 */
    private String student;
    
    /** 教练姓名 */
    private String coach;
    
    /** 经度 */
    private Double longitude;
    
    /** 纬度 */
    private Double latitude;
    
    /** 驾校名称 */
    private String drivingSchool;
    
    /** 车速(单位:km/h) */
    private Double speed;
 
    public WatermarkInfo() {
    }
 
    public String getPlateNumber() {
        return plateNumber;
    }
 
    public void setPlateNumber(String plateNumber) {
        this.plateNumber = plateNumber;
    }
 
    public String getStudent() {
        return student;
    }
 
    public void setStudent(String student) {
        this.student = student;
    }
 
    public String getCoach() {
        return coach;
    }
 
    public void setCoach(String coach) {
        this.coach = coach;
    }
 
    public Double getLongitude() {
        return longitude;
    }
 
    public void setLongitude(Double longitude) {
        this.longitude = longitude;
    }
 
    public Double getLatitude() {
        return latitude;
    }
 
    public void setLatitude(Double latitude) {
        this.latitude = latitude;
    }
 
    public String getDrivingSchool() {
        return drivingSchool;
    }
 
    public void setDrivingSchool(String drivingSchool) {
        this.drivingSchool = drivingSchool;
    }
 
    public Double getSpeed() {
        return speed;
    }
 
    public void setSpeed(Double speed) {
        this.speed = speed;
    }
 
    /**
     * 格式化水印信息为显示文本
     * @return 格式化的水印文本
     */
    public String formatWatermarkText() {
        StringBuilder sb = new StringBuilder();
        
        if (plateNumber != null && !plateNumber.isEmpty()) {
            sb.append("车牌:").append(plateNumber);
        }
        
        if (student != null && !student.isEmpty()) {
            if (sb.length() > 0) sb.append(" ");
            sb.append("学员:").append(student);
        }
        
        if (coach != null && !coach.isEmpty()) {
            if (sb.length() > 0) sb.append(" ");
            sb.append("教练:").append(coach);
        }
        
        if (longitude != null && latitude != null) {
            if (sb.length() > 0) sb.append(" ");
            sb.append("位置:").append(String.format("%.6f,%.6f", latitude, longitude));
        }
        
        if (drivingSchool != null && !drivingSchool.isEmpty()) {
            if (sb.length() > 0) sb.append(" ");
            sb.append("驾校:").append(drivingSchool);
        }
        
        if (speed != null) {
            if (sb.length() > 0) sb.append(" ");
            sb.append("车速:").append(String.format("%.1f", speed)).append("km/h");
        }
        
        return sb.toString();
    }
 
    @Override
    public String toString() {
        return "WatermarkInfo{" +
                "plateNumber='" + plateNumber + '\'' +
                ", student='" + student + '\'' +
                ", coach='" + coach + '\'' +
                ", longitude=" + longitude +
                ", latitude=" + latitude +
                ", drivingSchool='" + drivingSchool + '\'' +
                ", speed=" + speed +
                '}';
    }
}