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
3134a5f3
Commit
3134a5f3
authored
May 28, 2024
by
李秀明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 备品备件装备定义列表过滤掉非消耗性设备
parent
876e4884
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
EquipmentServiceImpl.java
...eejoin/equipmanage/service/impl/EquipmentServiceImpl.java
+10
-2
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentServiceImpl.java
View file @
3134a5f3
...
@@ -355,7 +355,16 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment
...
@@ -355,7 +355,16 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment
.
collect
(
Collectors
.
groupingBy
(
EquipmentIndex:
:
getEquipmentId
));
.
collect
(
Collectors
.
groupingBy
(
EquipmentIndex:
:
getEquipmentId
));
Map
<
Long
,
Unit
>
unitMap
=
iUnitService
.
list
().
stream
().
collect
(
Collectors
.
toMap
(
Unit:
:
getId
,
t
->
t
));
Map
<
Long
,
Unit
>
unitMap
=
iUnitService
.
list
().
stream
().
collect
(
Collectors
.
toMap
(
Unit:
:
getId
,
t
->
t
));
Map
<
Long
,
EquipmentCategory
>
categoryMap
=
equipmentCategoryMapper
.
selectList
(
null
).
stream
().
collect
(
Collectors
.
toMap
(
EquipmentCategory:
:
getId
,
t
->
t
));
Map
<
Long
,
EquipmentCategory
>
categoryMap
=
equipmentCategoryMapper
.
selectList
(
null
).
stream
().
collect
(
Collectors
.
toMap
(
EquipmentCategory:
:
getId
,
t
->
t
));
for
(
Equipment
equipment
:
list
)
{
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
Equipment
equipment
=
list
.
get
(
i
);
EquipmentCategory
equipmentCategory
=
categoryMap
.
get
(
equipment
.
getCategoryId
());
String
categoryCode
=
equipment
.
getCode
();
// 移除非消耗性设备
if
(
Objects
.
isNull
(
equipmentCategory
)
||
!
Objects
.
equals
(
equipmentCategory
.
getIndustryCode
(),
"2"
)
||
categoryCode
.
charAt
(
0
)
==
'2'
||
categoryCode
.
charAt
(
0
)
==
'9'
)
{
list
.
remove
(
equipment
);
i
--;
continue
;
}
List
<
EquipmentIndex
>
quotaList
=
equipmentIndexMap
.
get
(
equipment
.
getId
().
toString
());
List
<
EquipmentIndex
>
quotaList
=
equipmentIndexMap
.
get
(
equipment
.
getId
().
toString
());
List
<
EquProperty
>
properList
=
new
ArrayList
<
EquProperty
>();
List
<
EquProperty
>
properList
=
new
ArrayList
<
EquProperty
>();
if
(
CollUtil
.
isNotEmpty
(
quotaList
))
{
if
(
CollUtil
.
isNotEmpty
(
quotaList
))
{
...
@@ -371,7 +380,6 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment
...
@@ -371,7 +380,6 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment
properList
.
add
(
equProperty
);
properList
.
add
(
equProperty
);
}
}
}
}
EquipmentCategory
equipmentCategory
=
categoryMap
.
get
(
equipment
.
getCategoryId
());
if
(
ObjectUtils
.
isNotEmpty
(
equipmentCategory
))
{
if
(
ObjectUtils
.
isNotEmpty
(
equipmentCategory
))
{
equipment
.
setEquipCategoryId
(
equipmentCategory
.
getId
());
equipment
.
setEquipCategoryId
(
equipmentCategory
.
getId
());
equipment
.
setEquipCategoryCode
(
equipmentCategory
.
getCode
());
equipment
.
setEquipCategoryCode
(
equipmentCategory
.
getCode
());
...
...
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