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
36eb5def
Commit
36eb5def
authored
Jul 10, 2025
by
tongzuqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化 出入时间获取
parent
1f3d581e
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
96 additions
and
26 deletions
+96
-26
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/adapter/web/vo/event/EventDetailRespVO.java
...oot/core/qxsd/adapter/web/vo/event/EventDetailRespVO.java
+8
-0
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
+11
-5
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
+44
-18
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
+5
-3
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/infrastructure/gatewayimpl/http/xlw/dto/XlwRemainDetailDTO.java
...tructure/gatewayimpl/http/xlw/dto/XlwRemainDetailDTO.java
+20
-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
+8
-0
No files found.
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/adapter/web/vo/event/EventDetailRespVO.java
View file @
36eb5def
...
@@ -75,6 +75,14 @@ public class EventDetailRespVO {
...
@@ -75,6 +75,14 @@ public class EventDetailRespVO {
@Schema
(
description
=
"0急加速1急减速2实线变道3蛇形驾驶4逆行5拥堵6可疑事件7追尾8停车"
,
example
=
"2"
)
@Schema
(
description
=
"0急加速1急减速2实线变道3蛇形驾驶4逆行5拥堵6可疑事件7追尾8停车"
,
example
=
"2"
)
@ExcelProperty
(
"0急加速1急减速2实线变道3蛇形驾驶4逆行5拥堵6可疑事件7追尾8停车"
)
@ExcelProperty
(
"0急加速1急减速2实线变道3蛇形驾驶4逆行5拥堵6可疑事件7追尾8停车"
)
private
Integer
eventType
;
private
Integer
eventType
;
/**
* 事件详情
*/
private
String
eventTypeDesc
;
/**
* 事件详情附带(单车/多车)
*/
private
String
eventTypeDescStr
;
@Schema
(
description
=
"事件状态 0待处置1处置中2已处置"
,
example
=
"1"
)
@Schema
(
description
=
"事件状态 0待处置1处置中2已处置"
,
example
=
"1"
)
@ExcelProperty
(
"事件状态 0待处置1处置中2已处置"
)
@ExcelProperty
(
"事件状态 0待处置1处置中2已处置"
)
...
...
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 @
36eb5def
...
@@ -19,6 +19,7 @@ import com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.mqtt.handler
...
@@ -19,6 +19,7 @@ import com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.mqtt.handler
import
com.cico.nest.lcdp.framework.common.exception.ServiceException
;
import
com.cico.nest.lcdp.framework.common.exception.ServiceException
;
import
com.cico.nest.lcdp.framework.common.pojo.PageResult
;
import
com.cico.nest.lcdp.framework.common.pojo.PageResult
;
import
jakarta.annotation.Resource
;
import
jakarta.annotation.Resource
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -165,12 +166,17 @@ public class EventDetailServiceImpl implements EventDetailService {
...
@@ -165,12 +166,17 @@ public class EventDetailServiceImpl implements EventDetailService {
if
(
StrUtil
.
isNotBlank
(
videoPath
)
&&
!
videoPath
.
contains
(
"error"
)){
if
(
StrUtil
.
isNotBlank
(
videoPath
)
&&
!
videoPath
.
contains
(
"error"
)){
respVO
.
setVideoPath
(
staticResourceEventHisVideoPath
+
videoPath
);
respVO
.
setVideoPath
(
staticResourceEventHisVideoPath
+
videoPath
);
}
}
if
(
CollectionUtils
.
isNotEmpty
(
respVO
.
getExpandInfo
())){
//拓展对象
//拓展对象
for
(
int
i
=
0
;
i
<
respVO
.
getExpandInfo
().
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
respVO
.
getExpandInfo
().
size
();
i
++)
{
EventHisDO
.
EventHisExpandInfo
x
=
EventHisDO
.
getEventHisExpandInfo
(
respVO
.
getExpandInfo
(),
respVO
.
getExpandInfo
().
getJSONObject
(
i
).
getString
(
"carPlate"
));
EventHisDO
.
EventHisExpandInfo
x
=
EventHisDO
.
getEventHisExpandInfo
(
respVO
.
getExpandInfo
(),
respVO
.
getExpandInfo
().
getJSONObject
(
i
).
getString
(
"carPlate"
));
x
.
setSmallSideImage
(
staticResourceBayonetImagesPath
+
x
.
getSmallSideImage
());
x
.
setSmallSideImage
(
staticResourceBayonetImagesPath
+
x
.
getSmallSideImage
());
respVO
.
setExpandInfo
(
EventHisDO
.
setEventHisExpandInfo
(
respVO
.
getExpandInfo
(),
x
));
respVO
.
setExpandInfo
(
EventHisDO
.
setEventHisExpandInfo
(
respVO
.
getExpandInfo
(),
x
));
}
}
}
else
{
respVO
.
setExpandInfo
(
new
JSONArray
());
}
}
}
return
respVO
;
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 @
36eb5def
...
@@ -21,6 +21,7 @@ import com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.http.xlw.dto
...
@@ -21,6 +21,7 @@ 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.dto.XlwPageDTO
;
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.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.dto.XlwPassingProfileSearchDTO
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.http.xlw.dto.XlwRemainDetailDTO
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.http.xlw.feign.XlwClientFeign
;
import
com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.http.xlw.feign.XlwClientFeign
;
import
com.cico.nest.lcdp.boot.core.system.dal.dataobject.dict.DictDataDO
;
import
com.cico.nest.lcdp.boot.core.system.dal.dataobject.dict.DictDataDO
;
import
com.cico.nest.lcdp.boot.core.system.dal.mysql.dict.DictDataMapper
;
import
com.cico.nest.lcdp.boot.core.system.dal.mysql.dict.DictDataMapper
;
...
@@ -80,7 +81,7 @@ public class HistoryServiceImpl implements HistoryService {
...
@@ -80,7 +81,7 @@ public class HistoryServiceImpl implements HistoryService {
eventHisMapper
.
insertOrUpdate
(
eventHisDO
);
eventHisMapper
.
insertOrUpdate
(
eventHisDO
);
}
}
//
通过轨迹查询获取
进出时间
//
获取事件车辆
进出时间
this
.
setProfileSearch
(
eventDetailDO
,
eventHisDO
);
this
.
setProfileSearch
(
eventDetailDO
,
eventHisDO
);
// 事件图片 不存在 更新 事件图片 字段
// 事件图片 不存在 更新 事件图片 字段
...
@@ -148,13 +149,40 @@ public class HistoryServiceImpl implements HistoryService {
...
@@ -148,13 +149,40 @@ public class HistoryServiceImpl implements HistoryService {
private
void
setProfileSearch
(
EventDetailDO
eventDetailDO
,
EventHisDO
eventHisDO
)
{
private
void
setProfileSearch
(
EventDetailDO
eventDetailDO
,
EventHisDO
eventHisDO
)
{
if
(
StringUtils
.
isEmpty
(
eventDetailDO
.
getTrackId
())){
if
(
StringUtils
.
isEmpty
(
eventDetailDO
.
getTrackId
())){
log
.
error
(
"
调用5.1接口
,eventId:{},缺少trackId"
,
eventDetailDO
.
getId
());
log
.
error
(
"
获取事件入口时间
,eventId:{},缺少trackId"
,
eventDetailDO
.
getId
());
return
;
return
;
}
}
EventHisDO
.
EventHisExpandInfo
x
=
EventHisDO
.
getEventHisExpandInfo
(
eventHisDO
.
getExpandInfo
(),
eventDetailDO
.
getEventCarPlate
().
get
(
0
));
EventHisDO
.
EventHisExpandInfo
x
=
EventHisDO
.
getEventHisExpandInfo
(
eventHisDO
.
getExpandInfo
(),
eventDetailDO
.
getEventCarPlate
().
get
(
0
));
x
.
setEventId
(
eventDetailDO
.
getId
());
x
.
setEventId
(
eventDetailDO
.
getId
());
x
.
setEventStartTime
(
DateUtil
.
format
(
eventDetailDO
.
getEventStartTime
(),
"yyyy-MM-dd HH:mm:ss"
));
x
.
setEventStartTime
(
DateUtil
.
format
(
eventDetailDO
.
getEventStartTime
(),
"yyyy-MM-dd HH:mm:ss"
));
if
(
StringUtils
.
isNotEmpty
(
x
.
getVehicleInTunnelTime
())
&&
StringUtils
.
isNotEmpty
(
x
.
getVehicleOutTunnelTime
())){
log
.
info
(
"获取事件入口时间,eventId:{},数据已经完整,不需要重新获取"
,
eventDetailDO
.
getId
());
return
;
}
else
if
(
StringUtils
.
isNotEmpty
(
x
.
getVehicleInTunnelTime
())
&&
StringUtils
.
isEmpty
(
x
.
getVehicleOutTunnelTime
())){
// 入口不为空,出口为空,说明临时轨迹详情查询以前获取过
this
.
getPassingProfile
(
eventDetailDO
,
x
);
}
if
(
StringUtils
.
isEmpty
(
x
.
getVehicleInTunnelTime
())
||
StringUtils
.
isEmpty
(
x
.
getVehicleOutTunnelTime
())
)
{
if
(
StringUtils
.
isEmpty
(
x
.
getVehicleInTunnelTime
())
||
StringUtils
.
isEmpty
(
x
.
getVehicleOutTunnelTime
())
)
{
//临时轨迹详情查询 先获取入口时间,如果不存在再获取5.1
this
.
getRemainDetail
(
eventDetailDO
,
x
);
}
eventHisDO
.
setExpandInfo
(
EventHisDO
.
setEventHisExpandInfo
(
eventHisDO
.
getExpandInfo
(),
x
));
}
private
void
getRemainDetail
(
EventDetailDO
eventDetailDO
,
EventHisDO
.
EventHisExpandInfo
x
){
XlwResultData
<
XlwPassingProfileDTO
>
resultData
=
xlwClientFeign
.
getRemainDetail
(
new
XlwRemainDetailDTO
().
setSecondTrackTempId
(
eventDetailDO
.
getTrackId
()));
if
(
Objects
.
nonNull
(
resultData
)
&&
Objects
.
nonNull
(
resultData
.
getData
())){
XlwPassingProfileDTO
passingProfile
=
resultData
.
getData
();
log
.
info
(
"调用临时轨迹详情查询接口,eventId:{},trackId:{},入口开始时间:{}"
,
eventDetailDO
.
getId
(),
eventDetailDO
.
getTrackId
(),
passingProfile
.
getFirstTime
());
// 保存拓展对象
x
.
setVehicleInTunnelTime
(
passingProfile
.
getFirstTime
());
//x.setVehicleOutTunnelTime(passingProfile.getLastTime());这个不准
}
else
{
log
.
info
(
"调用临时轨迹详情查询接口,eventId:{},trackId:{},返回对象为空"
,
eventDetailDO
.
getId
(),
eventDetailDO
.
getTrackId
());
this
.
getPassingProfile
(
eventDetailDO
,
x
);
}
}
private
void
getPassingProfile
(
EventDetailDO
eventDetailDO
,
EventHisDO
.
EventHisExpandInfo
x
){
//通过 5.1 获取通行记录列表数据 trackId 查询车辆的入口开始时间
//通过 5.1 获取通行记录列表数据 trackId 查询车辆的入口开始时间
XlwPassingProfileSearchDTO
searchDTO
=
new
XlwPassingProfileSearchDTO
();
XlwPassingProfileSearchDTO
searchDTO
=
new
XlwPassingProfileSearchDTO
();
searchDTO
.
setPage
(
1
);
searchDTO
.
setPage
(
1
);
...
@@ -172,8 +200,6 @@ public class HistoryServiceImpl implements HistoryService {
...
@@ -172,8 +200,6 @@ public class HistoryServiceImpl implements HistoryService {
log
.
info
(
"调用5.1接口,eventId:{},trackId:{},返回对象为空"
,
eventDetailDO
.
getId
(),
eventDetailDO
.
getTrackId
());
log
.
info
(
"调用5.1接口,eventId:{},trackId:{},返回对象为空"
,
eventDetailDO
.
getId
(),
eventDetailDO
.
getTrackId
());
}
}
}
}
eventHisDO
.
setExpandInfo
(
EventHisDO
.
setEventHisExpandInfo
(
eventHisDO
.
getExpandInfo
(),
x
));
}
...
...
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 @
36eb5def
...
@@ -348,9 +348,9 @@ public class EventDetailDO {
...
@@ -348,9 +348,9 @@ public class EventDetailDO {
}
}
situationSpot
=
situationSpot
.
concat
(
"发现"
).
concat
(
eventType
.
desc
);
situationSpot
=
situationSpot
.
concat
(
"发现"
).
concat
(
eventType
.
desc
);
//非车辆事件不显示单车多车标识
//非车辆事件不显示单车多车标识
if
(
nonVehicleFlag
){
if
(
!
nonVehicleFlag
){
eventSituation
.
concat
(
"("
).
concat
(
singMultiCar
).
concat
(
")"
);
eventSituation
=
eventSituation
.
concat
(
"("
).
concat
(
singMultiCar
).
concat
(
")"
);
situationSpot
.
concat
(
"("
).
concat
(
singMultiCar
).
concat
(
")"
);
situationSpot
=
situationSpot
.
concat
(
"("
).
concat
(
singMultiCar
).
concat
(
")"
);
}
}
//事件图片
//事件图片
List
<
String
>
eventImagesPath
=
eventDetail
.
getEventImagesPath
();
List
<
String
>
eventImagesPath
=
eventDetail
.
getEventImagesPath
();
...
@@ -362,6 +362,8 @@ public class EventDetailDO {
...
@@ -362,6 +362,8 @@ public class EventDetailDO {
eventDetailRespVO
.
setEventStartTimeFormat
(
eventDetail
.
getEventStartTime
());
eventDetailRespVO
.
setEventStartTimeFormat
(
eventDetail
.
getEventStartTime
());
}
}
eventDetailRespVO
.
setNonVehicleFlag
(
nonVehicleFlag
);
eventDetailRespVO
.
setNonVehicleFlag
(
nonVehicleFlag
);
eventDetailRespVO
.
setEventTypeDesc
(
eventType
.
desc
);
eventDetailRespVO
.
setEventTypeDescStr
(
nonVehicleFlag
?
eventType
.
desc
:
eventType
.
desc
.
concat
(
"("
).
concat
(
singMultiCar
).
concat
(
")"
));
eventDetailRespVO
.
setEventSituation
(
eventSituation
);
eventDetailRespVO
.
setEventSituation
(
eventSituation
);
eventDetailRespVO
.
setMilestoneStr
(
milestone
);
eventDetailRespVO
.
setMilestoneStr
(
milestone
);
eventDetailRespVO
.
setDirectionalPosition
(
directionalPosition
);
eventDetailRespVO
.
setDirectionalPosition
(
directionalPosition
);
...
...
nest-lcdp-boot-core/nest-lcdp-boot-core-qxsd/src/main/java/com/cico/nest/lcdp/boot/core/qxsd/infrastructure/gatewayimpl/http/xlw/dto/XlwRemainDetailDTO.java
0 → 100644
View file @
36eb5def
package
com
.
cico
.
nest
.
lcdp
.
boot
.
core
.
qxsd
.
infrastructure
.
gatewayimpl
.
http
.
xlw
.
dto
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
/**
* @author tongzuqi
* @create 2025/7/10 2:05 PM
*/
@Data
@Accessors
(
chain
=
true
)
public
class
XlwRemainDetailDTO
{
/**
* 轨迹id
* qxsd_event_detail.track_id
*/
private
String
secondTrackTempId
;
}
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 @
36eb5def
...
@@ -145,4 +145,12 @@ public interface XlwClientFeign {
...
@@ -145,4 +145,12 @@ public interface XlwClientFeign {
*/
*/
@PostMapping
(
"/trafficStatistic/speedTrend.htm"
)
@PostMapping
(
"/trafficStatistic/speedTrend.htm"
)
XlwResultData
<
List
<
Map
<
String
,
Object
>>>
speedTrend
(
@RequestBody
XlwTableStatsDTO
tableStatsDTO
);
XlwResultData
<
List
<
Map
<
String
,
Object
>>>
speedTrend
(
@RequestBody
XlwTableStatsDTO
tableStatsDTO
);
/**
* 临时轨迹详情查询
* @param remainDetailDTO
* @return 目前这个接口只取了入口时间,如果以后取别的返回值需要边下
*/
@PostMapping
(
"/passManager/remain/detail.htm"
)
XlwResultData
<
XlwPassingProfileDTO
>
getRemainDetail
(
@RequestBody
XlwRemainDetailDTO
remainDetailDTO
);
}
}
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