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
42bec6ea
Commit
42bec6ea
authored
Feb 08, 2022
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.
http://36.46.149.14:5080/zentao/bug-view-4521.html
parent
2bc23b98
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
88 additions
and
75 deletions
+88
-75
EquiplistSpecificBySystemVO.java
...pmanage/common/entity/vo/EquiplistSpecificBySystemVO.java
+9
-0
BuildingController.java
...om/yeejoin/equipmanage/controller/BuildingController.java
+4
-4
BuildingMapper.java
...n/java/com/yeejoin/equipmanage/mapper/BuildingMapper.java
+0
-7
EquipmentSpecificMapper.java
...m/yeejoin/equipmanage/mapper/EquipmentSpecificMapper.java
+2
-4
VideoMapper.java
...main/java/com/yeejoin/equipmanage/mapper/VideoMapper.java
+2
-0
IBuilldService.java
.../java/com/yeejoin/equipmanage/service/IBuilldService.java
+7
-8
BuildingServiceImpl.java
...yeejoin/equipmanage/service/impl/BuildingServiceImpl.java
+37
-18
Building.xml
...-boot-system-equip/src/main/resources/mapper/Building.xml
+0
-32
EquipmentSpecificMapper.xml
...uip/src/main/resources/mapper/EquipmentSpecificMapper.xml
+15
-0
VideoMapper.xml
...ot-system-equip/src/main/resources/mapper/VideoMapper.xml
+12
-2
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/vo/EquiplistSpecificBySystemVO.java
View file @
42bec6ea
...
...
@@ -15,10 +15,19 @@ public class EquiplistSpecificBySystemVO {
@ApiModelProperty
(
value
=
"id"
)
private
Long
id
;
@ApiModelProperty
(
value
=
"设备名"
)
private
String
equipmentName
;
@ApiModelProperty
(
value
=
"设备编码"
)
private
String
code
;
@ApiModelProperty
(
value
=
"设备分组名称"
)
private
String
categoryName
;
@ApiModelProperty
(
value
=
"类型"
)
private
String
type
;
@ApiModelProperty
(
value
=
"是否绑定"
)
private
Boolean
isBound
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/BuildingController.java
View file @
42bec6ea
...
...
@@ -125,11 +125,11 @@ public class BuildingController extends AbstractBaseController {
return
buildService
.
getScenesList
(
instanceId
,
groupType
);
}
@GetMapping
(
value
=
"/
equipInSceneId
"
)
@GetMapping
(
value
=
"/
{floorId}/pointInFloor
"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询
建筑画布下装备
"
)
public
List
<
EquiplistSpecificBySystemVO
>
get
EquipBySceneId
(
@RequestParam
Long
scene
Id
)
{
return
buildService
.
get
EquipBySceneId
(
scene
Id
);
@ApiOperation
(
value
=
"查询
指定楼层下装备、摄像头
"
)
public
List
<
EquiplistSpecificBySystemVO
>
get
PointInFloor
(
@PathVariable
Long
floor
Id
)
{
return
buildService
.
get
PointInFloor
(
floor
Id
);
}
@PostMapping
(
value
=
"/commonSave"
)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/BuildingMapper.java
View file @
42bec6ea
...
...
@@ -55,13 +55,6 @@ public interface BuildingMapper extends BaseMapper<Building> {
String
getVPointInScene
(
Long
id
);
/**
* 获取建筑画布下装备
* @param ids
* @return
*/
List
<
EquiplistSpecificBySystemVO
>
getEquipBySceneId
(
@Param
(
"ids"
)
String
[]
ids
);
List
<
EquiplistSpecificBySystemVO
>
getVideoBySceneId
(
@Param
(
"ids"
)
String
[]
ids
);
/**
* 根据类型获取名下画布集合
* @param id
* @param groupType
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/EquipmentSpecificMapper.java
View file @
42bec6ea
...
...
@@ -8,10 +8,7 @@ import com.yeejoin.equipmanage.common.dto.EquipmentSpecificDto;
import
com.yeejoin.equipmanage.common.dto.UserDto
;
import
com.yeejoin.equipmanage.common.entity.*
;
import
com.yeejoin.equipmanage.common.entity.dto.EquipmentSpecificDTO
;
import
com.yeejoin.equipmanage.common.entity.vo.ComplementCodeVO
;
import
com.yeejoin.equipmanage.common.entity.vo.EquipmentSpecificVo
;
import
com.yeejoin.equipmanage.common.entity.vo.PointTreeVo
;
import
com.yeejoin.equipmanage.common.entity.vo.SourceNameByEquipSpeIdVO
;
import
com.yeejoin.equipmanage.common.entity.vo.*
;
import
com.yeejoin.equipmanage.common.vo.*
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -207,4 +204,5 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
String
getEquipmentBySpecificId
(
@Param
(
"specificId"
)
Long
specificId
);
List
<
EquiplistSpecificBySystemVO
>
getListByWarehouseStructureId
(
Long
floorId
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/VideoMapper.java
View file @
42bec6ea
...
...
@@ -85,4 +85,6 @@ public interface VideoMapper extends BaseMapper<Video> {
List
<
VideoListVo
>
listByType
(
@Param
(
"type"
)
String
type
);
List
<
Video
>
listByCode
(
@Param
(
"code"
)
String
code
);
List
<
Video
>
selectListBySourceId
(
Long
floorId
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IBuilldService.java
View file @
42bec6ea
...
...
@@ -69,14 +69,6 @@ public interface IBuilldService extends IService<Building> {
List
<
SourceScene
>
getScenesList
(
Long
id
,
String
groupType
);
/**
* 查询建筑画布下装备
*
* @param id
* @return
*/
List
<
EquiplistSpecificBySystemVO
>
getEquipBySceneId
(
@RequestParam
Long
id
);
/**
* 消防建筑树查询接口
*
* @return List<BuildingTreeVo>
...
...
@@ -309,4 +301,11 @@ public interface IBuilldService extends IService<Building> {
List
<
BuildingTreeVo
>
getCompanyBuildingTree
(
String
authKey
);
List
<
BuildingTreeVo
>
getBuildingVideoTreeNew
();
/**
* 查询指定楼层下装备、摄像头
* @param floorId 楼层id
* @return List<EquiplistSpecificBySystemVO>
*/
List
<
EquiplistSpecificBySystemVO
>
getPointInFloor
(
Long
floorId
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/BuildingServiceImpl.java
View file @
42bec6ea
...
...
@@ -90,6 +90,9 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
IWarehouseStructureService
iWarehouseStructureService
;
@Autowired
EquipmentSpecificMapper
equipmentSpecificMapper
;
@Autowired
StockDetailMapper
stockDetailMapper
;
@Autowired
ISourceSceneService
sourceSceneService
;
...
...
@@ -285,23 +288,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
}
return
list
;
}
@Override
public
List
<
EquiplistSpecificBySystemVO
>
getEquipBySceneId
(
Long
id
)
{
String
pointInScene
=
this
.
baseMapper
.
getPointInScene
(
id
);
String
vPointInScene
=
this
.
baseMapper
.
getVPointInScene
(
id
);
if
((
""
.
equals
(
pointInScene
)
||
pointInScene
==
null
)
&&
(
""
.
equals
(
vPointInScene
)
||
vPointInScene
==
null
))
{
return
new
ArrayList
<>();
}
String
[]
ids
=
pointInScene
.
split
(
","
);
String
[]
vids
=
vPointInScene
.
split
(
","
);
List
<
EquiplistSpecificBySystemVO
>
list
=
new
ArrayList
<>();
list
.
addAll
(
this
.
baseMapper
.
getEquipBySceneId
(
ids
));
list
.
addAll
(
this
.
baseMapper
.
getVideoBySceneId
(
vids
));
return
list
;
}
@Override
public
Object
saveForm
(
String
groupCode
,
String
companyCode
,
Map
<
String
,
Object
>
map
)
{
final
String
instanceId
=
"instanceId"
;
...
...
@@ -1137,7 +1124,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
vo
.
setName
(
orgUsrDto
.
getBizOrgName
());
vo
.
setId
(
orgUsrDto
.
getSequenceNbr
());
vo
.
setBizOrgName
(
orgUsrDto
.
getBizOrgName
());
vo
.
setTotal
(
allListVo
.
stream
().
filter
(
b
->
b
.
getBizOrgCode
()
!=
null
&&
b
.
getBizOrgCode
().
contains
(
vo
.
getBizOrgCode
())
&&
"building"
.
equals
(
b
.
getGroupType
())).
count
());
vo
.
setTotal
(
allListVo
.
stream
().
filter
(
b
->
b
.
getBizOrgCode
()
!=
null
&&
b
.
getBizOrgCode
().
contains
(
vo
.
getBizOrgCode
())
&&
"building"
.
equals
(
b
.
getGroupType
())).
count
());
if
(
""
.
equals
(
orgUsrDto
.
getParentId
())
||
"-1"
.
equals
(
orgUsrDto
.
getParentId
())
||
null
==
orgUsrDto
.
getParentId
())
{
flag
.
set
(
true
);
}
...
...
@@ -1192,6 +1179,38 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
.
collect
(
Collectors
.
toList
());
}
@Override
public
List
<
EquiplistSpecificBySystemVO
>
getPointInFloor
(
Long
floorId
)
{
//0.查询画布信息,todo 建筑可标记点类型为装备、摄像头
List
<
SourceScene
>
sourceScenes
=
sourceSceneService
.
findBySourceId
(
floorId
);
SourceScene
sourceScene
=
sourceScenes
.
size
()
>
0
?
sourceScenes
.
get
(
0
)
:
new
SourceScene
();
//0.1已标记装备点
String
equipPointInScene
=
sourceScene
.
getPointInScene
()
!=
null
?
sourceScene
.
getPointInScene
()
:
""
;
//0.2已标记视频点
String
videoPointInScene
=
sourceScene
.
getVideoInScene
()
!=
null
?
sourceScene
.
getVideoInScene
()
:
""
;
//1.查询楼层下的所有装备list
List
<
EquiplistSpecificBySystemVO
>
equipmentSpecifics
=
equipmentSpecificMapper
.
getListByWarehouseStructureId
(
floorId
);
equipmentSpecifics
.
forEach
(
e
->{
e
.
setIsBound
(
equipPointInScene
.
contains
(
e
.
getId
().
toString
()));
e
.
setType
(
"装备点"
);
});
List
<
EquiplistSpecificBySystemVO
>
bySystemVOS
=
new
ArrayList
<>(
equipmentSpecifics
);
//2.查询楼层下的所有视频list
List
<
Video
>
videos
=
videoMapper
.
selectListBySourceId
(
floorId
);
//3.数据加工
videos
.
forEach
(
v
->{
EquiplistSpecificBySystemVO
vo
=
new
EquiplistSpecificBySystemVO
();
vo
.
setId
(
v
.
getId
());
vo
.
setCode
(
v
.
getCode
());
vo
.
setCategoryName
(
v
.
getType
());
vo
.
setEquipmentName
(
v
.
getName
());
vo
.
setType
(
"视频点"
);
vo
.
setIsBound
(
videoPointInScene
.
contains
(
v
.
getId
().
toString
()));
bySystemVOS
.
add
(
vo
);
});
return
bySystemVOS
;
}
// @Override
// public List<BuildingTreeVo> getBuildingVideoTreeNew() {
// List<BuildingTreeVo> list = getCompanyBuildingTree(buildVideoAuthKey);
...
...
amos-boot-system-equip/src/main/resources/mapper/Building.xml
View file @
42bec6ea
...
...
@@ -134,38 +134,6 @@
<select
id=
"getVPointInScene"
resultType=
"string"
>
select video_in_scene from wl_source_scene where scene_id =#{id}
</select>
<select
id=
"getEquipBySceneId"
resultMap=
"EquiplistBySystemId"
>
SELECT
spe.id,
det.name equipment_name,
spe.code,
wlec.name AS category_name
FROM
wl_equipment_specific AS spe
LEFT JOIN wl_equipment_detail AS det ON spe.equipment_detail_id = det.id
LEFT JOIN wl_equipment AS wle ON wle.id = det.equipment_id
LEFT JOIN wl_equipment_category AS wlec ON wlec.id = wle.category_id
WHERE
spe.id in
<foreach
item=
"item"
collection=
"ids"
separator=
","
open=
"("
close=
")"
index=
""
>
#{item}
</foreach>
</select>
<select
id=
"getVideoBySceneId"
resultMap=
"EquiplistBySystemId"
>
SELECT
id,
name equipment_name,
code,
name AS category_name
FROM
wl_video
WHERE
id in
<foreach
item=
"item"
collection=
"ids"
separator=
","
open=
"("
close=
")"
index=
""
>
#{item}
</foreach>
</select>
<select
id=
"getScenesList"
resultType=
"com.yeejoin.equipmanage.common.entity.SourceScene"
>
select
ins.instance_id as id,
...
...
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificMapper.xml
View file @
42bec6ea
...
...
@@ -1465,4 +1465,18 @@
where
wes.id = #{specificId}
</select>
<select
id=
"getListByWarehouseStructureId"
resultType=
"com.yeejoin.equipmanage.common.entity.vo.EquiplistSpecificBySystemVO"
>
SELECT
spe.id,
spe.name equipment_name,
spe.code,
wlec.name AS category_name
FROM
wl_equipment_specific AS spe
LEFT JOIN wl_equipment AS wle ON spe.equipment_code = wle.code
LEFT JOIN wl_equipment_category AS wlec ON wlec.id = wle.category_id
WHERE
spe.warehouse_structure_id =#{floorId}
</select>
</mapper>
\ No newline at end of file
amos-boot-system-equip/src/main/resources/mapper/VideoMapper.xml
View file @
42bec6ea
...
...
@@ -365,6 +365,16 @@
wl_video as wlv
where wlv.code = #{code}
</select>
<select
id=
"selectListBySourceId"
resultType=
"com.yeejoin.equipmanage.common.entity.Video"
>
select
v.id,
v.code,
v.name,
v.type
from
wl_video v,
wl_video_source vs
where vs.source_id = #{floorId}
and vs.video_id = v.id
</select>
</mapper>
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