wangzhibo
2026-07-28 2b662657c5bc5bc45b69f475c7b2edcf8fc92f0c
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
import { BaseEntity } from '../../base/entity/base';
import { Column, Entity, Index, Unique } from 'typeorm';
 
/**
 * 每日站点汇总
 */
@Entity('t_report_daily_vehicle')
@Unique('uk_date_vehicle', ['date', 'vehicleNo'])
export class ReportDailyVehicleEntity extends BaseEntity {
 
  @Index()
  @Column({ comment: '日期', type: 'date' })
  date: string;
 
  @Index()
  @Column({ comment: '车牌号', length: 32 })
  vehicleNo: string;
 
  @Index()
  @Column({ comment: '所属部门/学校/后勤组ID', type: 'int', nullable: true })
  departmentId: number;
 
  departmentName: string;
 
  // ==================== 2. 基础运行指标 ====================
 
  @Column({
    comment: '当日行驶里程(km)',
    type: 'decimal',
    precision: 10,
    scale: 2,
    default: 0.0,
  })
  totalKm: number;
 
  @Column({ comment: '未启动时间(分钟)', type: 'int', default: 0 })
  minutesOffline: number;
 
  @Column({ comment: '纯行驶时长(分钟)', type: 'int', default: 0 })
  minutesMoving: number;
 
  @Column({ comment: '停车时长(分钟)', type: 'int', default: 0 })
  minutesParked: number;
 
  @Column({ comment: '异常怠速时长(分钟)', type: 'int', default: 0 })
  minutesAbnormalIdle: number;
 
  @Column({
    comment: '平均行驶车速(km/h)',
    type: 'decimal',
    precision: 5,
    scale: 1,
    default: 0.0,
  })
  avgSpeed: number;
 
  // ==================== 3. 安全与驾驶行为指标 ====================
 
  @Column({ comment: '超速告警次数', type: 'int', default: 0 })
  overspeedCount: number;
 
  @Column({ comment: '超速累计时长(秒)', type: 'int', default: 0 })
  overspeedDurationSec: number;
 
  @Column({ comment: '急刹车次数', type: 'int', default: 0 })
  harshBrakeCount: number;
 
  @Column({ comment: '急加速次数', type: 'int', default: 0 })
  harshAccelCount: number;
 
  @Column({ comment: '急转弯次数', type: 'int', default: 0 })
  harshTurnCount: number;
 
  @Column({ comment: '非工作时段异动告警次数', type: 'int', default: 0 })
  offHoursMoveCount: number;
 
 
}