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
94eeaaf8
Commit
94eeaaf8
authored
Feb 09, 2023
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[test] 数据优化
parent
b46c1dce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
SituationDetectionController.java
...et/wanji/web/controller/SituationDetectionController.java
+6
-4
No files found.
signal-control-service/src/main/java/net/wanji/web/controller/SituationDetectionController.java
View file @
94eeaaf8
...
@@ -221,13 +221,15 @@ public class SituationDetectionController extends BaseController {
...
@@ -221,13 +221,15 @@ public class SituationDetectionController extends BaseController {
// todo 测试数据
// todo 测试数据
List
<
SignalManufacturerCountInfoVO
>
result
=
new
ArrayList
<>();
List
<
SignalManufacturerCountInfoVO
>
result
=
new
ArrayList
<>();
List
<
String
>
strings
=
Arrays
.
asList
(
"大华"
,
"东土"
,
"海信"
,
"海康"
);
List
<
String
>
strings
=
Arrays
.
asList
(
"大华"
,
"东土"
,
"海信"
,
"海康"
);
List
<
Integer
>
count1
=
Arrays
.
asList
(
10
,
25
,
19
,
29
);
List
<
Integer
>
count2
=
Arrays
.
asList
(
1
,
2
,
3
,
3
);
List
<
Integer
>
count3
=
Arrays
.
asList
(
1
,
2
,
3
,
2
);
for
(
int
i
=
0
;
i
<
4
;
i
++)
{
for
(
int
i
=
0
;
i
<
4
;
i
++)
{
SignalManufacturerCountInfoVO
signalManufacturerCountInfoVO
=
new
SignalManufacturerCountInfoVO
();
SignalManufacturerCountInfoVO
signalManufacturerCountInfoVO
=
new
SignalManufacturerCountInfoVO
();
signalManufacturerCountInfoVO
.
setName
(
strings
.
get
(
i
));
signalManufacturerCountInfoVO
.
setName
(
strings
.
get
(
i
));
Random
random
=
new
Random
();
signalManufacturerCountInfoVO
.
setOnlineCount
(
count1
.
get
(
i
));
signalManufacturerCountInfoVO
.
setOnlineCount
(
random
.
nextInt
(
50
));
signalManufacturerCountInfoVO
.
setOfflineCount
(
count2
.
get
(
i
));
signalManufacturerCountInfoVO
.
setOfflineCount
(
random
.
nextInt
(
10
));
signalManufacturerCountInfoVO
.
setFaultCount
(
count3
.
get
(
i
));
signalManufacturerCountInfoVO
.
setFaultCount
(
random
.
nextInt
(
5
));
result
.
add
(
signalManufacturerCountInfoVO
);
result
.
add
(
signalManufacturerCountInfoVO
);
}
}
JsonViewObject
jsonViewObject
=
JsonViewObject
.
newInstance
();
JsonViewObject
jsonViewObject
=
JsonViewObject
.
newInstance
();
...
...
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