Pu Zhibing
2025-02-28 173428adf09179860a3cb1a88f46378fd98473b2
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
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
package com.stylefeng.guns.modular.system.util.videoGateway;
 
import cn.hutool.core.util.CharsetUtil;
import cn.hutool.crypto.SmUtil;
import cn.hutool.crypto.symmetric.SM4;
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;
import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.stylefeng.guns.core.util.ToolUtil;
import com.stylefeng.guns.modular.system.util.videoGateway.model.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
 
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
 
/**
 * 视频网关工具类型
 * @author zhibing.pu
 * @Date 2024/12/18 19:32
 */
@Slf4j
public class VideoGateway {
    
    private static AccountLogin accountLogin;
    
    
    /**
     * 获取 SessionId
     * @return
     */
    public static SessionId getSessionId(){
        HttpRequest get = HttpUtil.createGet("https://zhyn.cg.gz.gov.cn/api/cws-auth/v1/session-id/third-platform");
        get.header("operate-terminal", "4");
        log.info("【获取 SessionId】请求参数:" + get);
        HttpResponse execute = get.execute();
        String body = execute.body();
        log.info("【获取 SessionId】返回结果:" + body);
        JSONObject result = JSON.parseObject(body);
        Integer code = result.getInteger("code");
        if(-1 == code){
            log.error(result.getString("msg"));
            return null;
        }
        SessionId sessionId = result.getObject("data", SessionId.class);
        SM4 sm4 = SmUtil.sm4("EP77VsBj9yeOKpcO".getBytes());
        String decryptStr = sm4.decryptStr(sessionId.getPublicKey(), CharsetUtil.CHARSET_UTF_8);
        sessionId.setKey(decryptStr);
        return sessionId;
    }
    
    
    /**
     * 登录
     */
    public static void accountLogin(){
        SessionId sessionId = getSessionId();
        if(null == sessionId){
            throw new RuntimeException("获取sessionId失败");
        }
        HttpRequest post = HttpUtil.createPost("https://zhyn.cg.gz.gov.cn/api/cws-auth/v1/account-login/applet/third-platform");
        post.header("operate-terminal", "4");
        Map<String, Object> body = new HashMap<>();
        body.put("account", "UgRn8RGM1Z9k");
        SM4 sm4 = SmUtil.sm4(sessionId.getKey().getBytes());
        String encryptHex = sm4.encryptHex("Lti52D@#&J6q");
        body.put("pwd", encryptHex);
        body.put("sessionId", sessionId.getSessionId());
        log.info("【登录】请求参数:" + JSON.toJSONString(body) + "\npublicKey:" + sessionId.getPublicKey() + "\n加密key:" + sessionId.getKey());
        post.body(JSON.toJSONString(body));
        HttpResponse execute = post.execute();
        log.info("【登录】返回结果:" + execute.body());
        JSONObject result = JSON.parseObject(execute.body());
        Integer code = result.getInteger("code");
        if(0 != code){
            log.error(result.getString("msg"));
            return;
        }
        accountLogin = result.getObject("data", AccountLogin.class);
    }
    
    
    /**
     * 获取车辆列表数据
     * @param vehicleNum    车牌号
     * @param companyId     公司id
     * @param companyName   公司名称
     * @return
     */
    public static List<Vehicle> getVehicleList(String vehicleNum, String companyId, String companyName, int num){
        if(null == accountLogin){
            accountLogin();
        }
        HttpRequest post = HttpUtil.createPost("https://zhyn.cg.gz.gov.cn/api/cws-user/biz-vehicle-infos/v1/smallDataList");
        post.header("operate-terminal", "4");
        post.header("token", accountLogin.getToken());
        Map<String, Object> body = new HashMap<>();
        if(StringUtils.isNotEmpty(vehicleNum)){
            body.put("vehicleNum", vehicleNum);
        }
        if(StringUtils.isNotEmpty(companyId)){
            body.put("companyId", companyId);
        }
        if(StringUtils.isNotEmpty(companyName)){
            body.put("companyName", companyName);
        }
        log.info("【获取车辆列表】请求参数:" + JSON.toJSONString(body));
        post.body(JSON.toJSONString(body));
        HttpResponse execute = post.execute();
        if(401 == execute.getStatus() || 403 == execute.getStatus()){
            log.error("token失效,重新登录");
            accountLogin = null;
            if(num == 3){
                log.error("token失效,请联系管理员");
                return null;
            }
            num++;
            return getVehicleList(vehicleNum, companyId, companyName, num);
        }
        log.info("【获取车辆列表】返回结果:" + execute.body());
        JSONObject result = JSON.parseObject(execute.body());
        Integer code = result.getInteger("code");
        if(0 != code){
            log.error(result.getString("msg"));
            return null;
        }
        List<Vehicle> list = new ArrayList();
        JSONArray data = result.getJSONArray("data");
        for (int i = 0; i < data.size(); i++) {
            Vehicle object = data.getObject(i, Vehicle.class);
            list.add(object);
        }
        return list;
    }
    
    
    /**
     * 获取船舶列表
     * @param shipNum       船舶号
     * @param companyId     公司id
     * @param companyName   公司名称
     * @return
     */
    public static List<Ship> getShipList(String shipNum, String companyId, String companyName, int num){
        if(null == accountLogin){
            accountLogin();
        }
        HttpRequest post = HttpUtil.createPost("https://zhyn.cg.gz.gov.cn/api/cws-user/biz-ship-infos/v1/smallDataList");
        post.header("operate-terminal", "4");
        post.header("token", accountLogin.getToken());
        Map<String, Object> body = new HashMap<>();
        if(StringUtils.isNotEmpty(shipNum)){
            body.put("shipNum", shipNum);
        }
        if(StringUtils.isNotEmpty(companyId)){
            body.put("companyId", companyId);
        }
        if(StringUtils.isNotEmpty(companyName)){
            body.put("companyName", companyName);
        }
        log.info("【获取船舶列表】请求参数:" + JSON.toJSONString(body));
        post.body(JSON.toJSONString(body));
        HttpResponse execute = post.execute();
        if(401 == execute.getStatus() || 403 == execute.getStatus()){
            log.error("token失效,重新登录");
            if(num == 3){
                log.error("token失效,请联系管理员");
                return null;
            }
            num++;
            accountLogin = null;
            return getShipList(shipNum, companyId, companyName, num);
        }
        log.info("【获取船舶列表】返回结果:" + execute.body());
        JSONObject result = JSON.parseObject(execute.body());
        Integer code = result.getInteger("code");
        if(0 != code){
            log.error(result.getString("msg"));
            return null;
        }
        List<Ship> list = new ArrayList();
        JSONArray data = result.getJSONArray("data");
        for (int i = 0; i < data.size(); i++) {
            Ship object = data.getObject(i, Ship.class);
            list.add(object);
        }
        return list;
    }
    
    
    /**
     * 2018年协议车辆在线状态接口
     * @return
     */
    public static List<VehicleOnline> queryRuntimeInfoByCache(int num){
        if(null == accountLogin){
            accountLogin();
        }
        HttpRequest post = HttpUtil.createPost("https://zhyn.cg.gz.gov.cn/map/web/map/queryRuntimeInfoByCache");
        post.header("operate-terminal", "4");
        post.header("token", accountLogin.getToken());
        post.body("{}");
        log.info("【2018年协议车辆在线】请求参数:" + post.getUrl());
        HttpResponse execute = post.execute();
        if(401 == execute.getStatus() || 403 == execute.getStatus()){
            log.error("token失效,重新登录");
            if(num == 3){
                log.error("token失效,请联系管理员");
                return null;
            }
            num++;
            accountLogin = null;
            return queryRuntimeInfoByCache(num);
        }
        log.info("【2018年协议车辆在线】返回结果:" + execute.body());
        JSONObject result = JSON.parseObject(execute.body());
        Integer code = result.getInteger("code");
        if(0 != code){
            log.error(result.getString("msg"));
            return null;
        }
        List<VehicleOnline> list = new ArrayList();
        JSONArray data = result.getJSONArray("data");
        for (int i = 0; i < data.size(); i++) {
            VehicleOnline object = data.getObject(i, VehicleOnline.class);
            list.add(object);
        }
        return list;
    }
    
    
    /**
     * 2023年协议车辆在线状态接口
     * @return
     */
    public static List<VehicleOnline> locationRealTimeInfoCache(int num){
        if(null == accountLogin){
            accountLogin();
        }
        HttpRequest get = HttpUtil.createGet("https://zhyn.cg.gz.gov.cn/jttweb/api/v1/location/locationRealTimeInfoCache");
        get.header("operate-terminal", "4");
        get.header("token", accountLogin.getToken());
        log.info("【2023年协议车辆在线】请求参数:" + get.getUrl());
        HttpResponse execute = get.execute();
        if(401 == execute.getStatus() || 403 == execute.getStatus()){
            log.error("token失效,重新登录");
            if(num == 3){
                log.error("token失效,请联系管理员");
                return null;
            }
            num++;
            accountLogin = null;
            return locationRealTimeInfoCache(num);
        }
        log.info("【2023年协议车辆在线】返回结果:" + execute.body());
        JSONObject result = JSON.parseObject(execute.body());
        Integer code = result.getInteger("code");
        if(0 != code){
            log.error(result.getString("msg"));
            return null;
        }
        List<VehicleOnline> list = new ArrayList();
        JSONArray data = result.getJSONArray("data");
        for (int i = 0; i < data.size(); i++) {
            VehicleOnline object = data.getObject(i, VehicleOnline.class);
            list.add(object);
        }
        return list;
    }
    
    
    /**
     * 2018年协议发送拍摄指令接口
     * @param terminalId    终点卡号
     * @param channelId     通道ID
     * @return
     */
    public static String cameraShot2018(String terminalId, Integer channelId, int num){
        if(null == accountLogin){
            accountLogin();
        }
        HttpRequest post = HttpUtil.createPost("https://zhyn.cg.gz.gov.cn/map/web/vehicleCtrl/" + terminalId + "/cameraShot");
        post.header("operate-terminal", "4");
        post.header("token", accountLogin.getToken());
        log.info("【2018年协议发送拍摄指令接口】请求地址:" + post.getUrl());
        Map<String, Object> body = new HashMap<>();
        body.put("channelId", channelId);
        log.info("【2018年协议发送拍摄指令接口】请求参数:" + JSON.toJSONString(body));
        post.body(JSON.toJSONString(body));
        HttpResponse execute = post.execute();
        if(401 == execute.getStatus() || 403 == execute.getStatus()){
            log.error("token失效,重新登录");
            if(num == 3){
                log.error("token失效,请联系管理员");
                throw new RuntimeException("token失效,请联系管理员");
            }
            num++;
            accountLogin = null;
            return cameraShot2018(terminalId, channelId, num);
        }
        log.info("【2018年协议发送拍摄指令接口】返回结果:" + execute.body());
        JSONObject result = JSON.parseObject(execute.body());
        Integer code = result.getInteger("code");
        if(0 != code){
            log.error(result.getString("msg"));
            throw new RuntimeException("【2018年协议发送拍摄指令接口】失败:" + execute.body());
        }
        //返回文件ID
        String data = result.getString("data");
        if(ToolUtil.isEmpty(data)){
            if(num == 12){
                log.error(result.getString("msg"));
                throw new RuntimeException("【2018年协议发送拍摄指令接口】12次(1分钟)失败:" + execute.body());
            }
            num++;
            try {
                Thread.sleep(5000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
            return cameraShot2018(terminalId, channelId, num);
        }
        return data;
    }
    
    
    /**
     * 2023年协议发送拍摄指令接口
     * @param vehicleId     车船 ID
     * @param vehicleType   车船类型:1 车辆 2 船舶
     * @param terminalId    终点卡号
     * @param channelId     通道ID
     * @return
     */
    public static String cameraShot2023(Integer vehicleId, Integer vehicleType, String terminalId, Integer channelId, int num){
        if(null == accountLogin){
            accountLogin();
        }
        HttpRequest get = HttpUtil.createGet("https://zhyn.cg.gz.gov.cn/api/cws-business/biz-device-send-records/v1/cameraShot?vehicleId=" + vehicleId + "&vehicleType=" + vehicleType + "&terminalId=" + terminalId + "&channelId=" + channelId);
        get.header("operate-terminal", "4");
        get.header("token", accountLogin.getToken());
        log.info("【2023年协议发送拍摄指令接口】请求参数:" + get.getUrl());
        HttpResponse execute = get.execute();
        if(401 == execute.getStatus() || 403 == execute.getStatus()){
            log.error("token失效,重新登录");
            if(num == 3){
                log.error("token失效,请联系管理员");
                throw new RuntimeException("token失效,请联系管理员");
            }
            num++;
            accountLogin = null;
            return cameraShot2023(vehicleId, vehicleType, terminalId, channelId, num);
        }
        log.info("【2023年协议发送拍摄指令接口】返回结果:" + execute.body());
        JSONObject result = JSON.parseObject(execute.body());
        Integer code = result.getInteger("code");
        if(0 != code){
            log.error(result.getString("msg"));
            throw new RuntimeException("【2023年协议发送拍摄指令接口】失败:" + execute.body());
        }
        //返回文件ID
        String data = result.getString("data");
        if(ToolUtil.isEmpty(data)){
            if(num == 12){
                log.error(result.getString("msg"));
                throw new RuntimeException("【2023年协议发送拍摄指令接口】12次(1分钟)失败:" + execute.body());
            }
            num++;
            try {
                Thread.sleep(5000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
            return cameraShot2023(vehicleId, vehicleType, terminalId, channelId, num);
        }
        return data;
    }
    
    
    /**
     * 2018年协议车辆获取拍摄图片接口
     * @param terminalId    终端卡号
     * @param fileId        文件ID
     * @return
     */
    public static String getCameraShotByFileId2018(String terminalId, String fileId, int num){
        if(null == accountLogin){
            accountLogin();
        }
        HttpRequest get = HttpUtil.createGet("https://zhyn.cg.gz.gov.cn/map/web/vehicleCtrl/getCameraShotById?terminalId=" + terminalId + "&id=" + fileId);
        get.header("operate-terminal", "4");
        get.header("token", accountLogin.getToken());
        log.info("【2018年协议车辆获取拍摄图片】请求参数:" + get.getUrl());
        HttpResponse execute = get.execute();
        if(401 == execute.getStatus() || 403 == execute.getStatus()){
            log.error("token失效,重新登录");
            if(num == 3){
                log.error("token失效,请联系管理员");
                throw new RuntimeException("token失效,请联系管理员");
            }
            num++;
            accountLogin = null;
            return getCameraShotByFileId2018(terminalId, fileId, num);
        }
        log.info("【2018年协议车辆获取拍摄图片】返回结果:" + execute.body());
        JSONObject result = JSON.parseObject(execute.body());
        Integer code = result.getInteger("code");
        if(0 != code){
            log.error(result.getString("msg"));
            throw new RuntimeException("【2018年协议车辆获取拍摄图片】失败:" + execute.body());
        }
        //图片地址
        String data = result.getString("data");
        if(ToolUtil.isEmpty(data)){
            if(num == 12){
                log.error(result.getString("msg"));
                throw new RuntimeException("【2018年协议车辆获取拍摄图片】12次(1分钟)失败:" + execute.body());
            }
            num++;
            try {
                Thread.sleep(5000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
            return getCameraShotByFileId2018(terminalId, fileId, num);
        }
        data = data.replaceAll(";", "");
        return "https://zhyn-pic.cg.gz.gov.cn" + data;
    }
    
    
    /**
     * 2023年协议车辆获取拍摄图片接口
     * @param fileId        文件ID
     * @return
     */
    public static String getCameraShotByFileId2023(String fileId, int num){
        if(null == accountLogin){
            accountLogin();
        }
        HttpRequest get = HttpUtil.createGet("https://zhyn.cg.gz.gov.cn/api/cws-business/biz-device-send-records/v1/getCameraShotById?id=" + fileId);
        get.header("operate-terminal", "4");
        get.header("token", accountLogin.getToken());
        log.info("【2023年协议车辆获取拍摄图片】请求参数:" + get.getUrl());
        HttpResponse execute = get.execute();
        if(401 == execute.getStatus() || 403 == execute.getStatus()){
            log.error("token失效,重新登录");
            if(num == 3){
                log.error("token失效,请联系管理员");
                throw new RuntimeException("token失效,请联系管理员");
            }
            num++;
            accountLogin = null;
            return getCameraShotByFileId2023(fileId, num);
        }
        log.info("【2023年协议车辆获取拍摄图片】返回结果:" + execute.body());
        JSONObject result = JSON.parseObject(execute.body());
        Integer code = result.getInteger("code");
        if(0 != code){
            log.error(result.getString("msg"));
            throw new RuntimeException("【2023年协议车辆获取拍摄图片】失败:" + execute.body());
        }
        //图片地址
        String data = result.getString("data");
        if(ToolUtil.isEmpty(data)){
            if(num == 12){
                log.error(result.getString("msg"));
                throw new RuntimeException("【2023年协议车辆获取拍摄图片】12次(1分钟)失败:" + execute.body());
            }
            num++;
            try {
                Thread.sleep(5000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
            return getCameraShotByFileId2023(fileId, num);
        }
        data = data.replaceAll(";", "");
        return "https://zhyn-pic.cg.gz.gov.cn" + data;
    }
    
    
    /**
     * 获取车辆轨迹接口
     * @param vehicleNum    车牌号
     * @param vehicleType   车船类型(1=车辆,2=船舶)
     * @param startTime     开始时间(yyyy-MM-dd HH:mm:ss)
     * @param endTime       结束时间(yyyy-MM-dd HH:mm:ss)
     * @return
     */
    public static List<TrackInfo> getTrackInfoByVehicleNum(String vehicleNum, String vehicleType, String startTime, String endTime, int num){
        if(null == accountLogin){
            accountLogin();
        }
        HttpRequest post = HttpUtil.createPost("https://zhyn.cg.gz.gov.cn/map/web/map/getTrackInfoByVehicleNum");
        post.header("operate-terminal", "4");
        post.header("token", accountLogin.getToken());
        Map<String, Object> body = new HashMap<>();
        body.put("vehicleNum", vehicleNum);
        body.put("vehicleType", vehicleType);
        body.put("startTime", startTime);
        body.put("endTime", endTime);
        log.info("请求参数:" + JSON.toJSONString(body));
        post.body(JSON.toJSONString(body));
        HttpResponse execute = post.execute();
        if(401 == execute.getStatus() || 403 == execute.getStatus()){
            log.error("token失效,重新登录");
            if(num == 3){
                log.error("token失效,请联系管理员");
                return null;
            }
            num++;
            accountLogin = null;
            return getTrackInfoByVehicleNum(vehicleNum, vehicleType, startTime, endTime, num);
        }
        log.info("返回结果:" + execute.body());
        JSONObject result = JSON.parseObject(execute.body());
        Integer code = result.getInteger("code");
        if(0 != code){
            log.error(result.getString("msg"));
            return null;
        }
        List<TrackInfo> list = new ArrayList();
        JSONArray data = result.getJSONArray("data");
        for (int i = 0; i < data.size(); i++) {
            TrackInfo object = data.getObject(i, TrackInfo.class);
            list.add(object);
        }
        return list;
    }
    
    
    /**
     * 验证当前位置是否在围栏内
     * @param longitude
     * @param latitude
     * @param num
     * @return
     */
    public static boolean getFenceByPoint(String longitude, String latitude, int num) {
        if(null == accountLogin){
            accountLogin();
        }
        HttpRequest post = HttpUtil.createPost("https://zhyn.cg.gz.gov.cn/map/web/getFenceByPoint");
        post.header("operate-terminal", "4");
        post.header("token", accountLogin.getToken());
        Map<String, Object> body = new HashMap<>();
        body.put("longitude", longitude);
        body.put("latitude", latitude);
        body.put("type", "1");
        log.info("【验证当前位置是否在围栏内】请求参数:" + JSON.toJSONString(body));
        post.body(JSON.toJSONString(body));
        HttpResponse execute = post.execute();
        if(401 == execute.getStatus() || 403 == execute.getStatus()){
            log.error("token失效,重新登录");
            if(num == 3){
                log.error("token失效,请联系管理员");
                throw new RuntimeException("token失效,请联系管理员");
            }
            num++;
            accountLogin = null;
            return getFenceByPoint(longitude, latitude, num);
        }
        log.info("【验证当前位置是否在围栏内】返回结果:" + execute.body());
        JSONObject result = JSON.parseObject(execute.body());
        Integer code = result.getInteger("code");
        if(0 != code){
            log.error(result.getString("msg"));
            throw new RuntimeException("【验证当前位置是否在围栏内】失败:" + execute.body());
        }
        Integer data = result.getInteger("data");
        return 1 == data;
    }
    
    
    
    public static void main(String[] args) {
//        SM4 sm4 = SmUtil.sm4("EP77VsBj9yeOKpcO".getBytes());
//        String encryptHex = sm4.encryptHex(content);
//        String decryptStr = sm4.decryptStr("357b94ca60ce8140f3d22eceaaa5d71b0d25d6cd20c8218d9a3ddcd30881126d", CharsetUtil.CHARSET_UTF_8);
//        System.err.println(decryptStr);
 
//        accountLogin();
//        System.err.println(accountLogin);
//        getVehicleList(null, null, null);
//        getShipList(null, null, null);
//        queryRuntimeInfoByCache();
//        locationRealTimeInfoCache(0);
        
        
        List<VehicleOnline> vehicleOnlines = queryRuntimeInfoByCache(0);
        System.err.println(vehicleOnlines);
    }
    
//    public static void main(String[] args) {
////        SM4 sm4 = SmUtil.sm4("EP77VsBj9yeOKpcO".getBytes());
////        String encryptHex = sm4.encryptHex(content);
////        String decryptStr = sm4.decryptStr("357b94ca60ce8140f3d22eceaaa5d71b0d25d6cd20c8218d9a3ddcd30881126d", CharsetUtil.CHARSET_UTF_8);
////        System.err.println(decryptStr);
//
//        accountLogin();
//        System.err.println(accountLogin);
////        Integer integer2018 = cameraShot2018("041023412161", 5);
////        System.err.println(integer2018);
////        String cameraShotByFileId2018 = getCameraShotByFileId2018("041023412161", integer2018.toString());
////        System.err.println(cameraShotByFileId2018);
//        Integer integer2023 = cameraShot2023(918, 1, "00000000041033990843", 6);
//        System.err.println(integer2023);
//        String cameraShotByFileId2023 = getCameraShotByFileId2023("00000000041033990843", integer2023.toString());
//        System.err.println(cameraShotByFileId2023);
//
//    }
}