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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
| import { BaseEntity } from '../../base/entity/base';
| import { Column, Entity, Index, Unique } from 'typeorm';
|
| /**
| * 分拣员每日统计
| *
| * 一名分拣员一天一条记录
| */
| @Entity('t_report_daily_sorter')
| @Unique('uk_date_sorter', ['date', 'businessId'])
| export class ReportDailySorterEntity extends BaseEntity {
| @Index()
| @Column({
| comment: '日期',
| type: 'date',
| })
| date: string;
|
| @Index()
| @Column({
| comment: '身份证号',
| length: 32,
| })
| businessId: string;
|
| @Column({
| comment: '姓名',
| length: 64,
| nullable: true,
| })
| businessName: string;
|
| @Index()
| @Column({
| comment: '所属单位ID',
| type: 'bigint',
| nullable: true,
| })
| departmentId: number;
|
| @Column({
| comment: '所属单位名称',
| length: 64,
| nullable: true,
| })
| departmentName: string;
|
| @Index()
| @Column({
| comment: '工作站点ID',
| nullable: true,
| })
| workSiteId: string;
|
| @Column({
| comment: '工作站点名称',
| length: 64,
| nullable: true,
| })
| workSiteName: string;
|
| @Column({
| comment: '签到时间',
| nullable: true,
| })
| checkInTime: Date;
|
| @Column({
| comment: '签退时间',
| nullable: true,
| })
| checkOutTime: Date;
|
| @Column({
| comment: '工作时长(小时)',
| type: 'decimal',
| precision: 5,
| scale: 2,
| default: 0.0,
| })
| workHours: number;
|
| @Column({
| comment: '考勤状态',
| dict: ['正常', '迟到', '早退', '缺卡', '旷工'],
| default: '缺卡',
| })
| attendanceStatus: string;
|
| @Column({
| comment: 'GPS数据点数量',
| type: 'int',
| default: 0,
| })
| gpsPointCount: number;
|
| @Column({
| comment: '工作轨迹里程(km)',
| type: 'decimal',
| precision: 10,
| scale: 2,
| default: 0.0,
| })
| totalKm: number;
|
| @Column({
| comment: '移动时长(分钟)',
| type: 'int',
| default: 0,
| })
| minutesMoving: number;
|
| @Column({
| comment: '回收订单数',
| type: 'int',
| default: 0,
| })
| orderCount: number;
|
| @Column({
| comment: '完成订单数',
| type: 'int',
| default: 0,
| })
| completedOrderCount: number;
|
| @Column({
| comment: '预约上门订单数',
| type: 'int',
| default: 0,
| })
| appointmentOrderCount: number;
|
| @Column({
| comment: '发放碳积分',
| type: 'decimal',
| precision: 12,
| scale: 2,
| default: 0.0,
| })
| totalCarbonPoint: number;
|
| @Column({
| comment: '健康数据数量',
| type: 'int',
| default: 0,
| })
| healthDataCount: number;
|
| @Column({
| comment: '健康异常数量',
| type: 'int',
| default: 0,
| })
| healthAbnormalCount: number;
|
| @Column({
| comment: '健康告警总数',
| type: 'int',
| default: 0,
| })
| alarmCount: number;
|
| @Column({
| comment: '一般告警次数',
| type: 'int',
| default: 0,
| })
| generalAlarmCount: number;
|
| @Column({
| comment: '中等告警次数',
| type: 'int',
| default: 0,
| })
| mediumAlarmCount: number;
|
| @Column({
| comment: '严重告警次数',
| type: 'int',
| default: 0,
| })
| seriousAlarmCount: number;
|
| @Column({
| comment: '未处理告警次数',
| type: 'int',
| default: 0,
| })
| unhandledAlarmCount: number;
| }
|
|