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
d144bc0a
Commit
d144bc0a
authored
Sep 23, 2024
by
李秀明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
统一消防资源-消防器材设备统计逻辑
parent
89e216c3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
7 deletions
+10
-7
FireFightingSystemGroupServiceImpl.java
...nage/service/impl/FireFightingSystemGroupServiceImpl.java
+5
-2
EquipmentSpecificMapper.xml
...uip/src/main/resources/mapper/EquipmentSpecificMapper.xml
+3
-3
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.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/FireFightingSystemGroupServiceImpl.java
View file @
d144bc0a
...
@@ -27,6 +27,7 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -27,6 +27,7 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.atomic.AtomicLong
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
@Slf4j
@Slf4j
...
@@ -311,11 +312,13 @@ public class FireFightingSystemGroupServiceImpl extends ServiceImpl<FireFighting
...
@@ -311,11 +312,13 @@ public class FireFightingSystemGroupServiceImpl extends ServiceImpl<FireFighting
}
}
}
}
system
.
put
(
"equipments"
,
equipments
);
system
.
put
(
"equipments"
,
equipments
);
AtomicLong
equipmentCount
=
new
AtomicLong
(
0
);
systemEquipCountMaps
.
forEach
(
map
->
{
systemEquipCountMaps
.
forEach
(
map
->
{
if
(
String
.
valueOf
(
map
.
get
(
"systemId"
)).
equals
(
systemId
.
toString
()
))
{
if
(
String
.
valueOf
(
map
.
get
(
"systemId"
)).
matches
(
".*"
+
systemId
+
".*"
))
{
system
.
put
(
"equipmentCount"
,
map
.
getOrDefault
(
"count"
,
0L
));
equipmentCount
.
addAndGet
(
Long
.
parseLong
(
map
.
getOrDefault
(
"count"
,
0L
).
toString
()
));
}
}
});
});
system
.
put
(
"equipmentCount"
,
equipmentCount
.
get
());
systems
.
add
(
system
);
systems
.
add
(
system
);
}
}
groups
.
add
(
group
);
groups
.
add
(
group
);
...
...
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificMapper.xml
View file @
d144bc0a
...
@@ -121,7 +121,7 @@
...
@@ -121,7 +121,7 @@
LEFT JOIN wl_equipment we ON we.code = wesp.equipment_code
LEFT JOIN wl_equipment we ON we.code = wesp.equipment_code
LEFT JOIN wl_unit u on u.id = we.unit_id
LEFT JOIN wl_unit u on u.id = we.unit_id
<where>
<where>
we.id IS NOT NULL AND wesp.system_id IS NOT NULL
AND wesp.single = true
we.id IS NOT NULL AND wesp.system_id IS NOT NULL
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
AND wesp.biz_org_code like concat(#{bizOrgCode},'%')
AND wesp.biz_org_code like concat(#{bizOrgCode},'%')
</if>
</if>
...
@@ -136,14 +136,14 @@
...
@@ -136,14 +136,14 @@
wl_equipment_specific wesp
wl_equipment_specific wesp
LEFT JOIN wl_equipment we ON we.code = wesp.equipment_code
LEFT JOIN wl_equipment we ON we.code = wesp.equipment_code
<where>
<where>
we.id IS NOT NULL AND wesp.system_id IS NOT NULL
AND wesp.single = true
we.id IS NOT NULL AND wesp.system_id IS NOT NULL
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
AND wesp.biz_org_code like concat(#{bizOrgCode},'%')
AND wesp.biz_org_code like concat(#{bizOrgCode},'%')
</if>
</if>
<if
test=
"systemIds != null and systemIds.size() > 0"
>
<if
test=
"systemIds != null and systemIds.size() > 0"
>
AND (
AND (
<foreach
collection=
"systemIds"
item=
"systemId"
separator=
"OR"
>
<foreach
collection=
"systemIds"
item=
"systemId"
separator=
"OR"
>
find_in_set(wesp.system_id, #{systemId}
)
wesp.system_id LIKE concat('%',#{systemId},'%'
)
</foreach>
</foreach>
)
)
</if>
</if>
...
...
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
d144bc0a
...
@@ -109,7 +109,7 @@
...
@@ -109,7 +109,7 @@
LEFT JOIN wl_unit as unit ON wle.unit_id = unit.id
LEFT JOIN wl_unit as unit ON wle.unit_id = unit.id
<where>
<where>
wle.id is not null
wle.id is not null
and find_in_set(#{systemId},spe.system_id)
and spe.single = true
and find_in_set(#{systemId},spe.system_id)
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
AND spe.biz_org_code like concat (#{bizOrgCode},'%')
AND spe.biz_org_code like concat (#{bizOrgCode},'%')
</if>
</if>
...
@@ -132,7 +132,7 @@
...
@@ -132,7 +132,7 @@
LEFT JOIN wl_equipment_category cate ON cate.id = wle.category_id
LEFT JOIN wl_equipment_category cate ON cate.id = wle.category_id
LEFT JOIN wl_unit as unit ON wle.unit_id = unit.id
LEFT JOIN wl_unit as unit ON wle.unit_id = unit.id
<where>
<where>
wle.id is not null and spe.s
ingle = true and spe.s
ystem_id is not null
wle.id is not null and spe.system_id is not null
<if
test=
"systemId != null and systemId != ''"
>
<if
test=
"systemId != null and systemId != ''"
>
AND find_in_set(#{systemId},spe.system_id)
AND find_in_set(#{systemId},spe.system_id)
</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