Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
traffic-signal-platform
Project
Project
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
signal
traffic-signal-platform
Commits
dfa508df
Commit
dfa508df
authored
Apr 17, 2024
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[update] 添加异常判断处理
parent
da45144c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
12 deletions
+22
-12
CrossManageServiceImpl.java
...va/net/wanji/web/service/impl/CrossManageServiceImpl.java
+17
-11
CrossConfigServiceImpl.java
...wanji/web/service/scheme/impl/CrossConfigServiceImpl.java
+4
-1
DiagnoServiceImpl.java
...in/java/net/wanji/opt/service/impl/DiagnoServiceImpl.java
+1
-0
No files found.
signal-control-service/src/main/java/net/wanji/web/service/impl/CrossManageServiceImpl.java
View file @
dfa508df
...
@@ -12,6 +12,7 @@ import net.wanji.common.enums.DateStyle;
...
@@ -12,6 +12,7 @@ import net.wanji.common.enums.DateStyle;
import
net.wanji.common.framework.rest.JsonViewObject
;
import
net.wanji.common.framework.rest.JsonViewObject
;
import
net.wanji.common.gts.GeometryUtil
;
import
net.wanji.common.gts.GeometryUtil
;
import
net.wanji.common.utils.tool.CrossUtil
;
import
net.wanji.common.utils.tool.CrossUtil
;
import
net.wanji.common.utils.tool.StringUtils
;
import
net.wanji.databus.bo.AreaDetailBO
;
import
net.wanji.databus.bo.AreaDetailBO
;
import
net.wanji.databus.bo.AreaIdBO
;
import
net.wanji.databus.bo.AreaIdBO
;
import
net.wanji.databus.bo.CrossIdBO
;
import
net.wanji.databus.bo.CrossIdBO
;
...
@@ -46,6 +47,7 @@ import org.springframework.beans.BeanUtils;
...
@@ -46,6 +47,7 @@ import org.springframework.beans.BeanUtils;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.time.format.DateTimeFormatter
;
import
java.time.format.DateTimeFormatter
;
...
@@ -315,7 +317,7 @@ public class CrossManageServiceImpl implements CrossManageService {
...
@@ -315,7 +317,7 @@ public class CrossManageServiceImpl implements CrossManageService {
}
}
Map
content
=
(
Map
)
jsonViewObject
.
getContent
();
Map
content
=
(
Map
)
jsonViewObject
.
getContent
();
if
(
content
!=
null
)
{
if
(
content
!=
null
)
{
areaDetailPOExt
.
setCode
((
String
)
content
.
get
(
"code"
));
areaDetailPOExt
.
setCode
((
String
)
content
.
get
(
"code"
));
areaDetailPOExt
.
setManufacturerId
((
Integer
)
content
.
get
(
"manufacturerId"
));
areaDetailPOExt
.
setManufacturerId
((
Integer
)
content
.
get
(
"manufacturerId"
));
areaDetailPOExt
.
setIp
((
String
)
content
.
get
(
"ip"
));
areaDetailPOExt
.
setIp
((
String
)
content
.
get
(
"ip"
));
areaDetailPOExt
.
setPort
((
Integer
)
content
.
get
(
"port"
));
areaDetailPOExt
.
setPort
((
Integer
)
content
.
get
(
"port"
));
...
@@ -381,7 +383,7 @@ public class CrossManageServiceImpl implements CrossManageService {
...
@@ -381,7 +383,7 @@ public class CrossManageServiceImpl implements CrossManageService {
}
}
// 筛选控制模式
// 筛选控制模式
if
(
controlMode
!=
null
)
{
if
(
controlMode
!=
null
)
{
if
(
currentCrossSection
!=
null
){
if
(
currentCrossSection
!=
null
)
{
Integer
currentControlMode
=
currentCrossSection
.
getControlMode
();
Integer
currentControlMode
=
currentCrossSection
.
getControlMode
();
if
(
controlMode
.
equals
(
currentControlMode
))
{
if
(
controlMode
.
equals
(
currentControlMode
))
{
areaDetailVO
.
setControlMode
(
currentControlMode
);
areaDetailVO
.
setControlMode
(
currentControlMode
);
...
@@ -459,14 +461,17 @@ public class CrossManageServiceImpl implements CrossManageService {
...
@@ -459,14 +461,17 @@ public class CrossManageServiceImpl implements CrossManageService {
}
}
private
List
<
String
>
buildWktList
(
String
polylines
)
{
private
List
<
String
>
buildWktList
(
String
polylines
)
{
String
[]
strArray
=
polylines
.
substring
(
1
,
polylines
.
length
()
-
1
).
split
(
", "
);
String
[]
strArray
=
new
String
[
0
];
if
(
StringUtils
.
isNotBlank
(
polylines
))
{
strArray
=
polylines
.
substring
(
1
,
polylines
.
length
()
-
1
).
split
(
", "
);
}
return
Arrays
.
asList
(
strArray
);
return
Arrays
.
asList
(
strArray
);
}
}
private
List
<
CrossIdAndNameVO
>
buildCrossIdAndNameList
(
Integer
areaId
)
{
private
List
<
CrossIdAndNameVO
>
buildCrossIdAndNameList
(
Integer
areaId
)
{
List
<
CrossIdAndNameVO
>
res
=
new
ArrayList
<>();
List
<
CrossIdAndNameVO
>
res
=
new
ArrayList
<>();
List
<
String
>
crossIds
=
areaCrossMapper
.
selectCrossIdsByAreaId
(
areaId
);
List
<
String
>
crossIds
=
areaCrossMapper
.
selectCrossIdsByAreaId
(
areaId
);
if
(!
CollectionUtils
.
isEmpty
(
crossIds
))
{
List
<
BaseCrossInfoPO
>
baseCrossInfoPOList
=
crossInfoMapper
.
selectByCrossIds
(
crossIds
);
List
<
BaseCrossInfoPO
>
baseCrossInfoPOList
=
crossInfoMapper
.
selectByCrossIds
(
crossIds
);
for
(
BaseCrossInfoPO
baseCrossInfoPO
:
baseCrossInfoPOList
)
{
for
(
BaseCrossInfoPO
baseCrossInfoPO
:
baseCrossInfoPOList
)
{
CrossIdAndNameVO
crossIdAndNameVO
=
new
CrossIdAndNameVO
();
CrossIdAndNameVO
crossIdAndNameVO
=
new
CrossIdAndNameVO
();
...
@@ -474,6 +479,7 @@ public class CrossManageServiceImpl implements CrossManageService {
...
@@ -474,6 +479,7 @@ public class CrossManageServiceImpl implements CrossManageService {
crossIdAndNameVO
.
setCrossName
(
baseCrossInfoPO
.
getName
());
crossIdAndNameVO
.
setCrossName
(
baseCrossInfoPO
.
getName
());
res
.
add
(
crossIdAndNameVO
);
res
.
add
(
crossIdAndNameVO
);
}
}
}
return
res
;
return
res
;
}
}
...
...
signal-control-service/src/main/java/net/wanji/web/service/scheme/impl/CrossConfigServiceImpl.java
View file @
dfa508df
...
@@ -372,7 +372,10 @@ public class CrossConfigServiceImpl implements CrossConfigService {
...
@@ -372,7 +372,10 @@ public class CrossConfigServiceImpl implements CrossConfigService {
dirListElement
.
setDir
(
key
);
dirListElement
.
setDir
(
key
);
// 获取是否有行人道
// 获取是否有行人道
CrossDirInfoPO
crossDirInfoPO
=
crossDirInfoMapper
.
selectByCrossIdAndDirType
(
crossId
,
key
);
CrossDirInfoPO
crossDirInfoPO
=
crossDirInfoMapper
.
selectByCrossIdAndDirType
(
crossId
,
key
);
Integer
isPedestrian
=
crossDirInfoPO
.
getIsPedestrian
();
Integer
isPedestrian
=
0
;
if
(
Objects
.
nonNull
(
crossDirInfoPO
))
{
isPedestrian
=
crossDirInfoPO
.
getIsPedestrian
();
}
dirListElement
.
setIsPersonCross
(
isPedestrian
);
dirListElement
.
setIsPersonCross
(
isPedestrian
);
// 构造laneList
// 构造laneList
List
<
LaneInfoPO
>
value
=
entry
.
getValue
();
List
<
LaneInfoPO
>
value
=
entry
.
getValue
();
...
...
signal-optimize-service/src/main/java/net/wanji/opt/service/impl/DiagnoServiceImpl.java
View file @
dfa508df
...
@@ -376,6 +376,7 @@ public class DiagnoServiceImpl implements DiagnoService {
...
@@ -376,6 +376,7 @@ public class DiagnoServiceImpl implements DiagnoService {
// 获取当前时间之前45分钟的10位时间戳
// 获取当前时间之前45分钟的10位时间戳
long
currentSeconds
=
DateUtil
.
currentSeconds
();
long
currentSeconds
=
DateUtil
.
currentSeconds
();
long
optStartTime
=
currentSeconds
-
2
*
60
*
60
;
long
optStartTime
=
currentSeconds
-
2
*
60
*
60
;
//long optStartTime = 1689525900l;
// 优化开始时间,两个小时内最早时间
// 优化开始时间,两个小时内最早时间
CrossSchemeOptLogPO
optStartEntity
=
crossSchemeOptLogMapper
.
selectOptStartEntity
(
crossId
,
optReason
,
optStartTime
);
CrossSchemeOptLogPO
optStartEntity
=
crossSchemeOptLogMapper
.
selectOptStartEntity
(
crossId
,
optReason
,
optStartTime
);
if
(
Objects
.
nonNull
(
optStartEntity
))
{
if
(
Objects
.
nonNull
(
optStartEntity
))
{
...
...
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