Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in / Register
Toggle navigation
N
NestQxsdBoot
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gaoxin
NestQxsdBoot
Commits
45887c43
Commit
45887c43
authored
Jul 07, 2025
by
tongzuqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
N个地方需要过滤非车辆的显示
parent
f55ddf28
Changes
25
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
566 additions
and
199 deletions
+566
-199
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/adapter/config/runner/WsApplicationRunner.java
.../core/qxsd/adapter/config/runner/WsApplicationRunner.java
+0
-9
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/adapter/web/EventDetailController.java
...cdp/boot/core/qxsd/adapter/web/EventDetailController.java
+42
-43
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/adapter/web/vo/event/EventHisRespVO.java
...p/boot/core/qxsd/adapter/web/vo/event/EventHisRespVO.java
+8
-3
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/adapter/ws/RealTimeEventWs1.java
...nest/lcdp/boot/core/qxsd/adapter/ws/RealTimeEventWs1.java
+1
-1
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/adapter/ws/RealTimeVehicleWs1.java
...st/lcdp/boot/core/qxsd/adapter/ws/RealTimeVehicleWs1.java
+1
-1
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/application/service/impl/EventDetailServiceImpl.java
...qxsd/application/service/impl/EventDetailServiceImpl.java
+7
-0
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/application/service/impl/HistoryServiceImpl.java
...ore/qxsd/application/service/impl/HistoryServiceImpl.java
+195
-42
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/domain/event/EventType.java
...cico/nest/lcdp/boot/core/qxsd/domain/event/EventType.java
+12
-0
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/domain/gateway/HistoryGateway.java
...st/lcdp/boot/core/qxsd/domain/gateway/HistoryGateway.java
+4
-4
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/domain/tunnel/TunnelDirectionEnums.java
...dp/boot/core/qxsd/domain/tunnel/TunnelDirectionEnums.java
+43
-0
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/infrastructure/common/utils/EventUtil.java
...boot/core/qxsd/infrastructure/common/utils/EventUtil.java
+31
-0
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/infrastructure/convertor/VehicleConvertor.java
.../core/qxsd/infrastructure/convertor/VehicleConvertor.java
+4
-4
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/infrastructure/gatewayimpl/HistoryGatewayImpl.java
...e/qxsd/infrastructure/gatewayimpl/HistoryGatewayImpl.java
+25
-24
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/infrastructure/gatewayimpl/VehicleGatewayImpl.java
...e/qxsd/infrastructure/gatewayimpl/VehicleGatewayImpl.java
+16
-3
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/infrastructure/gatewayimpl/database/EventDetailMapper.java
...nfrastructure/gatewayimpl/database/EventDetailMapper.java
+4
-0
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/infrastructure/gatewayimpl/database/dataobject/EventDetailDO.java
...ucture/gatewayimpl/database/dataobject/EventDetailDO.java
+51
-34
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/infrastructure/gatewayimpl/database/dataobject/EventHisDO.java
...structure/gatewayimpl/database/dataobject/EventHisDO.java
+80
-2
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/infrastructure/gatewayimpl/http/HistoryMapper.java
...e/qxsd/infrastructure/gatewayimpl/http/HistoryMapper.java
+2
-1
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/infrastructure/gatewayimpl/http/xlw/XlwAuthMapper.java
...sd/infrastructure/gatewayimpl/http/xlw/XlwAuthMapper.java
+1
-1
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/infrastructure/gatewayimpl/http/xlw/XlwHistoryMapper.java
...infrastructure/gatewayimpl/http/xlw/XlwHistoryMapper.java
+23
-23
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/infrastructure/gatewayimpl/http/xlw/dto/XlwBayonetPictureDTO.java
...ucture/gatewayimpl/http/xlw/dto/XlwBayonetPictureDTO.java
+2
-0
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/infrastructure/gatewayimpl/http/xlw/feign/XlwClientFeign.java
...astructure/gatewayimpl/http/xlw/feign/XlwClientFeign.java
+1
-1
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/infrastructure/gatewayimpl/ws/xlw/RealTimeEventWsClient.java
...rastructure/gatewayimpl/ws/xlw/RealTimeEventWsClient.java
+1
-0
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/infrastructure/gatewayimpl/ws/xlw/dto/XlwRealTimeEventDTO.java
...structure/gatewayimpl/ws/xlw/dto/XlwRealTimeEventDTO.java
+5
-1
发布测试环境v2版本.sh
发布测试环境v2版本.sh
+7
-2
No files found.
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/adapter/config/runner/WsApplicationRunner.java
View file @
45887c43
...
...
@@ -85,15 +85,6 @@ public class WsApplicationRunner implements ApplicationRunner {
//realTimeEventWsClient.connectAndHandleMessage("ws://ucloud.weisea.xyz:8888/pushx/client/event",tunnelDownId);
//realTimeVehicleWsClient.connectAndHandleMessage(xlwWsUrl + "/client/carInfo",tunnelDownId,"下行");
try
{
//测试本地
realTimeEventWsClient
.
connectAndHandleMessage
(
"ws://127.0.0.1:8765"
,
tunnelUpId
);
realTimeVehicleWsClient
.
connectAndHandleMessage
(
"ws://127.0.0.1:8766"
,
tunnelUpId
,
"上行"
,
215808
);
}
catch
(
Exception
e
)
{
log
.
error
(
"=============ws异常:没有开启本地python的ws服务,如需测试请开启本地python的ws服务!=============="
);
}
//将第三方事件设置为完成状态
}
catch
(
Exception
e
)
{
log
.
error
(
"=============ws异常:{}=============="
,
e
.
getMessage
());
...
...
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/adapter/web/EventDetailController.java
View file @
45887c43
...
...
@@ -21,6 +21,7 @@ import com.cico.nest.lcdp.boot.core.qxsd.infrastructure.common.constatnt.XlwCons
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.common.result.XlwResultData
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.database.EventDetailMapper
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.database.dataobject.EventDetailDO
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.database.dataobject.EventHisDO
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.http.ISdgkApiService
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.http.sdgk.dto.SdgkEventAlarmDTO
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.http.xlw.XlwEventMapper
;
...
...
@@ -196,57 +197,55 @@ public class EventDetailController {
log
.
info
(
"告警的弹窗,详情:{},耗时:{}毫秒"
,
id
,
System
.
currentTimeMillis
()
-
startTimeDetail
);
long
startTimeHis
=
System
.
currentTimeMillis
();
vo
.
setEventHisRespVO
(
getEventHisDetail
(
id
).
getData
());
// 这个页面不需要这个字段,这个字段太大,没必要加载
vo
.
getEventHisRespVO
().
setHisVehicleInfo
(
null
);
log
.
info
(
"告警的弹窗,历史:{},耗时:{}毫秒"
,
id
,
System
.
currentTimeMillis
()
-
startTimeHis
);
// 额外处理
long
startTimeOther
=
System
.
currentTimeMillis
();
vo
.
getEventDetailRespVO
().
getCarInfoList
().
forEach
(
carInfo
->{
//危是否化品车辆,枚举:0否、1是
carInfo
.
setIsDangerous
(
carInfo
.
getVehicleType
()==
0
);
//是否重点标记
if
(
StringUtils
.
isNotEmpty
(
carInfo
.
getCarId
())){
//取交集(当前重点标记的车辆)
String
redisStr
=
stringRedisTemplate
.
opsForValue
().
get
(
RedisConstants
.
REDIS_FOCUS_VEHICLE_MARK_KEY
+
carInfo
.
getCarId
());
if
(
StringUtils
.
isNotEmpty
(
redisStr
)
&&
redisStr
.
equals
(
carInfo
.
getCarId
())){
carInfo
.
setIsFocusMark
(
true
);
}
}
// 查询实时车流如果不存在说明已经驶出隧道,否则还在隧道内
String
realTimeVehicleJson
=
stringRedisTemplate
.
opsForValue
().
get
(
RedisConstants
.
REDIS_REAL_TIME_VEHICLE_KEY
.
concat
(
vo
.
getEventDetailRespVO
().
getTunnelId
()));
TunnelRealTimeVehicle
realTimeVehicle
=
JSONObject
.
parseObject
(
realTimeVehicleJson
,
TunnelRealTimeVehicle
.
class
);
if
(
Objects
.
nonNull
(
realTimeVehicle
)
&&
CollectionUtils
.
isNotEmpty
(
realTimeVehicle
.
getVehicleInfoList
()))
{
realTimeVehicle
.
getVehicleInfoList
().
forEach
(
vehicleInfo
->
{
if
(
carInfo
.
getCarId
().
equals
(
vehicleInfo
.
getCarId
()))
{
carInfo
.
setIsDriveTunnel
(
true
);
if
(
CollectionUtils
.
isNotEmpty
(
vo
.
getEventDetailRespVO
().
getCarInfoList
())){
vo
.
getEventDetailRespVO
().
getCarInfoList
().
forEach
(
carInfo
->{
//危是否化品车辆,枚举:0否、1是
carInfo
.
setIsDangerous
(
carInfo
.
getVehicleType
()==
0
);
//是否重点标记
if
(
StringUtils
.
isNotEmpty
(
carInfo
.
getCarId
())){
//取交集(当前重点标记的车辆)
String
redisStr
=
stringRedisTemplate
.
opsForValue
().
get
(
RedisConstants
.
REDIS_FOCUS_VEHICLE_MARK_KEY
+
carInfo
.
getCarId
());
if
(
StringUtils
.
isNotEmpty
(
redisStr
)
&&
redisStr
.
equals
(
carInfo
.
getCarId
())){
carInfo
.
setIsFocusMark
(
true
);
}
});
}
Map
<
String
,
String
>
map
=
new
HashMap
<>(
8
);
if
(
CollectionUtils
.
isNotEmpty
(
vo
.
getEventHisRespVO
().
getVehicleInTunnelTime
())){
for
(
Object
o
:
vo
.
getEventHisRespVO
().
getVehicleInTunnelTime
()){
Map
<
String
,
String
>
tempMap
=
(
Map
<
String
,
String
>)
o
;
map
.
putAll
(
tempMap
);
}
}
String
dateStr
=
map
.
get
(
carInfo
.
getCarPlate
());
carInfo
.
setInTunnelTimeStr
(
dateStr
);
// 车辆还在隧道内
if
(
carInfo
.
getIsDriveTunnel
()){
if
(
StringUtils
.
isNotEmpty
(
dateStr
)){
try
{
Date
date
=
DateUtil
.
parse
(
dateStr
,
"yyyy-MM-dd HH:mm:ss"
);
long
diffMinTime
=
((
System
.
currentTimeMillis
()
-
date
.
getTime
())/
1000
/
60
);
if
(
diffMinTime
<
0
){
diffMinTime
=
0
;
// 查询实时车流如果不存在说明已经驶出隧道,否则还在隧道内
String
realTimeVehicleJson
=
stringRedisTemplate
.
opsForValue
().
get
(
RedisConstants
.
REDIS_REAL_TIME_VEHICLE_KEY
.
concat
(
vo
.
getEventDetailRespVO
().
getTunnelId
()));
TunnelRealTimeVehicle
realTimeVehicle
=
JSONObject
.
parseObject
(
realTimeVehicleJson
,
TunnelRealTimeVehicle
.
class
);
if
(
Objects
.
nonNull
(
realTimeVehicle
)
&&
CollectionUtils
.
isNotEmpty
(
realTimeVehicle
.
getVehicleInfoList
()))
{
realTimeVehicle
.
getVehicleInfoList
().
forEach
(
vehicleInfo
->
{
if
(
carInfo
.
getCarId
().
equals
(
vehicleInfo
.
getCarId
()))
{
carInfo
.
setIsDriveTunnel
(
true
);
}
carInfo
.
setRetainedMinutesTime
((
int
)
diffMinTime
);
}
catch
(
Exception
e
)
{
log
.
error
(
"时间格式转换异常,his车辆入隧时间"
,
e
);
}
});
}
EventHisDO
.
EventHisExpandInfo
x
=
EventHisDO
.
getEventHisExpandInfo
(
vo
.
getEventHisRespVO
().
getExpandInfo
(),
carInfo
.
getCarPlate
());
carInfo
.
setInTunnelTimeStr
(
x
.
getVehicleInTunnelTime
());
carInfo
.
setCarImageUrl
(
x
.
getSmallSideImage
());
// 车辆还在隧道内
if
(
carInfo
.
getIsDriveTunnel
()){
if
(
StringUtils
.
isNotEmpty
(
x
.
getVehicleInTunnelTime
())){
try
{
Date
date
=
DateUtil
.
parse
(
x
.
getVehicleInTunnelTime
(),
"yyyy-MM-dd HH:mm:ss"
);
long
diffMinTime
=
((
System
.
currentTimeMillis
()
-
date
.
getTime
())/
1000
/
60
);
if
(
diffMinTime
<
0
){
diffMinTime
=
0
;
}
carInfo
.
setRetainedMinutesTime
((
int
)
diffMinTime
);
}
catch
(
Exception
e
)
{
log
.
error
(
"时间格式转换异常,his车辆入隧时间"
,
e
);
}
}
}
log
.
info
(
"告警的弹窗,其他处理:{},耗时:{}毫秒"
,
id
,
System
.
currentTimeMillis
()
-
startTimeOther
);
});
}
log
.
info
(
"告警的弹窗,其他处理:{},耗时:{}毫秒"
,
id
,
System
.
currentTimeMillis
()
-
startTimeOther
);
});
}
return
success
(
vo
);
}
...
...
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/adapter/web/vo/event/EventHisRespVO.java
View file @
45887c43
package
com
.
cico
.
nest
.
lcdp
.
boot
.
core
.
qxsd
.
adapter
.
web
.
vo
.
event
;
import
com.alibaba.fastjson2.JSONArray
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.database.dataobject.EventHisDO
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
...
...
@@ -21,11 +24,13 @@ public class EventHisRespVO {
@Schema
(
description
=
"事件id"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
String
eventId
;
/**
* 车辆入隧时间
* 拓展对象 {@link EventHisDO.EventHisExpandInfo}
*
*/
@
Schema
(
description
=
"车辆入隧时间"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
JSONArray
vehicleInTunnelTime
;
@
TableField
(
typeHandler
=
JacksonTypeHandler
.
class
)
private
JSONArray
expandInfo
;
/**
* 历史车辆轨迹
*/
...
...
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/adapter/ws/RealTimeEventWs1.java
View file @
45887c43
...
...
@@ -21,7 +21,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
@Component
@ServerEndpoint
(
value
=
"/qxsd/realTimeEvent1"
)
public
class
RealTimeEventWs1
extends
AbstractRealTimeEventWs
{
Logger
logger
=
LoggerFactory
.
getLogger
(
RealTimeVehicleWs
.
class
);
Logger
logger
=
LoggerFactory
.
getLogger
(
RealTimeVehicleWs
1
.
class
);
private
final
static
List
<
Session
>
sessionList
=
new
CopyOnWriteArrayList
<>();
...
...
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/adapter/ws/RealTimeVehicleWs1.java
View file @
45887c43
...
...
@@ -23,7 +23,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
@ServerEndpoint
(
value
=
"/qxsd/realTimeCar1"
)
public
class
RealTimeVehicleWs1
extends
AbstractRealTimeVehicleWs
{
Logger
logger
=
LoggerFactory
.
getLogger
(
RealTimeVehicleWs
.
class
);
Logger
logger
=
LoggerFactory
.
getLogger
(
RealTimeVehicleWs
1
.
class
);
private
final
static
List
<
Session
>
sessionList
=
new
CopyOnWriteArrayList
<>();
...
...
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/application/service/impl/EventDetailServiceImpl.java
View file @
45887c43
...
...
@@ -165,6 +165,13 @@ public class EventDetailServiceImpl implements EventDetailService {
if
(
StrUtil
.
isNotBlank
(
videoPath
)
&&
!
videoPath
.
contains
(
"error"
)){
respVO
.
setVideoPath
(
staticResourceEventHisVideoPath
+
videoPath
);
}
//拓展对象
for
(
int
i
=
0
;
i
<
respVO
.
getExpandInfo
().
size
();
i
++)
{
EventHisDO
.
EventHisExpandInfo
x
=
EventHisDO
.
getEventHisExpandInfo
(
respVO
.
getExpandInfo
(),
respVO
.
getExpandInfo
().
getJSONObject
(
i
).
getString
(
"carPlate"
));
x
.
setSmallSideImage
(
staticResourceBayonetImagesPath
+
x
.
getSmallSideImage
());
respVO
.
setExpandInfo
(
EventHisDO
.
setEventHisExpandInfo
(
respVO
.
getExpandInfo
(),
x
));
}
}
return
respVO
;
}
...
...
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/application/service/impl/HistoryServiceImpl.java
View file @
45887c43
This diff is collapsed.
Click to expand it.
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/domain/event/EventType.java
View file @
45887c43
...
...
@@ -4,6 +4,7 @@ import lombok.Data;
import
lombok.experimental.Accessors
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -82,6 +83,17 @@ public enum EventType {
map
.
put
(
"其他"
,
new
TypeStatistics
().
setTypes
(
List
.
of
(
100
,
99
,
15
)));
return
map
;
}
/**
* 获取非机动车事件类型
* @return
*/
public
static
List
<
Integer
>
getTypeNonVehicle
(){
// 行人、火灾、异常天气、无事件、其他
return
Arrays
.
asList
(
12
,
14
,
15
,
99
,
100
);
}
@Data
@Accessors
(
chain
=
true
)
public
static
class
TypeStatistics
{
...
...
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/domain/gateway/HistoryGateway.java
View file @
45887c43
...
...
@@ -2,6 +2,7 @@ package com.cico.nest.lcdp.boot.core.qxsd.domain.gateway;
import
com.cico.nest.lcdp.boot.core.qxsd.adapter.web.request.LocusDataRequest
;
import
com.cico.nest.lcdp.boot.core.qxsd.domain.vehicle.HistoryTunnelVehicle
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.database.dataobject.EventHisDO
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.database.dataobject.TunnelDeviceDO
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.http.xlw.dto.XlwHolographicTimeHistoryDTO
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.ws.xlw.dto.XlwRealTimeVehicleDTO
;
...
...
@@ -29,7 +30,7 @@ public interface HistoryGateway {
* @param eventStartTime 事件开始时间
* @return 图片路径
*/
List
<
String
>
saveBayonetImage
(
String
carPlate
,
Date
eventStartTime
);
EventHisDO
.
EventHisExpandInfo
saveBayonetImage
(
String
carPlate
,
Date
eventStartTime
);
/**
* 获取设备信息
...
...
@@ -43,11 +44,10 @@ public interface HistoryGateway {
* @param cameraIndexCode 海康摄像机唯一编号
* @return 视频数据
*/
String
saveVideo
(
String
cameraIndexCode
,
String
beginTime
,
String
endTime
,
String
outputFil
e
);
String
getVideoRtspUrl
(
String
cameraIndexCode
,
String
beginTime
,
String
endTim
e
);
/**
* 获取事件车辆信息
* @param eventId 事件id
* 获取历史车辆轨迹
* @return 车辆数据
*/
List
<
HistoryTunnelVehicle
>
getVehicleInfo
(
LocusDataRequest
locusDataRequest
);
...
...
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/domain/tunnel/TunnelDirectionEnums.java
0 → 100644
View file @
45887c43
package
com
.
cico
.
nest
.
lcdp
.
boot
.
core
.
qxsd
.
domain
.
tunnel
;
/**
* 设施隧道类型
* 隧道类型 0双洞双向1单洞双向2单洞单向
* @author rfx
* @date 2024/11/12
*/
public
enum
TunnelDirectionEnums
{
//100700上行/100701下行'
up
(
"100700"
,
"上行"
),
down
(
"100701"
,
"下行"
),;
public
final
String
type
;
public
final
String
desc
;
TunnelDirectionEnums
(
String
type
,
String
desc
){
this
.
desc
=
desc
;
this
.
type
=
type
;
}
public
static
String
getDesc
(
String
type
){
String
desc
=
""
;
for
(
TunnelDirectionEnums
t:
TunnelDirectionEnums
.
values
()){
if
(
type
.
equals
(
t
.
type
)){
desc
=
t
.
desc
;
}
}
return
desc
;
}
public
static
String
getType
(
String
desc
){
String
type
=
""
;
for
(
TunnelDirectionEnums
t:
TunnelDirectionEnums
.
values
()){
if
(
desc
.
equals
(
t
.
desc
)){
type
=
t
.
type
;
}
}
return
type
;
}
}
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/infrastructure/common/utils/EventUtil.java
0 → 100644
View file @
45887c43
package
com
.
cico
.
nest
.
lcdp
.
boot
.
core
.
qxsd
.
infrastructure
.
common
.
utils
;
import
com.cico.nest.lcdp.boot.core.qxsd.domain.event.EventType
;
import
java.util.Arrays
;
import
java.util.List
;
/**
* @author tongzuqi
* @create 2025/7/7 9:23 AM
*/
public
class
EventUtil
{
/**
* 定义错误的车牌号
*/
public
static
List
<
String
>
CAR_PLATE_ERROR_LIST
=
Arrays
.
asList
(
"人"
,
"未知"
,
"默A00000"
);
/**
* 判断非车辆相关事件
* 比如:
* @return boolean true 非车辆事件 false 车辆相关事件
*/
public
static
boolean
isNonVehicle
(
Integer
eventType
){
//List<String> carPlateList,
if
(
EventType
.
getTypeNonVehicle
().
contains
(
eventType
)){
return
true
;
}
return
false
;
}
}
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/infrastructure/convertor/VehicleConvertor.java
View file @
45887c43
...
...
@@ -121,11 +121,11 @@ public class VehicleConvertor {
return
tunnelRealTimeVehicle
;
}
public
static
List
<
HistoryTunnelVehicle
>
convert2HistoryTunnelVehicle
(
List
<
XlwHolographicTimeHistoryDTO
>
dto
,
String
tunnelId
,
String
direction
,
int
startMilestone
){
public
static
List
<
HistoryTunnelVehicle
>
convert2HistoryTunnelVehicle
(
List
<
XlwHolographicTimeHistoryDTO
>
dto
,
String
tunnelId
,
String
direction
,
String
startMilestone
){
return
dto
.
stream
().
map
(
e
->
VehicleConvertor
.
convert2HistoryTunnelVehicle
(
e
,
tunnelId
,
direction
,
startMilestone
)).
toList
();
}
public
static
HistoryTunnelVehicle
convert2HistoryTunnelVehicle
(
XlwHolographicTimeHistoryDTO
dto
,
String
tunnelId
,
String
direction
,
int
startMilestone
)
{
public
static
HistoryTunnelVehicle
convert2HistoryTunnelVehicle
(
XlwHolographicTimeHistoryDTO
dto
,
String
tunnelId
,
String
direction
,
String
startMilestone
)
{
HistoryTunnelVehicle
historyTunnelVehicle
=
new
HistoryTunnelVehicle
();
historyTunnelVehicle
.
setTime
(
dto
.
getTime
());
List
<
XlwRealTimeVehicleDTO
.
CarInfo
>
carInfo
=
dto
.
getFrame
();
...
...
@@ -146,7 +146,7 @@ public class VehicleConvertor {
vehicleInfo
.
setHeadImageUrl
(
xlwCarInfo
.
getHeadImage
());
vehicleInfo
.
setPlateImageUrl
(
xlwCarInfo
.
getPlateImage
());
//车辆桩米号
vehicleInfo
.
setCarMilestone
((
int
)
(
xlwCarInfo
.
getOriginDistance
()
+
startMilestone
));
vehicleInfo
.
setCarMilestone
((
int
)
(
xlwCarInfo
.
getOriginDistance
()
+
Integer
.
parseInt
(
startMilestone
)
));
//车辆类型
Integer
vehicleType
=
VehicleConvertor
.
convert2VehicleType
(
xlwCarInfo
);
vehicleInfo
.
setTunnelId
(
tunnelId
);
...
...
@@ -158,7 +158,7 @@ public class VehicleConvertor {
vehicleInfo
.
setRetainedMinutesTime
((
int
)
diffMinTime
);
}
//进入隧道时间转换
vehicleInfo
.
setInTunnelTime
(
"2024-01-01 24:00:00"
);
//
vehicleInfo.setInTunnelTime("2024-01-01 24:00:00");
if
(
Objects
.
nonNull
(
xlwCarInfo
.
getInTunnelTime
())){
Date
date
=
DateUtil
.
date
(
xlwCarInfo
.
getInTunnelTime
());
String
format
=
DateUtil
.
format
(
date
,
DateUtils
.
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
);
...
...
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/infrastructure/gatewayimpl/HistoryGatewayImpl.java
View file @
45887c43
...
...
@@ -14,11 +14,16 @@ import com.cico.nest.lcdp.boot.core.qxsd.infrastructure.common.result.XlwResultD
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.convertor.VehicleConvertor
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.database.TunnelDeviceMapper
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.database.TunnelEquipmentMapper
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.database.dataobject.EventHisDO
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.database.dataobject.TunnelDeviceDO
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.database.dataobject.TunnelEquipmentDO
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.http.HistoryMapper
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.http.hk.HkVideoMapper
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.http.xlw.dto.XlwHolographicTimeHistoryDTO
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.http.xlw.dto.XlwPageDTO
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.http.xlw.dto.XlwPassingProfileDTO
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.http.xlw.dto.XlwPassingProfileSearchDTO
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.http.xlw.feign.XlwClientFeign
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.ws.xlw.dto.XlwRealTimeVehicleDTO
;
import
com.cico.nest.lcdp.boot.core.system.dal.dataobject.social.SocialUserDO
;
import
jakarta.annotation.Resource
;
...
...
@@ -50,8 +55,8 @@ public class HistoryGatewayImpl implements HistoryGateway {
private
TunnelDeviceMapper
tunnelDeviceMapper
;
@Resource
private
HkVideoMapper
hkVideoMapper
;
@
Value
(
"${qxsd.video.eventHisSavePath}"
)
private
String
eventHisSaveVideoPath
;
@
Resource
private
XlwClientFeign
xlwClientFeign
;
@Override
public
String
saveEventImage
(
String
urlPath
)
{
...
...
@@ -59,7 +64,7 @@ public class HistoryGatewayImpl implements HistoryGateway {
}
@Override
public
List
<
String
>
saveBayonetImage
(
String
carPlate
,
Date
eventStartTime
)
{
public
EventHisDO
.
EventHisExpandInfo
saveBayonetImage
(
String
carPlate
,
Date
eventStartTime
)
{
return
historyMapper
.
saveBayonetImage
(
carPlate
,
eventStartTime
);
}
...
...
@@ -67,13 +72,19 @@ public class HistoryGatewayImpl implements HistoryGateway {
@Override
public
TunnelDeviceDO
getDevice
(
String
tunnelCode
,
String
holeId
,
Integer
deviceMilestone
,
Integer
direction
)
{
TunnelDeviceDO
tunnelDeviceDO
=
tunnelDeviceMapper
.
selectOne
(
new
LambdaQueryWrapper
<
TunnelDeviceDO
>()
.
eq
(
TunnelDeviceDO:
:
getTunnelCode
,
tunnelCode
)
.
eq
(
TunnelDeviceDO:
:
getHoleId
,
holeId
)
.
eq
(
TunnelDeviceDO:
:
getDirectionUpdown
,
direction
)
.
eq
(
TunnelDeviceDO:
:
getCameraLable
,
1
)
.
gt
(
TunnelDeviceDO:
:
getMileStart
,
deviceMilestone
)
,
false
);
LambdaQueryWrapper
<
TunnelDeviceDO
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
<
TunnelDeviceDO
>()
.
eq
(
TunnelDeviceDO:
:
getTunnelCode
,
tunnelCode
)
.
eq
(
TunnelDeviceDO:
:
getHoleId
,
holeId
)
.
eq
(
TunnelDeviceDO:
:
getDirectionUpdown
,
direction
)
.
eq
(
TunnelDeviceDO:
:
getCameraLable
,
1
);
if
(
direction
==
100700
){
lambdaQueryWrapper
.
gt
(
TunnelDeviceDO:
:
getMileStart
,
deviceMilestone
);
lambdaQueryWrapper
.
orderByAsc
(
TunnelDeviceDO:
:
getMileStart
);
}
else
{
lambdaQueryWrapper
.
lt
(
TunnelDeviceDO:
:
getMileStart
,
deviceMilestone
);
lambdaQueryWrapper
.
orderByDesc
(
TunnelDeviceDO:
:
getMileStart
);
}
TunnelDeviceDO
tunnelDeviceDO
=
tunnelDeviceMapper
.
selectOne
(
lambdaQueryWrapper
,
false
);
// 摄像头 查询几个点
// 同一个tunnel_code,hole_id,上下行方向:100700上行/100701下行
// camera_lable(摄像机标签) = 1(全息相机)
...
...
@@ -86,30 +97,20 @@ public class HistoryGatewayImpl implements HistoryGateway {
}
@Override
public
String
saveVideo
(
String
cameraIndexCode
,
String
beginTime
,
String
endTime
,
String
outputFil
e
)
{
public
String
getVideoRtspUrl
(
String
cameraIndexCode
,
String
beginTime
,
String
endTim
e
)
{
String
hkVideoResultDataStr
=
hkVideoMapper
.
getPlaybackURLs
(
cameraIndexCode
,
beginTime
,
endTime
);
HkVideoResultData
hkVideoResultData
=
JSONObject
.
parseObject
(
hkVideoResultDataStr
,
HkVideoResultData
.
class
);
Object
urlObject
=
hkVideoResultData
.
getData
().
get
(
"url"
);
if
(
Objects
.
nonNull
(
urlObject
)){
try
{
videoPuller
(
urlObject
.
toString
(),
eventHisSaveVideoPath
+
"/"
+
outputFile
);
return
outputFile
;
}
catch
(
Exception
e
)
{
return
"error保存回放视频流失败"
;
}
return
urlObject
.
toString
();
}
return
"error获取回放视频流失败"
;
}
@Override
public
List
<
HistoryTunnelVehicle
>
getVehicleInfo
(
LocusDataRequest
locusDataRequest
)
{
// List<XlwHolographicTimeHistoryDTO> xlwHistoryEventList = historyMapper.getVehicleInfo(guid);
// if(CollUtil.isEmpty(xlwHistoryEventList)){
// log.error("获取事件全息回放数据为空,guid:{}", guid);
// return new ArrayList<>();
// }
// return VehicleConvertor.convert2HistoryTunnelVehicle(xlwHistoryEventList,tunnelId,direction,startMilestone);
// 2025-06 说让调用 4.5 todo
//再调用 4.5 获取车辆全息回放数据接口 获取 入口开始时间 和 结束时间
return
vehicleGateway
.
getCarLocusData
(
locusDataRequest
);
}
...
...
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/infrastructure/gatewayimpl/VehicleGatewayImpl.java
View file @
45887c43
...
...
@@ -11,7 +11,9 @@ import com.cico.nest.lcdp.boot.core.qxsd.adapter.web.request.PassingProfileReque
import
com.cico.nest.lcdp.boot.core.qxsd.adapter.web.vo.PassProfileImageVO
;
import
com.cico.nest.lcdp.boot.core.qxsd.adapter.web.vo.PassingProfileVO
;
import
com.cico.nest.lcdp.boot.core.qxsd.adapter.ws.*
;
import
com.cico.nest.lcdp.boot.core.qxsd.application.service.TunnelHoleService
;
import
com.cico.nest.lcdp.boot.core.qxsd.domain.gateway.VehicleGateway
;
import
com.cico.nest.lcdp.boot.core.qxsd.domain.tunnel.TunnelDirectionEnums
;
import
com.cico.nest.lcdp.boot.core.qxsd.domain.vehicle.HistoryTunnelVehicle
;
import
com.cico.nest.lcdp.boot.core.qxsd.domain.vehicle.TunnelRealTimeVehicle
;
import
com.cico.nest.lcdp.boot.core.qxsd.domain.vehicle.VehicleInfo
;
...
...
@@ -21,6 +23,7 @@ import com.cico.nest.lcdp.boot.core.qxsd.infrastructure.common.result.XlwResultD
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.convertor.VehicleConvertor
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.database.TunnelDetailMapper
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.database.dataobject.TunnelDetailDO
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.database.dataobject.TunnelHoleV2DO
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.http.xlw.dto.*
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.http.xlw.feign.XlwClientFeign
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.ws.xlw.RealTimeVehicleWsClient
;
...
...
@@ -62,6 +65,9 @@ public class VehicleGatewayImpl implements VehicleGateway {
@Resource
private
TunnelDetailMapper
tunnelDetailMapper
;
@Resource
private
TunnelHoleService
tunnelHoleService
;
public
final
Map
<
String
,
IRealTimeWs
>
realTimeWsMap
=
new
ConcurrentHashMap
<>();
@Override
...
...
@@ -185,10 +191,17 @@ public class VehicleGatewayImpl implements VehicleGateway {
log
.
error
(
"调用4.5接口获取车辆轨迹数据为空,返回值:{}"
,
resultData
.
getMessage
());
return
new
ArrayList
<>();
}
log
.
info
(
"调用4.5接口,开始时间:{},结束时间:{},{}条"
,
request
.
getStartTime
(),
request
.
getEndTime
(),
resultData
.
getData
().
size
()
);
List
<
XlwHolographicTimeHistoryDTO
>
dtos
=
resultData
.
getData
();
TunnelDetailDO
tunnelDetailDO
=
tunnelDetailMapper
.
selectById
(
request
.
getTunnelId
());
dtos
=
dtos
.
stream
().
filter
(
s
->
tunnelDetailDO
.
getXlwTunnelId
().
equals
(
s
.
getTunnelId
())).
toList
();
return
VehicleConvertor
.
convert2HistoryTunnelVehicle
(
dtos
,
request
.
getTunnelId
(),
tunnelDetailDO
.
getDirection
(),
tunnelDetailDO
.
getStartMilestone
());
TunnelHoleV2DO
tunnelHoleV2DO
=
tunnelHoleService
.
getTunnelSfHoleId
(
request
.
getTunnelId
());
if
(
Objects
.
isNull
(
tunnelHoleV2DO
)){
log
.
error
(
"tunnelHoleV2DO 空,参数:{}"
,
request
.
getTunnelId
());
return
new
ArrayList
<>();
}
//dtos = dtos.stream().filter(s->request.getTunnelId().equals(s.getTunnelId())).toList();
return
VehicleConvertor
.
convert2HistoryTunnelVehicle
(
dtos
,
request
.
getTunnelId
(),
TunnelDirectionEnums
.
getDesc
(
tunnelHoleV2DO
.
getDirectionUpdown
())
,
tunnelHoleV2DO
.
getMileStart
());
}
public
IRealTimeWs
getRealTimeWs
(
String
tunnelId
){
...
...
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/infrastructure/gatewayimpl/database/EventDetailMapper.java
View file @
45887c43
...
...
@@ -4,6 +4,7 @@ import java.util.*;
import
cn.hutool.core.collection.CollUtil
;
import
com.cico.nest.lcdp.boot.core.qxsd.adapter.web.vo.event.EventDetailPageReqVO
;
import
com.cico.nest.lcdp.boot.core.qxsd.domain.event.EventStatus
;
import
com.cico.nest.lcdp.boot.core.qxsd.domain.event.ThirdEventStatus
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.database.dataobject.EventDetailDO
;
import
com.cico.nest.lcdp.framework.common.pojo.PageResult
;
...
...
@@ -75,7 +76,10 @@ public interface EventDetailMapper extends BaseMapperX<EventDetailDO> {
default
List
<
EventDetailDO
>
selectByTunnelIdAndThirdEventStatusNotFinish
(
String
tunnelId
)
{
LambdaQueryWrapperX
<
EventDetailDO
>
wrapper
=
new
LambdaQueryWrapperX
<>();
//三方状态!=结束 0结束、1预警、2处理中
wrapper
.
ne
(
EventDetailDO:
:
getThirdEventStatus
,
ThirdEventStatus
.
finished
.
type
);
//事件状态!=处置完成 0待处置1处置中2已处置3待处置-已读
wrapper
.
ne
(
EventDetailDO:
:
getEventStatus
,
EventStatus
.
disposing_end
.
type
);
wrapper
.
eq
(
EventDetailDO:
:
getTunnelId
,
tunnelId
);
return
selectList
(
wrapper
);
}
...
...
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/infrastructure/gatewayimpl/database/dataobject/EventDetailDO.java
View file @
45887c43
...
...
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import
com.cico.nest.lcdp.boot.core.qxsd.adapter.web.vo.event.EventDetailRespVO
;
import
com.cico.nest.lcdp.boot.core.qxsd.application.service.TunnelDetailService
;
import
com.cico.nest.lcdp.boot.core.qxsd.domain.event.EventType
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.common.utils.EventUtil
;
import
com.cico.nest.lcdp.framework.common.util.date.DateUtils
;
import
com.cico.nest.lcdp.framework.mybatis.core.type.StringListTypeHandler
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
...
...
@@ -47,6 +48,10 @@ public class EventDetailDO {
* 隧道id-(目前保存的是隧道信息的id)
*/
private
String
tunnelId
;
/**
* xlw隧道id
*/
private
String
xlwTunnelId
;
/**
* 所属隧道id
*/
...
...
@@ -197,6 +202,11 @@ public class EventDetailDO {
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
java
.
util
.
Date
updateTime
;
/**
* 轨迹ID
*/
private
String
trackId
;
@Data
public
static
class
EventCarInfo
{
/**
...
...
@@ -257,91 +267,98 @@ public class EventDetailDO {
* 进隧道时间
*/
private
String
inTunnelTimeStr
;
/**
* 车辆图片
*/
private
String
carImageUrl
;
}
public
static
EventDetailRespVO
convert2VO
(
EventDetailDO
eventDetail
,
String
xlwImagePath
){
if
(
eventDetail
==
null
)
{
public
static
EventDetailRespVO
convert2VO
(
EventDetailDO
eventDetail
,
String
xlwImagePath
)
{
if
(
eventDetail
==
null
)
{
return
null
;
}
EventDetailRespVO
eventDetailRespVO
=
new
EventDetailRespVO
();
org
.
springframework
.
beans
.
BeanUtils
.
copyProperties
(
eventDetail
,
eventDetailRespVO
);
org
.
springframework
.
beans
.
BeanUtils
.
copyProperties
(
eventDetail
,
eventDetailRespVO
);
//车牌号码
List
<
String
>
carPlateList
=
eventDetail
.
getEventCarPlate
();
carPlateList
=
carPlateList
.
stream
().
filter
(
carPlate
->!
"默A00000"
.
equal
s
(
carPlate
)).
toList
();
carPlateList
=
carPlateList
.
stream
().
filter
(
carPlate
->
!
EventUtil
.
CAR_PLATE_ERROR_LIST
.
contain
s
(
carPlate
)).
toList
();
eventDetailRespVO
.
setEventCarPlate
(
carPlateList
);
if
(
Objects
.
nonNull
(
eventDetail
.
getCarInfoList
()))
{
eventDetailRespVO
.
setCarInfoList
(
JSONArray
.
parseArray
(
eventDetail
.
getCarInfoList
().
toJSONString
(),
EventCarInfo
.
class
));
if
(
Objects
.
nonNull
(
eventDetail
.
getCarInfoList
()))
{
eventDetailRespVO
.
setCarInfoList
(
JSONArray
.
parseArray
(
eventDetail
.
getCarInfoList
().
toJSONString
(),
EventCarInfo
.
class
));
}
Date
endTime
=
Objects
.
isNull
(
eventDetail
.
getEventEndTime
())
?
new
Date
()
:
eventDetail
.
getEventEndTime
();
long
diffSecond
=
DateUtils
.
diff
(
endTime
,
eventDetail
.
getEventStartTime
())/
1000
;
int
second
=
(
int
)
diffSecond
%
60
;
int
minute
=
(
int
)
diffSecond
/
60
;
eventDetailRespVO
.
setRetainedTime
(
minute
+
"分"
+
second
+
"秒"
);
if
(
minute
>
60
)
{
long
diffSecond
=
DateUtils
.
diff
(
endTime
,
eventDetail
.
getEventStartTime
())
/
1000
;
int
second
=
(
int
)
diffSecond
%
60
;
int
minute
=
(
int
)
diffSecond
/
60
;
eventDetailRespVO
.
setRetainedTime
(
minute
+
"分"
+
second
+
"秒"
);
if
(
minute
>
60
)
{
int
hour
=
minute
/
60
;
minute
=
minute
%
60
;
eventDetailRespVO
.
setRetainedTime
(
hour
+
"小时"
+
minute
+
"分"
);
if
(
hour
>
24
)
{
eventDetailRespVO
.
setRetainedTime
(
hour
+
"小时"
+
minute
+
"分"
);
if
(
hour
>
24
)
{
int
day
=
hour
/
24
;
hour
=
hour
%
24
;
eventDetailRespVO
.
setRetainedTime
(
day
+
"天"
+
hour
+
"小时"
);
eventDetailRespVO
.
setRetainedTime
(
day
+
"天"
+
hour
+
"小时"
);
}
}
String
singMultiCar
=
""
;
if
(
eventDetail
.
getCarInfoList
()!=
null
)
{
if
(
eventDetail
.
getCarInfoList
().
size
()
>
1
)
{
if
(
eventDetail
.
getCarInfoList
()
!=
null
)
{
if
(
eventDetail
.
getCarInfoList
().
size
()
>
1
)
{
singMultiCar
=
"多车"
;
eventDetailRespVO
.
setSingleMultiCar
(
"多车"
);
}
else
{
}
else
{
eventDetailRespVO
.
setSingleMultiCar
(
"单车"
);
singMultiCar
=
"单车"
;
singMultiCar
=
"单车"
;
}
}
String
eventSituation
=
""
;
TunnelDetailService
tunnelDetailService
=
SpringUtil
.
getBean
(
TunnelDetailService
.
class
);
TunnelDetailDO
tunnelDetailDO
=
tunnelDetailService
.
getTunnelDetail
(
eventDetail
.
getTunnelId
());
if
(
Objects
.
nonNull
(
tunnelDetailDO
))
{
eventSituation
=
eventSituation
.
concat
(
tunnelDetailDO
.
getTunnelName
())
if
(
Objects
.
nonNull
(
tunnelDetailDO
))
{
eventSituation
=
eventSituation
.
concat
(
tunnelDetailDO
.
getTunnelName
())
.
concat
(
tunnelDetailDO
.
getDirectionName
());
}
EventType
eventType
=
EventType
.
findByType
(
eventDetail
.
getEventType
());
String
milestone
=
EventDetailDO
.
convertMilestoneStr
(
eventDetail
.
getMilestone
());
if
(
Objects
.
nonNull
(
milestone
))
{
if
(
Objects
.
nonNull
(
milestone
))
{
eventSituation
=
eventSituation
.
concat
(
milestone
)
.
concat
(
", "
);
}
if
(
Objects
.
nonNull
(
eventDetail
.
getEventRoadNo
()))
{
if
(
Objects
.
nonNull
(
eventDetail
.
getEventRoadNo
()))
{
eventSituation
=
eventSituation
.
concat
(
"第"
).
concat
(
eventDetail
.
getEventRoadNo
()).
concat
(
"车道"
);
}
eventSituation
=
eventSituation
.
concat
(
"发生"
).
concat
(
eventType
.
desc
)
.
concat
(
"("
).
concat
(
singMultiCar
).
concat
(
")"
);
boolean
isNonVehicle
=
EventUtil
.
isNonVehicle
(
eventDetail
.
getEventType
());
eventSituation
=
eventSituation
.
concat
(
"发现"
).
concat
(
eventType
.
desc
);
//位置方向
String
directionalPosition
=
tunnelDetailDO
.
getDirectionName
();
if
(
Objects
.
nonNull
(
milestone
))
{
if
(
Objects
.
nonNull
(
milestone
))
{
directionalPosition
=
directionalPosition
.
concat
(
milestone
);
}
if
(
Objects
.
nonNull
(
eventDetail
.
getEventRoadNo
()))
{
if
(
Objects
.
nonNull
(
eventDetail
.
getEventRoadNo
()))
{
directionalPosition
=
directionalPosition
.
concat
(
"第"
).
concat
(
eventDetail
.
getEventRoadNo
()).
concat
(
"车道"
);
}
//现场情况
String
situationSpot
=
""
;
if
(
Objects
.
nonNull
(
eventDetail
.
getEventRoadNo
()))
{
if
(
Objects
.
nonNull
(
eventDetail
.
getEventRoadNo
()))
{
situationSpot
=
situationSpot
.
concat
(
"第"
).
concat
(
eventDetail
.
getEventRoadNo
()).
concat
(
"车道"
);
}
situationSpot
=
situationSpot
.
concat
(
"发生"
).
concat
(
eventType
.
desc
)
.
concat
(
"("
).
concat
(
singMultiCar
).
concat
(
")"
);
situationSpot
=
situationSpot
.
concat
(
"发现"
).
concat
(
eventType
.
desc
);
//非车辆事件不显示单车多车标识
if
(
isNonVehicle
){
eventSituation
.
concat
(
"("
).
concat
(
singMultiCar
).
concat
(
")"
);
situationSpot
.
concat
(
"("
).
concat
(
singMultiCar
).
concat
(
")"
);
}
//事件图片
List
<
String
>
eventImagesPath
=
eventDetail
.
getEventImagesPath
();
if
(
CollUtil
.
isNotEmpty
(
eventImagesPath
))
{
eventDetailRespVO
.
setEventImagesPath
(
eventImagesPath
.
stream
().
filter
(
e
->
e
.
startsWith
(
"/"
)).
map
(
xlwImagePath:
:
concat
).
toList
());
if
(
CollUtil
.
isNotEmpty
(
eventImagesPath
))
{
eventDetailRespVO
.
setEventImagesPath
(
eventImagesPath
.
stream
().
filter
(
e
->
e
.
startsWith
(
"/"
)).
map
(
xlwImagePath:
:
concat
).
toList
());
}
//事件开始时间格式化
if
(
Objects
.
nonNull
(
eventDetail
.
getEventStartTime
()))
{
if
(
Objects
.
nonNull
(
eventDetail
.
getEventStartTime
()))
{
eventDetailRespVO
.
setEventStartTimeFormat
(
eventDetail
.
getEventStartTime
());
}
eventDetailRespVO
.
setEventSituation
(
eventSituation
);
...
...
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/infrastructure/gatewayimpl/database/dataobject/EventHisDO.java
View file @
45887c43
package
com
.
cico
.
nest
.
lcdp
.
boot
.
core
.
qxsd
.
infrastructure
.
gatewayimpl
.
database
.
dataobject
;
import
com.alibaba.fastjson2.JSONArray
;
import
com.alibaba.fastjson2.JSONObject
;
import
com.baomidou.mybatisplus.annotation.*
;
import
com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler
;
import
com.cico.nest.lcdp.boot.core.qxsd.domain.vehicle.HistoryTunnelVehicle
;
...
...
@@ -8,11 +9,15 @@ import com.cico.nest.lcdp.framework.mybatis.core.type.StringListTypeHandler;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.*
;
import
lombok.experimental.Accessors
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.checkerframework.checker.units.qual.A
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 历史事件记录表
...
...
@@ -41,10 +46,11 @@ public class EventHisDO {
private
String
eventId
;
/**
* 车辆入隧时间
* 拓展对象 {@link EventHisExpandInfo}
*
*/
@TableField
(
typeHandler
=
JacksonTypeHandler
.
class
)
private
JSONArray
vehicleInTunnelTime
;
private
JSONArray
expandInfo
;
/**
* 历史车辆轨迹
*/
...
...
@@ -79,4 +85,76 @@ public class EventHisDO {
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createTime
;
@Data
public
static
class
EventHisExpandInfo
{
private
String
eventId
;
//事件-桩号
private
String
eventMilestone
;
private
String
eventStartTime
;
//车牌号
String
carPlate
;
//车辆入隧时间
String
vehicleInTunnelTime
;
//车辆出隧时间
String
vehicleOutTunnelTime
;
//车牌图片
String
plateImage
;
//车头图片
String
headImage
;
//小侧面图像
String
smallSideImage
;
//设备-id
private
String
deviceId
;
//设备-桩号
private
String
deviceMilestone
;
//视频开始时间偏移量
private
int
videoOffsetStart
=
-
6
;
//视频结束时间偏移量
private
int
videoOffsetEnd
=
24
;
//视频时长
private
int
videoTime
;
//视频耗时时长
private
String
videoTimeConsuming
;
//视频Rtsp的url
private
String
videoRtspUrl
;
//视频开始时间
private
String
videoBeginTime
;
//视频结束时间
private
String
videoEndTime
;
}
public
static
EventHisExpandInfo
getEventHisExpandInfo
(
JSONArray
jsonArray
,
String
carPlate
){
if
(
CollectionUtils
.
isEmpty
(
jsonArray
)){
EventHisExpandInfo
x
=
new
EventHisExpandInfo
();
x
.
setCarPlate
(
carPlate
);
return
x
;
}
Map
<
String
,
EventHisExpandInfo
>
map
=
new
HashMap
<>(
jsonArray
.
size
());
jsonArray
.
forEach
(
o
->
{
EventHisExpandInfo
x
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
o
),
EventHisExpandInfo
.
class
);
map
.
put
(
x
.
getCarPlate
(),
x
);
});
if
(!
map
.
containsKey
(
carPlate
)){
EventHisExpandInfo
x
=
new
EventHisExpandInfo
();
x
.
setCarPlate
(
carPlate
);
map
.
put
(
carPlate
,
x
);
}
return
map
.
get
(
carPlate
);
}
public
static
JSONArray
setEventHisExpandInfo
(
JSONArray
jsonArray
,
EventHisExpandInfo
eventHisExpandInfo
){
if
(
CollectionUtils
.
isEmpty
(
jsonArray
)){
jsonArray
=
new
JSONArray
();
jsonArray
.
add
(
eventHisExpandInfo
);
}
for
(
int
i
=
0
;
i
<
jsonArray
.
size
();
i
++)
{
if
(
jsonArray
.
getJSONObject
(
i
).
getString
(
"carPlate"
).
equals
(
eventHisExpandInfo
.
getCarPlate
())){
jsonArray
.
set
(
i
,
eventHisExpandInfo
);
break
;
}
}
return
jsonArray
;
}
}
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/infrastructure/gatewayimpl/http/HistoryMapper.java
View file @
45887c43
package
com
.
cico
.
nest
.
lcdp
.
boot
.
core
.
qxsd
.
infrastructure
.
gatewayimpl
.
http
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.database.dataobject.EventDetailDO
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.database.dataobject.EventHisDO
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.http.xlw.dto.XlwHolographicTimeHistoryDTO
;
import
java.util.Date
;
...
...
@@ -26,6 +27,6 @@ public interface HistoryMapper {
*/
String
saveEventImage
(
String
urlPath
);
List
<
String
>
saveBayonetImage
(
String
carPlate
,
Date
eventStartTime
);
EventHisDO
.
EventHisExpandInfo
saveBayonetImage
(
String
carPlate
,
Date
eventStartTime
);
}
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/infrastructure/gatewayimpl/http/xlw/XlwAuthMapper.java
View file @
45887c43
...
...
@@ -57,7 +57,7 @@ public class XlwAuthMapper implements AuthMapper {
token
=
(
String
)
resultData
.
get
(
"sessionId"
);
// token 这里的有效期要小于新路威token 的有效期,不让就会 redis 中还存在,其实登陆失败了
// stringRedisTemplate.opsForValue().set(XlwConstants.REDIS_TOKEN_KEY, token, 6, TimeUnit.HOURS);
stringRedisTemplate
.
opsForValue
().
set
(
XlwConstants
.
REDIS_TOKEN_KEY
,
token
,
5
,
TimeUnit
.
MINUTE
S
);
stringRedisTemplate
.
opsForValue
().
set
(
XlwConstants
.
REDIS_TOKEN_KEY
,
token
,
6
,
TimeUnit
.
HOUR
S
);
}
return
token
;
}
...
...
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/infrastructure/gatewayimpl/http/xlw/XlwHistoryMapper.java
View file @
45887c43
...
...
@@ -73,15 +73,17 @@ public class XlwHistoryMapper implements HistoryMapper {
}
@Override
public
List
<
String
>
saveBayonetImage
(
String
carPlate
,
Date
eventStartTime
)
{
public
EventHisDO
.
EventHisExpandInfo
saveBayonetImage
(
String
carPlate
,
Date
eventStartTime
)
{
XlwBayonetPictureSearchDTO
searchDTO
=
new
XlwBayonetPictureSearchDTO
();
searchDTO
.
setPage
(
1
);
searchDTO
.
setPageSize
(
10
);
searchDTO
.
setPlateNumber
(
carPlate
);
searchDTO
.
setPositionMark
(
"入"
);
Date
startDate
=
DateUtil
.
offsetMinute
(
eventStartTime
,-
30
);
Date
endDate
=
DateUtil
.
offsetMinute
(
eventStartTime
,
30
);
searchDTO
.
setStartImageTime
(
DateUtil
.
format
(
startDate
,
"yyyy-MM-dd HH:mm:ss"
));
searchDTO
.
setEndImageTime
(
DateUtil
.
format
(
endDate
,
"yyyy-MM-dd HH:mm:ss"
));
EventHisDO
.
EventHisExpandInfo
eventHisExpandInfo
=
new
EventHisDO
.
EventHisExpandInfo
();
List
<
XlwBayonetPictureDTO
>
pictureDTOS
=
new
ArrayList
<>();
try
{
XlwPageDTO
<
XlwBayonetPictureDTO
>
pageDTO
=
xlwClientFeign
.
getBayonetPicture
(
searchDTO
).
getData
();
...
...
@@ -90,41 +92,39 @@ public class XlwHistoryMapper implements HistoryMapper {
}
catch
(
Exception
e
)
{
log
.
info
(
"查询信路威抓拍流水卡口图片参数:{}"
,
JsonUtils
.
toJsonString
(
searchDTO
));
log
.
info
(
"查询信路威抓拍流水卡口图片异常:{}"
,
e
.
getMessage
());
return
new
ArrayList
<>()
;
return
eventHisExpandInfo
;
}
List
<
String
>
bayonetImageUrls
=
new
ArrayList
<>();
if
(!
pictureDTOS
.
isEmpty
()){
XlwBayonetPictureDTO
bayonetPictureDTO
=
pictureDTOS
.
get
(
0
);
String
plateImageUrl
=
bayonetPictureDTO
.
getPlateImage
();
log
.
info
(
"查询信路威抓拍流水卡口图片,车牌【{}】,卡口图片路径:{}"
,
carPlate
,
plateImageUrl
);
if
(
StringUtils
.
isEmpty
(
plateImageUrl
)){
return
bayonetImageUrls
;
return
eventHisExpandInfo
;
}
//保存文件夹
String
[]
plateUrlPaths
=
plateImageUrl
.
split
(
"/"
);
String
dateFolder
=
plateUrlPaths
[
plateUrlPaths
.
length
-
2
];
File
dateFolderFile
=
new
File
(
bayonetSavePath
+
"/"
+
dateFolder
);
if
(!
dateFolderFile
.
exists
()){
dateFolderFile
.
mkdirs
();
}
String
plateSaveImageUrl
=
bayonetSavePath
+
"/"
+
dateFolder
+
"/"
+
plateUrlPaths
[
plateUrlPaths
.
length
-
1
]
;
String
plateSavePath
=
doSaveImage
(
xlwImagePath
+
plateImageUrl
,
plateSaveImageUrl
);
if
(
"error"
.
equals
(
plateSavePath
)){
bayonetImageUrls
.
add
(
"plate_error"
);
}
else
{
bayonetImageUrls
.
add
(
"/"
+
dateFolder
+
"/"
+
plateUrlPaths
[
plateUrlPaths
.
length
-
1
]);
}
String
headImageUrl
=
bayonetPictureDTO
.
getHeadImage
();
log
.
info
(
"查询信路威抓拍流水卡口图片,车牌【{}】,车头图片路径:{}"
,
carPlate
,
headImageUrl
);
String
[]
headUrlPaths
=
headImageUrl
.
split
(
"/"
);
String
headSaveImageUrl
=
bayonetSavePath
+
"/"
+
dateFolder
+
"/"
+
headUrlPaths
[
headUrlPaths
.
length
-
1
];
String
headSavePath
=
doSaveImage
(
xlwImagePath
+
headImageUrl
,
headSaveImageUrl
)
;
if
(
"error"
.
equals
(
headSavePath
)){
bayonetImageUrls
.
add
(
"head_error"
);
}
else
{
bayonetImageUrls
.
add
(
"/"
+
dateFolder
+
"/"
+
headUrlPaths
[
headUrlPaths
.
length
-
1
]);
}
eventHisExpandInfo
.
setPlateImage
(
imageTo
(
"卡口图片"
,
carPlate
,
bayonetPictureDTO
.
getPlateImage
(),
xlwImagePath
,
dateFolder
))
;
eventHisExpandInfo
.
setHeadImage
(
imageTo
(
"车头图片"
,
carPlate
,
bayonetPictureDTO
.
getHeadImage
(),
xlwImagePath
,
dateFolder
)
);
eventHisExpandInfo
.
setSmallSideImage
(
imageTo
(
"车辆图片"
,
carPlate
,
bayonetPictureDTO
.
getSmallSideImage
(),
xlwImagePath
,
dateFolder
));
}
return
eventHisExpandInfo
;
}
private
String
imageTo
(
String
str
,
String
carPlate
,
String
headImageUrl
,
String
xlwImagePath
,
String
dateFolder
){
log
.
info
(
"查询信路威抓拍流水卡口图片,车牌【{}】,{}图片路径:{}"
,
carPlate
,
str
,
headImageUrl
);
String
[]
headUrlPaths
=
headImageUrl
.
split
(
"/"
);
String
fileName
=
headUrlPaths
[
headUrlPaths
.
length
-
1
];
String
headSaveImageUrl
=
bayonetSavePath
+
"/"
+
dateFolder
+
"/"
+
fileName
;
String
headSavePath
=
doSaveImage
(
xlwImagePath
+
headImageUrl
,
headSaveImageUrl
);
if
(
"error"
.
equals
(
headSavePath
)){
return
"head_error"
;
}
else
{
return
"/"
+
dateFolder
+
"/"
+
fileName
;
}
return
bayonetImageUrls
;
}
private
String
doSaveImage
(
String
downloadUrl
,
String
saveUrl
){
...
...
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/infrastructure/gatewayimpl/http/xlw/dto/XlwBayonetPictureDTO.java
View file @
45887c43
...
...
@@ -26,4 +26,6 @@ public class XlwBayonetPictureDTO {
private
String
directionName
;
//车型
private
String
carType
;
//小侧面图像
private
String
smallSideImage
;
}
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/infrastructure/gatewayimpl/http/xlw/feign/XlwClientFeign.java
View file @
45887c43
...
...
@@ -90,7 +90,7 @@ public interface XlwClientFeign {
XlwResultData
<
List
<
XlwDeviceInfoDTO
>>
deviceInfo
(
@RequestBody
XlwOrganizationId
organizationId
);
/**
* 获取车辆通行记录
*
5.1
获取车辆通行记录
* @param searchDTO 查询条件
* @return 车辆数据
*/
...
...
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/infrastructure/gatewayimpl/ws/xlw/RealTimeEventWsClient.java
View file @
45887c43
...
...
@@ -167,6 +167,7 @@ public class RealTimeEventWsClient {
if
(
Objects
.
isNull
(
tunnelBaseDO
)){
log
.
error
(
"ws事件数据异常,tunnelId:{},tunnelBaseDO对象为空"
,
tunnelHoleV2DO
.
getTunnelId
());
}
eventDetailDO
.
setXlwTunnelId
(
tunnelHoleV2DO
.
getSfHoleId
());
eventDetailDO
.
setBaseTunnelId
(
tunnelHoleV2DO
.
getTunnelId
());
eventDetailDO
.
setBaseTunnelCode
(
tunnelBaseDO
.
getTunnelCode
());
eventDetailDO
.
setHoleId
(
tunnelHoleV2DO
.
getId
());
...
...
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/infrastructure/gatewayimpl/ws/xlw/dto/XlwRealTimeEventDTO.java
View file @
45887c43
...
...
@@ -161,7 +161,10 @@ public class XlwRealTimeEventDTO {
* 事件图片数组
*/
private
List
<
EventImage
>
imageList
;
/**
* 轨迹ID
*/
private
String
trackId
;
@Data
public
static
class
EventImage
{
...
...
@@ -208,6 +211,7 @@ public class XlwRealTimeEventDTO {
eventDO
.
setEventSource
(
XlwConstants
.
EVENT_SOURCE_XLW
);
eventDO
.
setDeviceCode
(
dto
.
getDeviceSn
());
eventDO
.
setThirdPartyId
(
dto
.
getGuid
());
eventDO
.
setTrackId
(
dto
.
getTrackId
());
eventDO
.
setDirection
(
dto
.
getDirection
());
eventDO
.
setDirectionName
(
dto
.
getDirectionName
());
if
(
Objects
.
nonNull
(
dto
.
getEventRoadNo
())){
...
...
发布测试环境v2版本.sh
View file @
45887c43
...
...
@@ -92,10 +92,15 @@ LOG "-------删除git临时目录-------"
set
-x
pwd
chmod
755 /Users/tongzuqi/pro/dongchi/gaoxin/nestqxsdboot/nest-lcdp-boot-server/target/
*
.jar
scp
-r
/Users/tongzuqi/pro/dongchi/gaoxin/nestqxsdboot/nest-lcdp-boot-server/target/nest-lcdp-boot-server.jar root@12.1.89.111:/home/gaoxin/nest-qxsd-v2/nest-lcdp-boot-server-v2.jar
file_name
=
"nest-lcdp-boot-server-v2.jar"
file_name_time
=
$file_name
$(
date
+%Y%m%d%H%M
)
scp
-r
/Users/tongzuqi/pro/dongchi/gaoxin/nestqxsdboot/nest-lcdp-boot-server/target/nest-lcdp-boot-server.jar root@12.1.89.111:/home/gaoxin/nest-qxsd-v2/
$file_name_time
ssh
-tt
-p
22 root@12.1.89.111
<<
EOF
cd /home/gaoxin/nest-qxsd-v2/
sh run.sh restart
#
\c
p -f
$file_name_time
$file_name
#sh run.sh restart
echo "手动执行cp命令:
\c
p -f
$file_name_time
$file_name
"
echo "手动执行启动命令:sh run.sh restart"
echo "启动服务结束"
exit
EOF
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment