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
d0bbeceb
Commit
d0bbeceb
authored
Apr 26, 2022
by
maoying
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_station' of
http://39.98.45.134:8090/moa/amos-boot-biz
into develop_station
parents
f0a2153c
bb031d4e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
73 additions
and
35 deletions
+73
-35
FireFightingSystemServiceImpl.java
...uipmanage/service/impl/FireFightingSystemServiceImpl.java
+60
-28
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+11
-5
pom.xml
pom.xml
+2
-2
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemServiceImpl.java
View file @
d0bbeceb
...
@@ -450,42 +450,74 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -450,42 +450,74 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
* @return
* @return
*/
*/
public
List
<
PointTreeVo
>
transferListToPointTree
(
List
<
PointTreeVo
>
allRiskSource
,
String
id
)
{
public
List
<
PointTreeVo
>
transferListToPointTree
(
List
<
PointTreeVo
>
allRiskSource
,
String
id
)
{
List
<
PointTreeVo
>
treeList
=
new
ArrayList
<>();
//TODO id为空,为消防建筑使用;id不为空,为点位图使用
//TODO id为空,为消防建筑使用;id不为空,为点位图使用
List
<
PointTreeVo
>
pointData
=
fireFightingSystemMapper
.
getPointData
(
id
);
List
<
PointTreeVo
>
pointData
=
fireFightingSystemMapper
.
getPointData
(
id
);
if
(!
CollectionUtils
.
isEmpty
(
pointData
))
{
if
(!
CollectionUtils
.
isEmpty
(
pointData
))
{
List
<
Long
>
idList
=
pointData
.
stream
().
map
(
PointTreeVo:
:
getSequenceNbr
).
collect
(
Collectors
.
toList
());
//
List<Long> idList = pointData.stream().map(PointTreeVo::getSequenceNbr).collect(Collectors.toList());
List
<
SpeIndexVo
>
indexVoList
=
fireFightingSystemMapper
.
getSpeIndexIn
(
idList
);
//
List<SpeIndexVo> indexVoList = fireFightingSystemMapper.getSpeIndexIn(idList);
if
(!
CollectionUtils
.
isEmpty
(
indexVoList
))
{
//
if (!CollectionUtils.isEmpty(indexVoList)) {
Map
<
Long
,
List
<
SpeIndexVo
>>
indexMap
=
indexVoList
.
stream
().
collect
(
Collectors
.
groupingBy
(
SpeIndexVo:
:
getEquipmentSpecificId
));
//
Map<Long, List<SpeIndexVo>> indexMap = indexVoList.stream().collect(Collectors.groupingBy(SpeIndexVo::getEquipmentSpecificId));
pointData
.
stream
()
.
forEach
(
p
->
{
// pointData
.forEach(p -> {
Map
map
=
new
HashMap
(
);
// Map map = new HashMap(7
);
map
.
put
(
"imgPath"
,
p
.
getImgPath
());
//
map.put("imgPath", p.getImgPath());
map
.
put
(
"equipCode"
,
p
.
getEquipCode
());
//
map.put("equipCode", p.getEquipCode());
map
.
put
(
"equipSyetemId"
,
p
.
getEquipSyetemId
());
//
map.put("equipSyetemId", p.getEquipSyetemId());
map
.
put
(
"equipTypeId"
,
p
.
getEquipId
());
//
map.put("equipTypeId", p.getEquipId());
map
.
put
(
"speindexList"
,
makeStatus
(
indexMap
.
get
(
p
.
getSequenceNbr
())));
//
map.put("speindexList", makeStatus(indexMap.get(p.getSequenceNbr())));
map
.
put
(
"speindexApi"
,
speindexUrl
+
p
.
getSequenceNbr
());
//
map.put("speindexApi", speindexUrl + p.getSequenceNbr());
map
.
put
(
"detailInfoApi"
,
equipmentDetailUrl
+
p
.
getSequenceNbr
());
//
map.put("detailInfoApi", equipmentDetailUrl + p.getSequenceNbr());
map
.
put
(
"detailApi"
,
equipmentDetailUrl
+
p
.
getSequenceNbr
());
//
map.put("detailApi", equipmentDetailUrl + p.getSequenceNbr());
p
.
setDataConfig
(
map
);
//
p.setDataConfig(map);
});
//
});
}
//
}
}
}
// for (PointTreeVo tree : allRiskSource) {
// if (tree.getParentId() == null || tree.getParentId() == -1) {
// treeList.add(tree);
// }
// for (PointTreeVo treeNode : allRiskSource) {
// if (tree.getSequenceNbr().equals(treeNode.getParentId())) {
// if (tree.getChildren() == null) {
// tree.setChildren(new ArrayList<>());
// }
// tree.getChildren().add(treeNode);
// }
// }
// }
// 优化不查指标,
pointData
.
forEach
(
p
->
{
Map
map
=
new
HashMap
(
7
);
map
.
put
(
"imgPath"
,
p
.
getImgPath
());
map
.
put
(
"equipCode"
,
p
.
getEquipCode
());
map
.
put
(
"equipSyetemId"
,
p
.
getEquipSyetemId
());
map
.
put
(
"equipTypeId"
,
p
.
getEquipId
());
map
.
put
(
"speindexApi"
,
speindexUrl
+
p
.
getSequenceNbr
());
map
.
put
(
"detailInfoApi"
,
equipmentDetailUrl
+
p
.
getSequenceNbr
());
map
.
put
(
"detailApi"
,
equipmentDetailUrl
+
p
.
getSequenceNbr
());
p
.
setDataConfig
(
map
);
});
allRiskSource
.
addAll
(
pointData
);
allRiskSource
.
addAll
(
pointData
);
for
(
PointTreeVo
tree
:
allRiskSource
)
{
// 树组装优化
if
(
tree
.
getParentId
()
==
null
||
tree
.
getParentId
()
==
-
1
)
{
Map
<
Long
,
PointTreeVo
>
map
=
new
HashMap
<>(
allRiskSource
.
size
());
treeList
.
add
(
tree
);
allRiskSource
.
forEach
(
e
->
map
.
put
(
e
.
getSequenceNbr
(),
e
));
}
Set
<?
extends
Map
.
Entry
<
Long
,
?
extends
PointTreeVo
>>
entries
=
map
.
entrySet
();
for
(
PointTreeVo
treeNode
:
allRiskSource
)
{
List
<
PointTreeVo
>
treeList
=
new
ArrayList
<>();
if
(
tree
.
getSequenceNbr
().
equals
(
treeNode
.
getParentId
()))
{
entries
.
forEach
(
entry
->
{
if
(
tree
.
getChildren
()
==
null
)
{
PointTreeVo
value
=
entry
.
getValue
();
tree
.
setChildren
(
new
ArrayList
<>());
if
(
value
!=
null
)
{
PointTreeVo
treeDto
=
map
.
get
(
value
.
getParentId
());
if
(
treeDto
!=
null
)
{
List
<
PointTreeVo
>
children
=
treeDto
.
getChildren
();
if
(
children
==
null
)
{
children
=
new
ArrayList
<>();
treeDto
.
setChildren
(
children
);
}
}
tree
.
getChildren
().
add
(
treeNode
);
children
.
add
(
value
);
}
else
{
treeList
.
add
(
value
);
}
}
}
}
}
}
);
return
treeList
;
return
treeList
;
}
}
...
...
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
d0bbeceb
...
@@ -179,7 +179,10 @@
...
@@ -179,7 +179,10 @@
'component' as template,
'component' as template,
true as openStatus,
true as openStatus,
<if
test=
"id == null"
>
<if
test=
"id == null"
>
if((select count(1) from `wl_source_scene` ss where find_in_set(spe.id, ss.point_in_scene) and EXISTS
if((select count(1) from `wl_source_scene` ss where
-- find_in_set(spe.id, ss.point_in_scene)
spe.id in (ss.point_in_scene)
and EXISTS
(SELECT es.instance_id FROM `wl_form_instance` es WHERE ss.source_id = es.instance_id)) = 0,0,1) as
(SELECT es.instance_id FROM `wl_form_instance` es WHERE ss.source_id = es.instance_id)) = 0,0,1) as
isBinding, -- 一个装备只能在一个建筑使用
isBinding, -- 一个装备只能在一个建筑使用
</if>
</if>
...
@@ -203,9 +206,9 @@
...
@@ -203,9 +206,9 @@
spe.iot_code as iotCode,
spe.iot_code as iotCode,
equ.id as groupId,
equ.id as groupId,
equ.name as groupName,
equ.name as groupName,
null
as ip,
''
as ip,
null
as token,
''
as token,
null
as address
''
as address
from wl_stock_detail as det
from wl_stock_detail as det
join wl_warehouse_structure as stru on det.warehouse_structure_id = stru.id
join wl_warehouse_structure as stru on det.warehouse_structure_id = stru.id
join wl_equipment_specific as spe on det.qr_code = spe.qr_code
join wl_equipment_specific as spe on det.qr_code = spe.qr_code
...
@@ -224,7 +227,10 @@
...
@@ -224,7 +227,10 @@
TRUE AS openStatus,
TRUE AS openStatus,
IF
IF
(
(
( SELECT ss.id FROM wl_source_scene ss WHERE ss.video_in_scene LIKE CONCAT( '%', vid.id, '%' ) ) IS NULL,
( SELECT ss.id FROM wl_source_scene ss WHERE
-- ss.video_in_scene LIKE CONCAT( '%', vid.id, '%' )
vid.id in (ss.video_in_scene)
) IS NULL,
0,
0,
1
1
) AS isBinding,
) AS isBinding,
...
...
pom.xml
View file @
d0bbeceb
...
@@ -274,12 +274,12 @@
...
@@ -274,12 +274,12 @@
<repository>
<repository>
<id>
Releases
</id>
<id>
Releases
</id>
<name>
Releases
</name>
<name>
Releases
</name>
<url>
http://
172.16.1.6
:8081/nexus/content/repositories/releases/
</url>
<url>
http://
36.46.149.14
:8081/nexus/content/repositories/releases/
</url>
</repository>
</repository>
<repository>
<repository>
<id>
Snapshots
</id>
<id>
Snapshots
</id>
<name>
Snapshots
</name>
<name>
Snapshots
</name>
<url>
http://
172.16.1.6
:8081/nexus/content/repositories/snapshots/
</url>
<url>
http://
36.46.149.14
:8081/nexus/content/repositories/snapshots/
</url>
</repository>
</repository>
<repository>
<repository>
<id>
com.e-iceblue
</id>
<id>
com.e-iceblue
</id>
...
...
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