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
256e3bfb
Commit
256e3bfb
authored
May 17, 2024
by
张森
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
装备API优化
parent
0eb3f67d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
7 deletions
+29
-7
EquipTypeImgAmountVO.java
...in/equipmanage/common/entity/vo/EquipTypeImgAmountVO.java
+3
-0
FireFightingSystemServiceImpl.java
...uipmanage/service/impl/FireFightingSystemServiceImpl.java
+21
-0
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+5
-7
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/vo/EquipTypeImgAmountVO.java
View file @
256e3bfb
...
...
@@ -79,4 +79,7 @@ public class EquipTypeImgAmountVO {
@ApiModelProperty
(
value
=
"日常运维"
)
private
String
equip
;
@ApiModelProperty
(
value
=
"系统IDs"
)
private
String
systemId
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemServiceImpl.java
View file @
256e3bfb
package
com
.
yeejoin
.
equipmanage
.
service
.
impl
;
import
cn.hutool.core.collection.CollUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
...
...
@@ -1000,11 +1001,31 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
}
IPage
<
EquipTypeImgAmountVO
>
list
=
fireFightingSystemMapper
.
getColaCategoryAmountEquList
(
equipTypeAmountPage
.
getPage
(),
hierarchy
,
codeHead
,
equipTypeAmountPage
);
ArrayList
<
String
>
systemIds
=
new
ArrayList
<>();
list
.
getRecords
().
forEach
(
x
->
{
if
(!
x
.
getEqtype
().
startsWith
(
"4"
)
&&
StringUtil
.
isNotEmpty
(
x
.
getAmount
()))
{
x
.
setAmount
(
x
.
getAmount
().
split
(
"\\."
)[
0
]);
}
if
(
StringUtil
.
isNotEmpty
(
x
.
getSystemId
()))
{
List
<
String
>
systemId
=
Arrays
.
asList
(
x
.
getSystemId
().
split
(
","
));
systemIds
.
addAll
(
systemId
);
}
});
if
(
CollUtil
.
isNotEmpty
(
systemIds
))
{
LambdaQueryWrapper
<
FireFightingSystemEntity
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
in
(
FireFightingSystemEntity:
:
getId
,
systemIds
);
List
<
FireFightingSystemEntity
>
fireSystemList
=
fireFightingSystemMapper
.
selectList
(
wrapper
);
Map
<
String
,
String
>
systemNameMap
=
fireSystemList
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
getId
().
toString
(),
FireFightingSystemEntity:
:
getName
));
list
.
getRecords
().
parallelStream
().
forEach
(
item
->
{
if
(
StringUtil
.
isNotEmpty
(
item
.
getSystemId
()))
{
ArrayList
<
String
>
systemNames
=
new
ArrayList
<>();
List
<
String
>
systemIdList
=
Arrays
.
asList
(
item
.
getSystemId
().
split
(
","
));
systemIdList
.
parallelStream
().
forEach
(
id
->
systemNames
.
add
(
systemNameMap
.
getOrDefault
(
id
,
""
)));
String
join
=
String
.
join
(
","
,
systemNames
);
item
.
setSystemName
(
join
);
}
});
}
return
list
;
}
...
...
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
256e3bfb
...
...
@@ -2071,7 +2071,7 @@
<select
id=
"getColaCategoryAmountEquList"
resultMap=
"CategoryAmountList"
>
select * from (
SELECT
wles.id,
wles.qr_code,
...
...
@@ -2083,8 +2083,7 @@
concat_ws('-',wlws.full_name,wled.area) as full_name,
wlws.name as belongBuildName,
wlun.NAME unitName,
(SELECT GROUP_CONCAT(fem.name) FROM `f_fire_fighting_system` fem WHERE find_in_set(fem.id,wles.system_id))
as systemName,
wles.system_id as systemId,
wlsd.amount,
wlsd.id as stockDetailId,
'equipment' as type,
...
...
@@ -2165,13 +2164,12 @@
<if
test=
"equipTypeAmountPage.iotCode!=null and equipTypeAmountPage.iotCode!=''"
>
AND wles.iot_code LIKE CONCAT('%',#{equipTypeAmountPage.iotCode},'%')
</if>
)s1 WHERE 1=1
<if
test=
"equipTypeAmountPage.warehouseStructureName!=null and equipTypeAmountPage.warehouseStructureName!=''"
>
AND
s1.full_name
LIKE CONCAT('%',#{equipTypeAmountPage.warehouseStructureName},'%')
AND
concat_ws('-',wlws.full_name,wled.area)
LIKE CONCAT('%',#{equipTypeAmountPage.warehouseStructureName},'%')
</if>
<if
test=
"equipTypeAmountPage.bizOrgCode!=null and equipTypeAmountPage.bizOrgCode!=''"
>
AND
s1.bizOrgC
ode LIKE CONCAT(#{equipTypeAmountPage.bizOrgCode},'%')
AND
wles.biz_org_c
ode LIKE CONCAT(#{equipTypeAmountPage.bizOrgCode},'%')
</if>
order by createDate DESC
</select>
...
...
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