Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
d21c49d5
Commit
d21c49d5
authored
Dec 07, 2021
by
xixinzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
视频监控
parent
35b58fb4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
4 deletions
+42
-4
FireBuildingController.java
...oot/module/ccs/biz/controller/FireBuildingController.java
+8
-0
FireVideoController.java
...s/boot/module/ccs/biz/controller/FireVideoController.java
+3
-1
FireBuildingServiceImpl.java
.../module/ccs/biz/service/impl/FireBuildingServiceImpl.java
+27
-1
FireVideoServiceImpl.java
...oot/module/ccs/biz/service/impl/FireVideoServiceImpl.java
+4
-2
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-ccs-biz/src/main/java/com/yeejoin/amos/boot/module/ccs/biz/controller/FireBuildingController.java
View file @
d21c49d5
...
@@ -58,4 +58,12 @@ public class FireBuildingController extends BaseController {
...
@@ -58,4 +58,12 @@ public class FireBuildingController extends BaseController {
@ApiParam
(
value
=
"换流站code"
)
@PathVariable
String
stationCode
)
{
@ApiParam
(
value
=
"换流站code"
)
@PathVariable
String
stationCode
)
{
return
ResponseHelper
.
buildResponse
(
fireBuildingServiceImpl
.
buildingTree
(
stationCode
));
return
ResponseHelper
.
buildResponse
(
fireBuildingServiceImpl
.
buildingTree
(
stationCode
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"stationBuildingTree"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"换流站建筑树"
,
notes
=
"换流站建筑树"
)
public
ResponseModel
stationBuildingTree
(
@ApiParam
(
value
=
"换流站code"
)
@RequestParam
(
value
=
"stationCode"
,
required
=
false
)
String
stationCode
)
{
return
ResponseHelper
.
buildResponse
(
fireBuildingServiceImpl
.
stationBuildingTree
(
stationCode
));
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-ccs-biz/src/main/java/com/yeejoin/amos/boot/module/ccs/biz/controller/FireVideoController.java
View file @
d21c49d5
...
@@ -51,6 +51,7 @@ public class FireVideoController extends BaseController {
...
@@ -51,6 +51,7 @@ public class FireVideoController extends BaseController {
@ApiParam
(
value
=
"当前页"
,
required
=
true
)
@RequestParam
(
value
=
"current"
)
int
current
,
@ApiParam
(
value
=
"当前页"
,
required
=
true
)
@RequestParam
(
value
=
"current"
)
int
current
,
@ApiParam
(
value
=
"页大小"
,
required
=
true
)
@RequestParam
(
value
=
"size"
)
int
size
,
@ApiParam
(
value
=
"页大小"
,
required
=
true
)
@RequestParam
(
value
=
"size"
)
int
size
,
@ApiParam
(
value
=
"换流站code"
,
required
=
true
)
@PathVariable
String
stationCode
,
@ApiParam
(
value
=
"换流站code"
,
required
=
true
)
@PathVariable
String
stationCode
,
@ApiParam
(
value
=
"摄像头编码"
)
@RequestParam
(
value
=
"videoMrid"
,
required
=
false
)
String
videoMrid
,
@ApiParam
(
value
=
"所在建筑,多个用逗号分隔"
)
@RequestParam
(
value
=
"buildingMrids"
,
required
=
false
)
String
buildingMrids
)
{
@ApiParam
(
value
=
"所在建筑,多个用逗号分隔"
)
@RequestParam
(
value
=
"buildingMrids"
,
required
=
false
)
String
buildingMrids
)
{
List
<
String
>
buildingMridList
=
new
ArrayList
<>();
List
<
String
>
buildingMridList
=
new
ArrayList
<>();
//根节点id(全部建筑时使用,本来可以不送来实现过滤,但是地图前端不支持)
//根节点id(全部建筑时使用,本来可以不送来实现过滤,但是地图前端不支持)
...
@@ -61,7 +62,8 @@ public class FireVideoController extends BaseController {
...
@@ -61,7 +62,8 @@ public class FireVideoController extends BaseController {
Page
<
FireVideoDto
>
page
=
new
Page
<>();
Page
<
FireVideoDto
>
page
=
new
Page
<>();
page
.
setCurrent
(
current
);
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
fireVideoServiceImpl
.
queryForFireVideoPage
(
page
,
name
,
stationCode
,
buildingMridList
));
String
code
=
(
"-1"
).
equals
(
stationCode
)
?
""
:
stationCode
;
return
ResponseHelper
.
buildResponse
(
fireVideoServiceImpl
.
queryForFireVideoPage
(
page
,
name
,
code
,
buildingMridList
,
videoMrid
));
}
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-ccs-biz/src/main/java/com/yeejoin/amos/boot/module/ccs/biz/service/impl/FireBuildingServiceImpl.java
View file @
d21c49d5
...
@@ -15,6 +15,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
...
@@ -15,6 +15,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.Comparator
;
import
java.util.Comparator
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -48,6 +49,30 @@ public class FireBuildingServiceImpl extends BaseService<FireBuildingDto, FireBu
...
@@ -48,6 +49,30 @@ public class FireBuildingServiceImpl extends BaseService<FireBuildingDto, FireBu
}
}
private
List
<
FireBuildingDto
>
getChildren
(
String
mrid
,
List
<
FireBuildingDto
>
dtoList
)
{
private
List
<
FireBuildingDto
>
getChildren
(
String
mrid
,
List
<
FireBuildingDto
>
dtoList
)
{
return
dtoList
.
stream
().
filter
(
d
->
StringUtils
.
isNotBlank
(
d
.
getParentMrid
())
&&
d
.
getParentMrid
().
equals
(
mrid
)).
peek
(
s
->
s
.
setChildren
(
this
.
getChildren
(
s
.
getMrid
(),
dtoList
))).
sorted
(
Comparator
.
comparing
(
BaseDto:
:
getCreateDate
)).
collect
(
Collectors
.
toList
());
return
dtoList
.
stream
().
filter
(
d
->
StringUtils
.
isNotBlank
(
d
.
getParentMrid
())
&&
d
.
getParentMrid
().
equals
(
mrid
)).
peek
(
s
->
s
.
setChildren
(
this
.
getChildren
(
s
.
getMrid
(),
dtoList
))).
sorted
(
Comparator
.
comparing
(
BaseDto:
:
getCreateDate
)).
collect
(
Collectors
.
toList
());
}
public
List
<
FireBuildingDto
>
stationBuildingTree
(
String
stationCode
)
{
List
<
FireBuildingDto
>
dtoList
=
this
.
queryForList
(
"create_date"
,
true
,
stationCode
);
// 根据换流站code分组list
Map
<
String
,
List
<
FireBuildingDto
>>
stationMap
=
dtoList
.
stream
().
collect
(
Collectors
.
groupingBy
(
f
->
f
.
getStationName
()+
"_"
+
f
.
getStationCode
()));
return
stationMap
.
keySet
().
stream
().
map
(
key
->
{
FireBuildingDto
parentNode
=
new
FireBuildingDto
();
String
[]
temp
=
key
.
split
(
"_"
);
String
name
=
temp
[
0
];
String
code
=
temp
[
1
];
parentNode
.
setStationCode
(
code
);
parentNode
.
setStationName
(
name
);
parentNode
.
setId
(
code
);
parentNode
.
setType
(
"station"
);
parentNode
.
setName
(
name
);
List
<
FireBuildingDto
>
childrenNode
=
stationMap
.
get
(
key
).
stream
().
filter
(
d
->
StringUtils
.
isBlank
(
d
.
getParentMrid
())
||
"0"
.
equals
(
d
.
getParentMrid
())
||
"-1"
.
equals
(
d
.
getParentMrid
())).
peek
(
s
->
s
.
setChildren
(
this
.
getChildren
(
s
.
getMrid
(),
dtoList
))).
sorted
(
Comparator
.
comparing
(
BaseDto:
:
getCreateDate
)).
collect
(
Collectors
.
toList
());
parentNode
.
setChildren
(
childrenNode
);
return
parentNode
;
}).
collect
(
Collectors
.
toList
());
}
}
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-ccs-biz/src/main/java/com/yeejoin/amos/boot/module/ccs/biz/service/impl/FireVideoServiceImpl.java
View file @
d21c49d5
...
@@ -23,8 +23,9 @@ public class FireVideoServiceImpl extends BaseService<FireVideoDto, FireVideo, F
...
@@ -23,8 +23,9 @@ public class FireVideoServiceImpl extends BaseService<FireVideoDto, FireVideo, F
/**
/**
* 分页查询
* 分页查询
*/
*/
public
Page
<
FireVideoDto
>
queryForFireVideoPage
(
Page
<
FireVideoDto
>
page
,
@Condition
(
Operator
.
like
)
String
name
,
String
stationCode
,
@Condition
(
Operator
.
in
)
List
<
String
>
buildingMrid
)
{
public
Page
<
FireVideoDto
>
queryForFireVideoPage
(
Page
<
FireVideoDto
>
page
,
@Condition
(
Operator
.
like
)
String
name
,
String
stationCode
,
@Condition
(
Operator
.
in
)
List
<
String
>
buildingMrid
,
return
this
.
queryForPage
(
page
,
"create_date"
,
false
,
name
,
stationCode
,
buildingMrid
);
@Condition
(
Operator
.
like
)
String
mrid
)
{
return
this
.
queryForPage
(
page
,
"create_date"
,
false
,
name
,
stationCode
,
buildingMrid
,
mrid
);
}
}
}
}
\ No newline at end of file
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