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
37adfa43
Commit
37adfa43
authored
Jan 04, 2022
by
高建强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
item:视频监控树优化
parent
014db0b1
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
45 additions
and
18 deletions
+45
-18
Video.java
...ain/java/com/yeejoin/equipmanage/common/entity/Video.java
+3
-2
BuildingVideoListVO.java
...oin/equipmanage/common/entity/vo/BuildingVideoListVO.java
+6
-0
BuildingController.java
...om/yeejoin/equipmanage/controller/BuildingController.java
+2
-2
IBuilldService.java
.../java/com/yeejoin/equipmanage/service/IBuilldService.java
+2
-1
BuildingServiceImpl.java
...yeejoin/equipmanage/service/impl/BuildingServiceImpl.java
+10
-8
FormInstanceMapper.xml
...em-equip/src/main/resources/mapper/FormInstanceMapper.xml
+14
-4
VideoMapper.xml
...ot-system-equip/src/main/resources/mapper/VideoMapper.xml
+8
-1
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/Video.java
View file @
37adfa43
package
com
.
yeejoin
.
equipmanage
.
common
.
entity
;
package
com
.
yeejoin
.
equipmanage
.
common
.
entity
;
import
com.baomidou.mybatisplus.annotation.FieldStrategy
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.equipmanage.common.entity.publics.BaseEntity
;
import
com.yeejoin.equipmanage.common.entity.publics.BaseEntity
;
...
@@ -130,10 +131,10 @@ public class Video extends BaseEntity {
...
@@ -130,10 +131,10 @@ public class Video extends BaseEntity {
private
String
belongAreaId
;
private
String
belongAreaId
;
@ApiModelProperty
(
value
=
"机构编码"
)
@ApiModelProperty
(
value
=
"机构编码"
)
@TableField
(
value
=
"biz_org_code"
)
@TableField
(
value
=
"biz_org_code"
,
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
String
bizOrgCode
;
private
String
bizOrgCode
;
@ApiModelProperty
(
value
=
"机构/部门名称"
)
@ApiModelProperty
(
value
=
"机构/部门名称"
)
@TableField
(
value
=
"biz_org_name"
)
@TableField
(
value
=
"biz_org_name"
,
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
String
bizOrgName
;
private
String
bizOrgName
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/vo/BuildingVideoListVO.java
View file @
37adfa43
...
@@ -63,6 +63,12 @@ public class BuildingVideoListVO {
...
@@ -63,6 +63,12 @@ public class BuildingVideoListVO {
* id列表
* id列表
*/
*/
@ApiModelProperty
(
"机构编码"
)
@ApiModelProperty
(
"机构编码"
)
private
String
bizOrgCode
;
/**
* id列表
*/
@ApiModelProperty
(
"机构编码"
)
private
List
<
String
>
bizOrgCodeList
;
private
List
<
String
>
bizOrgCodeList
;
/**
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/BuildingController.java
View file @
37adfa43
...
@@ -285,8 +285,8 @@ public class BuildingController extends AbstractBaseController {
...
@@ -285,8 +285,8 @@ public class BuildingController extends AbstractBaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
"公司消防建筑树"
)
@ApiOperation
(
"公司消防建筑树"
)
@GetMapping
(
value
=
"/companyBuildingTree"
)
@GetMapping
(
value
=
"/companyBuildingTree"
)
public
List
<
BuildingTreeVo
>
getCompanyBuildingTree
()
{
public
List
<
BuildingTreeVo
>
getCompanyBuildingTree
(
@RequestParam
(
required
=
false
)
String
authKey
)
{
return
buildService
.
getCompanyBuildingTree
();
return
buildService
.
getCompanyBuildingTree
(
authKey
);
}
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IBuilldService.java
View file @
37adfa43
...
@@ -304,8 +304,9 @@ public interface IBuilldService extends IService<Building> {
...
@@ -304,8 +304,9 @@ public interface IBuilldService extends IService<Building> {
/**
/**
* 根据登陆人获取公司部门树
* 根据登陆人获取公司部门树
* @return list
* @return list
* @param authKey
*/
*/
List
<
BuildingTreeVo
>
getCompanyBuildingTree
();
List
<
BuildingTreeVo
>
getCompanyBuildingTree
(
String
authKey
);
List
<
BuildingTreeVo
>
getBuildingVideoTreeNew
();
List
<
BuildingTreeVo
>
getBuildingVideoTreeNew
();
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/BuildingServiceImpl.java
View file @
37adfa43
...
@@ -94,9 +94,6 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
...
@@ -94,9 +94,6 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
@Autowired
@Autowired
ISourceSceneService
sourceSceneService
;
ISourceSceneService
sourceSceneService
;
@Autowired
private
IBuilldService
buildService
;
@Value
(
"${morphic.projectSeq}"
)
@Value
(
"${morphic.projectSeq}"
)
private
Long
projectSeq
;
private
Long
projectSeq
;
...
@@ -124,6 +121,9 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
...
@@ -124,6 +121,9 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
@Value
(
"${auth-key-fire-building:fire_building_info}"
)
@Value
(
"${auth-key-fire-building:fire_building_info}"
)
private
String
authKey
;
private
String
authKey
;
@Value
(
"${auth-key-fire-building:auth-key-fire-build-video}"
)
private
String
buildVideoAuthKey
;
@Autowired
@Autowired
private
JCSRemoteService
jcsRemoteService
;
private
JCSRemoteService
jcsRemoteService
;
...
@@ -770,9 +770,8 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
...
@@ -770,9 +770,8 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
@Override
@Override
public
Page
<
BuildingVideoVO
>
buildingVideoList
(
Page
page
,
BuildingVideoListVO
dto
)
{
public
Page
<
BuildingVideoVO
>
buildingVideoList
(
Page
page
,
BuildingVideoListVO
dto
)
{
String
buildingId
=
dto
.
getBuildingId
();
String
orgTypes
=
dto
.
getOrgTypes
();
String
orgTypes
=
dto
.
getOrgTypes
();
if
(
"0"
.
equals
(
buildingId
)
&&
StringUtils
.
isNotBlank
(
orgTypes
))
{
if
(
StringUtils
.
isNotBlank
(
orgTypes
))
{
List
<
OrgUsrDto
>
list
=
jcsRemoteService
.
getCompanyDeptListWithAuth
(
authKey
,
orgTypes
);
List
<
OrgUsrDto
>
list
=
jcsRemoteService
.
getCompanyDeptListWithAuth
(
authKey
,
orgTypes
);
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
List
<
String
>
bizOrgCodeList
=
new
ArrayList
<>();
List
<
String
>
bizOrgCodeList
=
new
ArrayList
<>();
...
@@ -1125,7 +1124,10 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
...
@@ -1125,7 +1124,10 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
}
}
@Override
@Override
public
List
<
BuildingTreeVo
>
getCompanyBuildingTree
()
{
public
List
<
BuildingTreeVo
>
getCompanyBuildingTree
(
String
authKey
)
{
if
(
StringUtils
.
isEmpty
(
authKey
))
{
authKey
=
this
.
authKey
;
}
List
<
BuildingTreeVo
>
allListVo
=
getBuildingTreeVos
();
List
<
BuildingTreeVo
>
allListVo
=
getBuildingTreeVos
();
// 获取公司部门list
// 获取公司部门list
List
<
OrgUsrDto
>
orgUsrLists
=
jcsRemoteService
.
getCompanyDeptListWithAuth
(
authKey
,
"COMPANY"
);
List
<
OrgUsrDto
>
orgUsrLists
=
jcsRemoteService
.
getCompanyDeptListWithAuth
(
authKey
,
"COMPANY"
);
...
@@ -1155,7 +1157,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
...
@@ -1155,7 +1157,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
@Override
@Override
public
List
<
BuildingTreeVo
>
getBuildingVideoTreeNew
()
{
public
List
<
BuildingTreeVo
>
getBuildingVideoTreeNew
()
{
List
<
BuildingTreeVo
>
list
=
buildService
.
getCompanyBuildingTree
(
);
List
<
BuildingTreeVo
>
list
=
getCompanyBuildingTree
(
buildVideoAuthKey
);
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
List
<
Map
<
String
,
Long
>>
countList
=
iFormInstanceService
.
getBuildVideoCount
();
List
<
Map
<
String
,
Long
>>
countList
=
iFormInstanceService
.
getBuildVideoCount
();
if
(!
CollectionUtils
.
isEmpty
(
countList
))
{
if
(!
CollectionUtils
.
isEmpty
(
countList
))
{
...
@@ -1177,7 +1179,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
...
@@ -1177,7 +1179,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
public
List
<
BuildingTreeVo
>
getBuildingVideoTotal
(
List
<
BuildingTreeVo
>
children
,
Map
<
Long
,
Long
>
map
)
{
public
List
<
BuildingTreeVo
>
getBuildingVideoTotal
(
List
<
BuildingTreeVo
>
children
,
Map
<
Long
,
Long
>
map
)
{
for
(
BuildingTreeVo
treeVo
:
children
)
{
for
(
BuildingTreeVo
treeVo
:
children
)
{
List
<
BuildingTreeVo
>
childrenList
=
treeVo
.
getChildren
();
List
<
BuildingTreeVo
>
childrenList
=
treeVo
.
getChildren
();
if
(!
CollectionUtils
.
isEmpty
(
children
))
{
if
(!
CollectionUtils
.
isEmpty
(
children
List
))
{
getBuildingVideoTotal
(
childrenList
,
map
);
getBuildingVideoTotal
(
childrenList
,
map
);
}
}
treeVo
.
setTotal
(
map
.
get
(
treeVo
.
getInstanceId
()));
treeVo
.
setTotal
(
map
.
get
(
treeVo
.
getInstanceId
()));
...
...
amos-boot-system-equip/src/main/resources/mapper/FormInstanceMapper.xml
View file @
37adfa43
...
@@ -482,13 +482,23 @@ FROM
...
@@ -482,13 +482,23 @@ FROM
WHERE
WHERE
instance_id = #{instanceId}
instance_id = #{instanceId}
</select>
</select>
<!--<select id="getBuildVideoCount" resultType="hashmap">-->
<!-- SELECT-->
<!-- wlv.source_id AS buildId,-->
<!-- count( wlv.source_id ) AS total-->
<!-- FROM-->
<!-- `wl_video_source` wlv-->
<!-- GROUP BY-->
<!-- wlv.source_id-->
<!--</select>-->
<select
id=
"getBuildVideoCount"
resultType=
"hashmap"
>
<select
id=
"getBuildVideoCount"
resultType=
"hashmap"
>
SELECT
SELECT
wlv.source_i
d AS buildId,
b.instanceI
d AS buildId,
count( wlv.source
_id ) AS total
COUNT( vs.video
_id ) AS total
FROM
FROM
`wl_video_source` wlv
get_building_tree b
LEFT JOIN wl_video_source vs ON FIND_IN_SET( vs.source_id, getBuildChildIdsByRootId ( b.instanceId ) )
GROUP BY
GROUP BY
wlv.source_i
d
b.instanceI
d
</select>
</select>
</mapper>
</mapper>
amos-boot-system-equip/src/main/resources/mapper/VideoMapper.xml
View file @
37adfa43
...
@@ -74,14 +74,21 @@
...
@@ -74,14 +74,21 @@
JOIN wl_video_source vc ON vc.video_id = v.id
JOIN wl_video_source vc ON vc.video_id = v.id
<where>
<where>
<if
test=
"dto.buildingId!=null and dto.buildingId!=''"
>
<if
test=
"dto.buildingId!=null and dto.buildingId!=''"
>
FIND_IN_SET(vc.source_id, get
Children
IdsByRootId(#{dto.buildingId}))
FIND_IN_SET(vc.source_id, get
BuildChild
IdsByRootId(#{dto.buildingId}))
</if>
</if>
<choose>
<when
test=
"dto.bizOrgCode!=null and dto.bizOrgCode!=''"
>
OR v.biz_org_code LIKE CONCAT(#{dto.bizOrgCode}, '%')
</when>
<otherwise>
<if
test=
"dto.bizOrgCodeList != null and dto.bizOrgCodeList.size > 0"
>
<if
test=
"dto.bizOrgCodeList != null and dto.bizOrgCodeList.size > 0"
>
AND v.biz_org_code IN
AND v.biz_org_code IN
<foreach
collection=
"dto.bizOrgCodeList"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
<foreach
collection=
"dto.bizOrgCodeList"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
#{item}
</foreach>
</foreach>
</if>
</if>
</otherwise>
</choose>
<if
test=
"dto.equipmentName!=null and dto.equipmentName!=''"
>
<if
test=
"dto.equipmentName!=null and dto.equipmentName!=''"
>
and v.name like concat('%',#{dto.equipmentName},'%')
and v.name like concat('%',#{dto.equipmentName},'%')
</if>
</if>
...
...
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