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
e4681840
Commit
e4681840
authored
Feb 15, 2025
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[add] 策略库查询优化;AI绿波优化列表查询
parent
8b4fb5d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
StrategyControlServiceImpl.java
...pt/synthesis/service/impl/StrategyControlServiceImpl.java
+8
-5
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/synthesis/service/impl/StrategyControlServiceImpl.java
View file @
e4681840
...
@@ -594,8 +594,8 @@ public class StrategyControlServiceImpl implements StrategyControlService {
...
@@ -594,8 +594,8 @@ public class StrategyControlServiceImpl implements StrategyControlService {
}
}
}
}
}
}
Collections
.
sort
(
results
,
Comparator
.
comparingInt
(
StrategyControlDataExt:
:
getStatus
).
reversed
());
results
.
stream
().
distinct
().
sorted
(
Comparator
.
comparing
(
StrategyControlDataExt:
:
getStatus
).
reversed
()).
collect
(
Collectors
.
toList
());
results
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
return
results
;
return
results
;
}
}
...
@@ -619,10 +619,11 @@ public class StrategyControlServiceImpl implements StrategyControlService {
...
@@ -619,10 +619,11 @@ public class StrategyControlServiceImpl implements StrategyControlService {
currentAlgo
=
null
;
currentAlgo
=
null
;
}
}
if
(
Objects
.
isNull
(
currentAlgo
))
{
// 0无策略
if
(
Objects
.
isNull
(
currentAlgo
)
||
Objects
.
equals
(
0
,
currentAlgo
))
{
ext
.
setOptStatus
(
"正常"
);
ext
.
setOptStatus
(
"正常"
);
ext
.
setOptMethod
(
"畅通"
);
ext
.
setOptMethod
(
"畅通"
);
}
else
if
(
Objects
.
equals
(
1
,
currentAlgo
))
{
}
else
if
(
Objects
.
equals
(
2
,
currentAlgo
))
{
ext
.
setOptStatus
(
"优化中"
);
ext
.
setOptStatus
(
"优化中"
);
ext
.
setOptMethod
(
"均衡调控"
);
ext
.
setOptMethod
(
"均衡调控"
);
}
else
{
}
else
{
...
@@ -1044,6 +1045,7 @@ public class StrategyControlServiceImpl implements StrategyControlService {
...
@@ -1044,6 +1045,7 @@ public class StrategyControlServiceImpl implements StrategyControlService {
JsonViewObject
jsonViewObject
=
JsonViewObject
.
newInstance
();
JsonViewObject
jsonViewObject
=
JsonViewObject
.
newInstance
();
LambdaQueryWrapper
<
StrategyFactoryEntity
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
StrategyFactoryEntity
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
if
(
Objects
.
isNull
(
vo
))
{
if
(
Objects
.
isNull
(
vo
))
{
queryWrapper
.
orderByDesc
(
StrategyFactoryEntity:
:
getId
);
List
<
StrategyFactoryEntity
>
result
=
strategyFactoryMapper
.
selectList
(
queryWrapper
);
List
<
StrategyFactoryEntity
>
result
=
strategyFactoryMapper
.
selectList
(
queryWrapper
);
jsonViewObject
.
success
(
result
);
jsonViewObject
.
success
(
result
);
}
else
{
}
else
{
...
@@ -1063,6 +1065,7 @@ public class StrategyControlServiceImpl implements StrategyControlService {
...
@@ -1063,6 +1065,7 @@ public class StrategyControlServiceImpl implements StrategyControlService {
if
(
StringUtils
.
isNotBlank
(
vo
.
getCompany
()))
{
if
(
StringUtils
.
isNotBlank
(
vo
.
getCompany
()))
{
queryWrapper
.
eq
(
StrategyFactoryEntity:
:
getCompany
,
vo
.
getCompany
());
queryWrapper
.
eq
(
StrategyFactoryEntity:
:
getCompany
,
vo
.
getCompany
());
}
}
queryWrapper
.
orderByDesc
(
StrategyFactoryEntity:
:
getId
);
Page
<
StrategyFactoryEntity
>
result
=
strategyFactoryMapper
.
selectPage
(
page
,
queryWrapper
);
Page
<
StrategyFactoryEntity
>
result
=
strategyFactoryMapper
.
selectPage
(
page
,
queryWrapper
);
jsonViewObject
.
success
(
result
);
jsonViewObject
.
success
(
result
);
}
}
...
@@ -1080,7 +1083,7 @@ public class StrategyControlServiceImpl implements StrategyControlService {
...
@@ -1080,7 +1083,7 @@ public class StrategyControlServiceImpl implements StrategyControlService {
queryWrapper
.
eq
(
StrategyFactoryEntity:
:
getStrategyNo
,
entity
.
getStrategyNo
());
queryWrapper
.
eq
(
StrategyFactoryEntity:
:
getStrategyNo
,
entity
.
getStrategyNo
());
List
<
StrategyFactoryEntity
>
entities
=
strategyFactoryMapper
.
selectList
(
queryWrapper
);
List
<
StrategyFactoryEntity
>
entities
=
strategyFactoryMapper
.
selectList
(
queryWrapper
);
if
(
Objects
.
nonNull
(
entities
)
&&
entities
.
size
()
>
0
)
{
if
(
Objects
.
nonNull
(
entities
)
&&
entities
.
size
()
>
0
)
{
return
jsonViewObject
.
fail
(
"策略编号重复
"
);
return
jsonViewObject
.
success
(
"策略编号重复, 请修改策略编号
"
);
}
}
strategyFactoryMapper
.
insert
(
entity
);
strategyFactoryMapper
.
insert
(
entity
);
}
}
...
...
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