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
f3168162
Commit
f3168162
authored
Feb 27, 2024
by
liguofu@yeejoin.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化【空工大】:查询该设备所属分类下所有设备得附件资源
parent
b6ab5f1a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
6 deletions
+20
-6
EquipmentDetailMapper.java
...com/yeejoin/equipmanage/mapper/EquipmentDetailMapper.java
+2
-0
EquipmentDetailServiceImpl.java
.../equipmanage/service/impl/EquipmentDetailServiceImpl.java
+14
-6
EquipmentDetailMapper.xml
...equip/src/main/resources/mapper/EquipmentDetailMapper.xml
+4
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/EquipmentDetailMapper.java
View file @
f3168162
...
...
@@ -45,4 +45,6 @@ public interface EquipmentDetailMapper extends BaseMapper<EquipmentDetail> {
List
<
DetailssAmountVO
>
getall
();
boolean
save
(
EquipmentDetail
equipmentDetail
);
List
<
EquipmentDetail
>
queryListByCode
(
String
code
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentDetailServiceImpl.java
View file @
f3168162
...
...
@@ -124,10 +124,18 @@ public class EquipmentDetailServiceImpl extends ServiceImpl<EquipmentDetailMappe
manufacturerInfo
.
setImg
(
manufacturerInfo
.
getImg
());
}
equipmentDetail
.
setManufacturerInfo
(
manufacturerInfo
);
equipmentDetail
.
setImg
(
getEquipFileList
(
id
,
FileTypeEnum
.
image
.
toString
()));
equipmentDetail
.
setVideo
(
getEquipFileList
(
id
,
FileTypeEnum
.
video
.
toString
()));
equipmentDetail
.
setCertification
(
getEquipFileList
(
id
,
FileTypeEnum
.
certificate
.
toString
()));
equipmentDetail
.
setInstruction
(
getEquipFileList
(
id
,
FileTypeEnum
.
instruction
.
toString
()));
// TODO start 查询该设备所属分类下所有设备得附件资源【空工大】
List
<
EquipmentDetail
>
equipmentDetailList
=
equipmentDetailMapper
.
queryListByCode
(
equipmentDetail
.
getCode
());
if
(
equipmentDetailList
.
size
()
>
0
){
List
<
Long
>
ids
=
equipmentDetailList
.
stream
().
map
(
EquipmentDetail:
:
getId
).
collect
(
Collectors
.
toList
());
equipmentDetail
.
setImg
(
getEquipFileList
(
ids
,
FileTypeEnum
.
image
.
toString
()));
equipmentDetail
.
setVideo
(
getEquipFileList
(
ids
,
FileTypeEnum
.
video
.
toString
()));
equipmentDetail
.
setCertification
(
getEquipFileList
(
ids
,
FileTypeEnum
.
certificate
.
toString
()));
equipmentDetail
.
setInstruction
(
getEquipFileList
(
ids
,
FileTypeEnum
.
instruction
.
toString
()));
}
// TODO end 查询该设备所属分类下所有设备得附件资源【空工大】
if
(
equipmentDetail
.
getCountry
()
!=
null
)
{
equipmentDetail
.
setCountryName
(
iSystemDicService
.
getOne
(
new
QueryWrapper
<
SystemDic
>().
eq
(
"id"
,
equipmentDetail
.
getCountry
())).
getName
());
...
...
@@ -135,8 +143,8 @@ public class EquipmentDetailServiceImpl extends ServiceImpl<EquipmentDetailMappe
return
equipmentDetail
;
}
private
List
<
UploadFile
>
getEquipFileList
(
L
ong
id
,
String
type
)
{
List
<
UploadFile
>
list
=
iUploadFileService
.
list
(
new
QueryWrapper
<
UploadFile
>().
eq
(
"object_id"
,
id
)
private
List
<
UploadFile
>
getEquipFileList
(
L
ist
<
Long
>
ids
,
String
type
)
{
List
<
UploadFile
>
list
=
iUploadFileService
.
list
(
new
QueryWrapper
<
UploadFile
>().
in
(
"object_id"
,
ids
)
.
eq
(
"object_type"
,
BillContentEnum
.
ZB
.
getKey
()).
eq
(
"file_type"
,
type
));
list
.
forEach
(
item
->
{
item
.
setUrl
(
item
.
getUrl
());
...
...
amos-boot-system-equip/src/main/resources/mapper/EquipmentDetailMapper.xml
View file @
f3168162
...
...
@@ -253,4 +253,8 @@
or parent_id = #{id}
)
</select>
<select
id=
"queryListByCode"
resultType=
"com.yeejoin.equipmanage.common.entity.EquipmentDetail"
>
select * from wl_equipment_detail wled where wled.code = #{code}
</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