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
0c71edac
Commit
0c71edac
authored
Sep 02, 2021
by
kongfm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复bug2684
parent
8d10706b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
4 deletions
+28
-4
FireTeamServiceImpl.java
...boot/module/jcs/biz/service/impl/FireTeamServiceImpl.java
+28
-4
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/FireTeamServiceImpl.java
View file @
0c71edac
...
...
@@ -102,11 +102,21 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
List
<
FireTeamCardDto
>
fireTeamList
=
fireTeamListPage
.
getRecords
();
Map
<
Object
,
Long
>
finalTeamCarCountMap
=
teamCarCountMap
;
fireTeamList
.
forEach
(
t
->
{
if
(!
ValidationUtil
.
isEmpty
(
finalTeamCarCountMap
.
get
(
t
.
getSequenceNbr
().
toString
())))
{
t
.
setCarNum
(
finalTeamCarCountMap
.
get
(
t
.
getSequenceNbr
().
toString
()).
intValue
());
//递归查找全部战备人数 BUG2217 bykongfm
t
.
setFighterNum
(
getFightNumByTeamId
(
t
.
getSequenceNbr
()));
//递归返回teamId bug2684 bykongfm
List
<
Long
>
teamIds
=
new
ArrayList
<
Long
>();
getAllTeamId
(
teamIds
,
t
.
getSequenceNbr
());
int
carNum
=
0
;
int
fighterNum
=
0
;
for
(
Long
tempId
:
teamIds
)
{
if
(
finalTeamCarCountMap
.
get
(
tempId
.
toString
())
!=
null
)
{
carNum
+=
finalTeamCarCountMap
.
get
(
tempId
.
toString
()).
intValue
();
}
fighterNum
+=
fireTeamMapper
.
getFighterNumByTeamId
(
tempId
);
}
t
.
setCarNum
(
carNum
);
t
.
setFighterNum
(
fighterNum
);
/*//递归查找全部战备人数 BUG2217 bykongfm
t.setFighterNum(getFightNumByTeamId(t.getSequenceNbr()));*/
});
fireTeamListPage
.
setRecords
(
fireTeamList
);
return
fireTeamListPage
;
...
...
@@ -316,4 +326,18 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
}
public
void
getAllTeamId
(
List
<
Long
>
teamIds
,
Long
teamId
)
{
teamIds
.
add
(
teamId
);
LambdaQueryWrapper
<
FireTeam
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
FireTeam:
:
getParent
,
teamId
).
eq
(
FireTeam:
:
getIsDelete
,
false
);
List
<
FireTeam
>
fireTeamList
=
this
.
list
(
queryWrapper
);
if
(
fireTeamList
.
size
()
==
0
)
{
// 没有下级单位
}
else
{
for
(
FireTeam
t
:
fireTeamList
)
{
getAllTeamId
(
teamIds
,
t
.
getSequenceNbr
());
}
}
}
}
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