VehicleMapper.java
8.26 KB
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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
package cn.com.glsx.admin.modules.mapper;
import cn.com.glsx.admin.modules.entity.Vehicle;
import cn.com.glsx.admin.modules.model.*;
import cn.com.glsx.admin.modules.model.export.*;
import cn.com.glsx.admin.modules.model.param.*;
import cn.com.glsx.admin.modules.model.stat.StatCountModel;
import cn.com.glsx.admin.modules.model.view.SimpleVehicleDTO;
import com.glsx.plat.common.annotation.DataOnlyShared;
import com.glsx.plat.common.annotation.DataPerm;
import com.glsx.plat.common.annotation.DataPermShare;
import com.glsx.plat.mybatis.mapper.CommonBaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Collection;
import java.util.List;
@Mapper
public interface VehicleMapper extends CommonBaseMapper<Vehicle> {
@DataPerm(showSql = true)
List<VehicleLinkSnsDTO> linkSnsSearch(VehicleSearch search);
List<VehicleLinkSnsDTO> selectVehicleLinkSnsByUserId(@Param("userId") Long userId, @Param("trialType") Integer trialType);
/**
* 获取试驾数据拆除报警基本信息
*
* @param keywords
* @return
*/
@DataPerm(showSql = true)
List<TearDownModelExport> searchTearDownAlarmList(@Param("keywords") String keywords);
/**
* 分页查询试驾车辆列表
*
* @param search
* @return
*/
@DataPerm(showSql = true)
List<TrialDriveVehiclePageDTO> searchTrialDrive(VehicleManageSearch search);
/**
* 导出试驾车辆数据
*
* @param search
* @return
*/
@DataPerm(showSql = true)
List<TrialDriveVehicleExport> exportDriveVehicle(VehicleManageSearch search);
/**
* 根据綁定的设备号查找车辆信息
*
* @param sn
* @return
*/
List<Vehicle> findVehicleInfoBySn(@Param("sn") String sn);
/**
* 车辆监控树-搜索车辆设备信息
*
* @param search
* @return
*/
List<OrgVehicleModel> selectOrgVehicle(VehicleTreeSearch search);
/**
* 车辆监控树-搜索车辆设备信息
*
* @param search
* @return
*/
List<OrgVehicleModel> selectOrgVehicleSns(VehicleTreeSearch search);
/**
* 分享的车辆数据
*
* @param search
* @return
*/
List<OrgVehicleModel> selectAbsolutelyVehicleSns(VehicleTreeSearch search);
Vehicle selectById(@Param("id") Long id);
List<Vehicle> selectByIds(@Param("ids") Collection<Long> ids);
/**
* genuine车架号查找车辆
*
* @param vin
* @return
*/
Vehicle getVehicleByVin(@Param("vin") String vin);
/**
* 查询车辆基础信息
*
* @param search
* @return
*/
@DataPerm(showSql = true)
@DataPermShare(showSql = true, permitTypeField = "permitType")
List<VehicleInfoPageDTO> searchVehicleInfo(VehicleInfoSearch search);
/**
* 导出车辆基础信息
*
* @param search
* @return
*/
@DataPerm(showSql = true)
@DataPermShare(showSql = true)
List<VehicleInfoReportExport> exportVehicleInfo(VehicleInfoSearch search);
@DataPerm(showSql = true)
List<TestVehicleDTO> listTestDriveVehicle(TestVehicleSearch testVehicleSearch);
/**
* 根据权限获取该账户下 所有绑定车辆和当天绑定的车辆总数
*
* @return
*/
@DataPerm(permTable = "temp", showSql = true)
@DataPermShare(linkTable = "temp", showSql = true)
List<StatCountModel> getVehicleBindNumWithAuth();
/**
* 根据权限获取该账户下 所有设备号集合
*
* @return 设备集合
*/
@DataPerm(showSql = true)
@DataPermShare(showSql = true)
List<String> getAllDeviceSnByAuth();
/**
* 根据权限获取该账户下 所有设备激活信息集合
*
* @param deviceActiveSearch
* @return
*/
@DataPerm(showSql = true)
@DataPermShare(showSql = true)
List<DeviceActiveExprot> getBaseDeviceActiveListWithAuth(DeviceActiveSearch deviceActiveSearch);
/**
* 根据权限获取该账户下 所有设备最后定位点信息集合
*
* @param finalPositioningSearch
* @return
*/
@DataPerm(showSql = true)
@DataPermShare(showSql = true)
List<FinalPositioningExport> findFinalPositioningList(FinalPositioningSearch finalPositioningSearch);
/**
* 根据权限获取该账户下 所有设备大数据研判信息集合
*
* @param judgmentSearch
* @return
*/
@DataPerm(showSql = true)
@DataPermShare(showSql = true)
List<JudgmentExport> findJudgmentList(JudgmentSearch judgmentSearch);
/**
* 根据权限获取该账户下 所有设备里程基础信息集合
*
* @param journeySearch
* @return
*/
@DataPerm(showSql = true)
@DataPermShare(showSql = true)
List<JourneyExport> findJourneyList(JourneySearch journeySearch);
/**
* 根据权限获取该账户下 所有设备离线信息集合
*
* @param offlineSearch
* @return
*/
@DataPerm(showSql = true)
@DataPermShare(showSql = true)
List<OfflineExport> findOfflineList(OfflineSearch offlineSearch);
/**
* 根据权限获取该账户下 获取所有设备数据拆除报警基本信息
*
* @param commonTearDownSearch
* @return
*/
@DataPerm(showSql = true)
@DataPermShare(showSql = true)
List<CommonTearDownModelExport> searchCommonTearDownAlarmList(CommonTearDownSearch commonTearDownSearch);
/**
* 根据权限获取该账户下 获取所有设备数据详细里程基本信息
*
* @param journeyDetailSearch
* @return
*/
@DataPerm(showSql = true)
List<JourneyDetailExport> findJourneyDetailList(JourneyDetailSearch journeyDetailSearch);
/**
* 根据权限获取该账户下 获取设备激活数据
*
* @param appendSql 拼接SQl
* @param period 日期类型
* @return
*/
@Deprecated
@DataPerm(permTable = "temp", showSql = true)
List<ActiveDeviceVo> getActiveDeviceInfoWithAuth(@Param("appendSql") String appendSql, @Param("period") Integer period);
/**
* 根据权限获取该账户下 获取设备绑定数据
*
* @param appendSql 拼接SQl
* @return
*/
@Deprecated
@DataPerm(permTable = "temp", showSql = true)
List<DeviceBindVo> getBindDeviceInfoWithAuth(@Param("appendSql") String appendSql);
/**
* 统计设备离线数
*
* @param
* @param offlineSnStr 不计算离线的设备集合
* @param offlineTime 离线时间
* @return
*/
@Deprecated
@DataPerm(showSql = true)
@DataPermShare(linkTable = "t_vehicle", showSql = true)
List<StatCountModel> getOfflineNumber(@Param("offlineSnStr") String offlineSnStr, @Param("offlineTime") long offlineTime);
/**
* 查询行驶里程
*
* @param journeyDailySearch
* @return
*/
@DataPerm(showSql = true)
List<JourneyDailyExport> findJourneyDailyList(JourneyDailySearch journeyDailySearch);
/**
* 统计设备离线报警
*
* @param lostBegin 离线时间
* @return
*/
@DataPerm(showSql = true)
@DataPermShare(showSql = true)
List<StatCountModel> getOffLineAlarmCount(@Param("lostBegin") String lostBegin);
Vehicle selectByOrderId(@Param("workOrderId") Long workOrderId);
/**
* 查询任何车辆by工单id,删除的也可以查
*
* @param workOrderId
* @return
*/
Vehicle selectAnyByOrderId(@Param("workOrderId") Long workOrderId);
List<Vehicle> selectByOrderIds(@Param("orderIds") Collection<Long> orderIds);
/**
* 获取车辆和设备绑定关系
*
* @return
*/
List<VehicleDeviceMapDto> getVehicleAndDeviceMap();
/**
* 根据权限获取该用户下面的车架号
*
* @return
*/
@DataPerm(showSql = true)
List<String> getVehicleByPermission();
/**
* 根据工单业务号和车架号获取车辆
*
* @param bizOrderNo
* @param vin
* @return
*/
Vehicle selectBizWorkNoAndVin(@Param("bizOrderNo") String bizOrderNo, @Param("vin") String vin);
/**
* 查询用户被分享的车辆数据
*
* @return
*/
@DataOnlyShared
List<Vehicle> selectAllShared();
List<SimpleVehicleDTO> searchWithoutPermit(ApiVehicleSearch search);
}