Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PRMS
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
zhengfunan
PRMS
Commits
e7da0b4c
Commit
e7da0b4c
authored
Jan 14, 2021
by
gaozhentao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改拓扑图参数
parent
a4216153
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
1 deletion
+16
-1
FlowLine.java
src/main/java/com/yingxin/prms/domain/FlowLine.java
+8
-0
Manager.java
src/main/java/com/yingxin/prms/service/business/Manager.java
+2
-1
FlowDaoImpl.java
src/main/java/com/yingxin/prms/service/dao/FlowDaoImpl.java
+6
-0
No files found.
src/main/java/com/yingxin/prms/domain/FlowLine.java
View file @
e7da0b4c
...
...
@@ -22,7 +22,15 @@ public class FlowLine {
String
coordinateLeft
;
//左坐标
@Column
(
"coordinate_right"
)
String
coordinateRight
;
//右坐标
String
points
;
//坐标
public
String
getPoints
()
{
return
points
;
}
public
void
setPoints
(
String
points
)
{
this
.
points
=
points
;
}
public
String
getCluster_name_left
()
{
return
cluster_name_left
;
...
...
src/main/java/com/yingxin/prms/service/business/Manager.java
View file @
e7da0b4c
...
...
@@ -400,8 +400,8 @@ public class Manager {
List
<
FlowLine
>
flowLines
=
flowDao
.
findLineAll
();
List
<
TcpFlowLineDto
>
lineDtos
=
new
ArrayList
<>();
List
<
TcpFlowNodeDto
>
nodeDtos
=
new
ArrayList
<>();
TcpFlowNodeDto
nodeDto
=
new
TcpFlowNodeDto
();
for
(
FlowNode
node
:
flowNodes
){
TcpFlowNodeDto
nodeDto
=
new
TcpFlowNodeDto
();
long
faultCount
=
0
;
try
{
faultCount
=
getFaultCount
(
node
.
getServerPath
());
...
...
@@ -452,6 +452,7 @@ public class Manager {
for
(
Map
<
String
,
String
>
map
:
list
){
if
(
map
!=
null
&&
!
map
.
isEmpty
()){
flowDao
.
updateNode
(
map
.
get
(
"clusterName"
),
map
.
get
(
"coordinate"
),
map
.
get
(
"mark"
));
flowDao
.
updateLine
(
map
.
get
(
"clusterNameLeft"
),
map
.
get
(
"clusterNameRight"
),
map
.
get
(
"points"
));
// String id = UUID.randomUUID().toString();
// FlowLine flowLine = new FlowLine();
// flowLine.setClusterNameLeft(map.get("clusterNameLeft"));
...
...
src/main/java/com/yingxin/prms/service/dao/FlowDaoImpl.java
View file @
e7da0b4c
...
...
@@ -50,4 +50,10 @@ public class FlowDaoImpl {
"VALUES( '"
+
flowLine
.
getCluster_name_left
()+
"', '"
+
flowLine
.
getClusterNameRight
()+
"', '"
+
flowLine
.
getCoordinateLeft
()+
"', '"
+
flowLine
.
getCoordinateRight
()+
"');"
;
template
.
getCqlOperations
().
execute
(
cql
);
}
public
void
updateLine
(
String
clusterNameLeft
,
String
clusterNameRight
,
String
points
)
{
String
cql
=
"UPDATE ctid_prof.flowline SET points='"
+
points
+
"' "
+
"where cluster_name_left='"
+
clusterNameLeft
+
"' and cluster_name_right='"
+
clusterNameRight
+
"'"
;
template
.
getCqlOperations
().
execute
(
cql
);
}
}
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