Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YeeAmosFireAutoSysRoot
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
station
YeeAmosFireAutoSysRoot
Commits
bd69375a
Commit
bd69375a
authored
Apr 10, 2020
by
shanqiyun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改领导架构TOPO图接口,新增文本预案删除接口
parent
65e84da4
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
89 additions
and
2 deletions
+89
-2
PlanVisual3dController.java
.../amos/fas/business/controller/PlanVisual3dController.java
+18
-0
TopographyController.java
...in/amos/fas/business/controller/TopographyController.java
+13
-1
ITopographyLineDao.java
.../amos/fas/business/dao/repository/ITopographyLineDao.java
+2
-0
ITopographyNodeDao.java
.../amos/fas/business/dao/repository/ITopographyNodeDao.java
+5
-0
ITopographyLineServiceImpl.java
...fas/business/service/impl/ITopographyLineServiceImpl.java
+8
-0
ITopographyNodeServiceImpl.java
...fas/business/service/impl/ITopographyNodeServiceImpl.java
+14
-1
PlanVisual3dServiceImpl.java
...os/fas/business/service/impl/PlanVisual3dServiceImpl.java
+21
-0
IPlanVisual3dService.java
...amos/fas/business/service/intfc/IPlanVisual3dService.java
+4
-0
ITopographyLineService.java
...os/fas/business/service/intfc/ITopographyLineService.java
+2
-0
ITopographyNodeService.java
...os/fas/business/service/intfc/ITopographyNodeService.java
+2
-0
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/PlanVisual3dController.java
View file @
bd69375a
...
@@ -143,4 +143,22 @@ public class PlanVisual3dController extends BaseController {
...
@@ -143,4 +143,22 @@ public class PlanVisual3dController extends BaseController {
public
CommonResponse
getResourceList
(){
public
CommonResponse
getResourceList
(){
return
CommonResponseUtil
.
success
(
planVisual3dService
.
getResourceTypeList
());
return
CommonResponseUtil
.
success
(
planVisual3dService
.
getResourceTypeList
());
}
}
@ApiOperation
(
value
=
"预案应用树"
,
notes
=
"预案应用树"
)
@GetMapping
(
value
=
"/plan/textPlanTree/{appId}"
)
public
CommonResponse
getPlanTree
(
@PathVariable
(
"appId"
)
String
appId
)
{
return
CommonResponseUtil
.
success
(
planVisual3dService
.
getTextPlanBySubjectId
(
appId
));
}
@ApiOperation
(
value
=
"删除预案文件"
,
notes
=
"删除预案文件"
)
@DeleteMapping
(
value
=
"/plan/textPlan/{id}"
)
public
CommonResponse
deleteTextPlanFile
(
@PathVariable
(
"id"
)
Long
id
)
{
try
{
planVisual3dService
.
deleteTextPlanFile
(
id
);
return
CommonResponseUtil
.
success
();
}
catch
(
Exception
e
)
{
return
CommonResponseUtil
.
failure
(
e
.
getMessage
());
}
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/TopographyController.java
View file @
bd69375a
...
@@ -53,6 +53,17 @@ public class TopographyController {
...
@@ -53,6 +53,17 @@ public class TopographyController {
return
CommonResponseUtil
.
success
(
results
);
return
CommonResponseUtil
.
success
(
results
);
}
}
@ApiOperation
(
value
=
"根据type查询节点及线"
,
notes
=
"根据type查询节点及线"
)
@GetMapping
(
value
=
"/query/{type}"
)
public
CommonResponse
getTextPlanByType
(
@PathVariable
(
value
=
"type"
)
String
type
)
{
List
<
TopographyNode
>
nodes
=
nodeService
.
getNodesByType
(
type
);
List
<
TopographyLine
>
links
=
lineService
.
getLinesByType
(
type
);
Map
<
String
,
Object
>
results
=
new
HashMap
<>();
results
.
put
(
"nodeData"
,
nodes
);
results
.
put
(
"linkData"
,
links
);
return
CommonResponseUtil
.
success
(
results
);
}
/**
/**
* 保存拓扑图
* 保存拓扑图
*
*
...
@@ -61,7 +72,7 @@ public class TopographyController {
...
@@ -61,7 +72,7 @@ public class TopographyController {
@PostMapping
(
value
=
"/updateTopo"
,
produces
=
"application/json;charset=UTF-8"
)
@PostMapping
(
value
=
"/updateTopo"
,
produces
=
"application/json;charset=UTF-8"
)
@ApiOperation
(
value
=
"保存拓扑图"
,
notes
=
"保存拓扑图"
)
@ApiOperation
(
value
=
"保存拓扑图"
,
notes
=
"保存拓扑图"
)
public
CommonResponse
savedonghuanNodes
(
@ApiParam
(
value
=
""
,
required
=
false
)
@RequestBody
JSONObject
topographyParam
)
{
public
CommonResponse
savedonghuanNodes
(
@ApiParam
(
value
=
""
,
required
=
false
)
@RequestBody
JSONObject
topographyParam
)
{
String
appId
=
topographyParam
.
getString
(
"appId"
);
String
appId
=
topographyParam
.
getString
(
"appId"
)
!=
null
?
topographyParam
.
getString
(
"appId"
)
:
null
;
String
type
=
topographyParam
.
getString
(
"type"
);
String
type
=
topographyParam
.
getString
(
"type"
);
//节点
//节点
JSONArray
nodes
=
topographyParam
.
getJSONArray
(
"nodeData"
);
JSONArray
nodes
=
topographyParam
.
getJSONArray
(
"nodeData"
);
...
@@ -119,6 +130,7 @@ public class TopographyController {
...
@@ -119,6 +130,7 @@ public class TopographyController {
//返回保存后的数据
//返回保存后的数据
List
<
TopographyNode
>
newNodes
=
nodeService
.
getNodesByAppIdAndType
(
appId
,
type
);
List
<
TopographyNode
>
newNodes
=
nodeService
.
getNodesByAppIdAndType
(
appId
,
type
);
List
<
TopographyLine
>
newLinks
=
lineService
.
getLinesByAppIdAndType
(
appId
,
type
);
List
<
TopographyLine
>
newLinks
=
lineService
.
getLinesByAppIdAndType
(
appId
,
type
);
Map
<
String
,
Object
>
results
=
new
HashMap
<>();
Map
<
String
,
Object
>
results
=
new
HashMap
<>();
results
.
put
(
"nodeData"
,
newNodes
);
results
.
put
(
"nodeData"
,
newNodes
);
results
.
put
(
"linkData"
,
newLinks
);
results
.
put
(
"linkData"
,
newLinks
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/ITopographyLineDao.java
View file @
bd69375a
...
@@ -17,4 +17,6 @@ public interface ITopographyLineDao extends BaseDao<TopographyLine, Long> {
...
@@ -17,4 +17,6 @@ public interface ITopographyLineDao extends BaseDao<TopographyLine, Long> {
@Query
(
value
=
"select * from f_topography_line "
+
" where `from` = (?1) or `to` = (?1)"
,
nativeQuery
=
true
)
@Query
(
value
=
"select * from f_topography_line "
+
" where `from` = (?1) or `to` = (?1)"
,
nativeQuery
=
true
)
List
<
TopographyLine
>
findByKey
(
String
key
);
List
<
TopographyLine
>
findByKey
(
String
key
);
List
<
TopographyLine
>
findByType
(
String
type
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/ITopographyNodeDao.java
View file @
bd69375a
...
@@ -24,5 +24,10 @@ public interface ITopographyNodeDao extends BaseDao<TopographyNode, Long> {
...
@@ -24,5 +24,10 @@ public interface ITopographyNodeDao extends BaseDao<TopographyNode, Long> {
Integer
queryMaxKeyByAppIdAndType
(
String
appId
,
String
type
);
Integer
queryMaxKeyByAppIdAndType
(
String
appId
,
String
type
);
List
<
TopographyNode
>
findByGroupAndAppIdAndType
(
String
key
,
String
appId
,
String
type
);
List
<
TopographyNode
>
findByGroupAndAppIdAndType
(
String
key
,
String
appId
,
String
type
);
List
<
TopographyNode
>
findByType
(
String
type
);
@Query
(
value
=
"select max(`key`) from f_topography_node where type = (?1)"
,
nativeQuery
=
true
)
Integer
queryMaxKeyByType
(
String
type
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ITopographyLineServiceImpl.java
View file @
bd69375a
...
@@ -17,6 +17,9 @@ public class ITopographyLineServiceImpl implements ITopographyLineService{
...
@@ -17,6 +17,9 @@ public class ITopographyLineServiceImpl implements ITopographyLineService{
@Override
@Override
public
List
<
TopographyLine
>
getLinesByAppIdAndType
(
String
appId
,
String
type
)
{
public
List
<
TopographyLine
>
getLinesByAppIdAndType
(
String
appId
,
String
type
)
{
if
(
appId
==
null
)
{
return
topographyLineDao
.
findByType
(
type
);
}
return
topographyLineDao
.
findByAppIdAndType
(
appId
,
type
);
return
topographyLineDao
.
findByAppIdAndType
(
appId
,
type
);
}
}
...
@@ -32,6 +35,11 @@ public class ITopographyLineServiceImpl implements ITopographyLineService{
...
@@ -32,6 +35,11 @@ public class ITopographyLineServiceImpl implements ITopographyLineService{
topographyLineDao
.
delete
(
line
);
topographyLineDao
.
delete
(
line
);
}
}
}
}
@Override
public
List
<
TopographyLine
>
getLinesByType
(
String
type
)
{
return
topographyLineDao
.
findByType
(
type
);
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ITopographyNodeServiceImpl.java
View file @
bd69375a
...
@@ -28,6 +28,9 @@ public class ITopographyNodeServiceImpl implements ITopographyNodeService{
...
@@ -28,6 +28,9 @@ public class ITopographyNodeServiceImpl implements ITopographyNodeService{
@Override
@Override
public
List
<
TopographyNode
>
getNodesByAppIdAndType
(
String
appId
,
String
type
)
{
public
List
<
TopographyNode
>
getNodesByAppIdAndType
(
String
appId
,
String
type
)
{
if
(
appId
==
null
)
{
return
nodeDao
.
findByType
(
type
);
}
return
nodeDao
.
findByAppIdAndType
(
appId
,
type
);
return
nodeDao
.
findByAppIdAndType
(
appId
,
type
);
}
}
...
@@ -78,7 +81,12 @@ public class ITopographyNodeServiceImpl implements ITopographyNodeService{
...
@@ -78,7 +81,12 @@ public class ITopographyNodeServiceImpl implements ITopographyNodeService{
@Override
@Override
public
int
queryMaxKeyByAppIdAndType
(
String
appId
,
String
type
)
{
public
int
queryMaxKeyByAppIdAndType
(
String
appId
,
String
type
)
{
Integer
maxKey
=
nodeDao
.
queryMaxKeyByAppIdAndType
(
appId
,
type
);
Integer
maxKey
;
if
(
null
==
appId
)
{
maxKey
=
nodeDao
.
queryMaxKeyByType
(
type
);
}
else
{
maxKey
=
nodeDao
.
queryMaxKeyByAppIdAndType
(
appId
,
type
);
}
if
(
maxKey
==
null
)
{
if
(
maxKey
==
null
)
{
maxKey
=
0
;
maxKey
=
0
;
}
}
...
@@ -90,5 +98,10 @@ public class ITopographyNodeServiceImpl implements ITopographyNodeService{
...
@@ -90,5 +98,10 @@ public class ITopographyNodeServiceImpl implements ITopographyNodeService{
return
nodeDao
.
findById
(
id
);
return
nodeDao
.
findById
(
id
);
}
}
@Override
public
List
<
TopographyNode
>
getNodesByType
(
String
type
)
{
return
nodeDao
.
findByType
(
type
);
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/PlanVisual3dServiceImpl.java
View file @
bd69375a
...
@@ -197,5 +197,26 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
...
@@ -197,5 +197,26 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
return
list
;
return
list
;
}
}
@Override
public
List
<
TreeSubjectVo
>
getTextPlanBySubjectId
(
String
appId
)
{
//关联文字预案
List
<
TreeSubjectVo
>
subjectVos
=
new
ArrayList
<>();
List
<
TextPlan
>
textPlans
=
iTextPlanDao
.
findByAppId
(
appId
);
textPlans
.
forEach
(
t
->
{
TreeSubjectVo
textTreeSubjectVo
=
new
TreeSubjectVo
();
textTreeSubjectVo
.
setParentId
(
String
.
valueOf
(
t
.
getAppId
()));
textTreeSubjectVo
.
setTreeName
(
t
.
getTextName
());
textTreeSubjectVo
.
setId
(
String
.
valueOf
(
t
.
getId
()));
textTreeSubjectVo
.
setType
(
"textNode"
);
subjectVos
.
add
(
textTreeSubjectVo
);
});
return
subjectVos
;
}
@Override
public
void
deleteTextPlanFile
(
Long
id
)
{
iTextPlanDao
.
delete
(
id
);
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IPlanVisual3dService.java
View file @
bd69375a
...
@@ -36,4 +36,8 @@ public interface IPlanVisual3dService {
...
@@ -36,4 +36,8 @@ public interface IPlanVisual3dService {
List
<
Map
<
String
,
Object
>>
getResourceById
(
String
type
,
Long
id
);
List
<
Map
<
String
,
Object
>>
getResourceById
(
String
type
,
Long
id
);
List
<
Map
<
String
,
Object
>>
getResourceTypeList
();
List
<
Map
<
String
,
Object
>>
getResourceTypeList
();
List
<
TreeSubjectVo
>
getTextPlanBySubjectId
(
String
appId
);
void
deleteTextPlanFile
(
Long
id
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/ITopographyLineService.java
View file @
bd69375a
...
@@ -12,4 +12,6 @@ public interface ITopographyLineService {
...
@@ -12,4 +12,6 @@ public interface ITopographyLineService {
public
void
deleteLine
(
String
id
);
public
void
deleteLine
(
String
id
);
public
List
<
TopographyLine
>
getLinesByType
(
String
type
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/ITopographyNodeService.java
View file @
bd69375a
...
@@ -23,4 +23,6 @@ public interface ITopographyNodeService {
...
@@ -23,4 +23,6 @@ public interface ITopographyNodeService {
public
TopographyNode
queryById
(
String
id
);
public
TopographyNode
queryById
(
String
id
);
public
List
<
TopographyNode
>
getNodesByType
(
String
type
);
}
}
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