Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
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
haoban3.0
haoban-manage3.0
Commits
15ffd874
Commit
15ffd874
authored
Mar 21, 2020
by
qwmqiuwenmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
ff2d4a06
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
2 deletions
+30
-2
StaffApiService.java
...va/com/gic/haoban/manage/api/service/StaffApiService.java
+2
-0
StaffDepartmentRelatedMapper.java
...nage/service/dao/mapper/StaffDepartmentRelatedMapper.java
+3
-0
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+8
-0
StaffDepartmentRelatedMapper.xml
...rc/main/resources/mapper/StaffDepartmentRelatedMapper.xml
+12
-0
DepartmentContoller.java
...gic/haoban/manage/web/controller/DepartmentContoller.java
+5
-2
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/StaffApiService.java
View file @
15ffd874
...
@@ -51,4 +51,6 @@ public interface StaffApiService {
...
@@ -51,4 +51,6 @@ public interface StaffApiService {
public
void
cleanGicClerk
(
String
clerkCode
,
String
departmentId
);
public
void
cleanGicClerk
(
String
clerkCode
,
String
departmentId
);
public
String
insertUserLoginLog
(
UserLoginLogDTO
userLoginLogDTO
);
public
String
insertUserLoginLog
(
UserLoginLogDTO
userLoginLogDTO
);
public
int
countByDepartmentIds
(
List
<
String
>
departmentIds
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/StaffDepartmentRelatedMapper.java
View file @
15ffd874
...
@@ -42,4 +42,6 @@ public interface StaffDepartmentRelatedMapper {
...
@@ -42,4 +42,6 @@ public interface StaffDepartmentRelatedMapper {
List
<
TabHaobanStaffDepartmentRelated
>
listByDepartmentIdByKeyword
(
@Param
(
"departmentId"
)
String
departmentId
,
@Param
(
"keyword"
)
String
keyword
);
List
<
TabHaobanStaffDepartmentRelated
>
listByDepartmentIdByKeyword
(
@Param
(
"departmentId"
)
String
departmentId
,
@Param
(
"keyword"
)
String
keyword
);
int
countByDepartmentIds
(
@Param
(
"departmentIds"
)
List
<
String
>
departmentIds
);
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
15ffd874
...
@@ -744,4 +744,12 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -744,4 +744,12 @@ public class StaffApiServiceImpl implements StaffApiService {
}
}
@Override
public
int
countByDepartmentIds
(
List
<
String
>
departmentIds
)
{
if
(
departmentIds
==
null
||
departmentIds
.
isEmpty
()){
return
0
;
}
return
staffDepartmentRelatedMapper
.
countByDepartmentIds
(
departmentIds
);
}
}
}
haoban-manage3-service/src/main/resources/mapper/StaffDepartmentRelatedMapper.xml
View file @
15ffd874
...
@@ -261,4 +261,15 @@
...
@@ -261,4 +261,15 @@
and (clerk_code like CONCAT('%',#{keyword},'%') or phone_number like CONCAT('%',#{keyword},'%') or staff_name like CONCAT('%',#{keyword},'%'))
and (clerk_code like CONCAT('%',#{keyword},'%') or phone_number like CONCAT('%',#{keyword},'%') or staff_name like CONCAT('%',#{keyword},'%'))
</if>
</if>
</select>
</select>
<select
id=
"countByDepartmentId"
resultType=
"java.lang.Integer"
>
select
count(1)
from tab_haoban_staff_department_related
where department_id in
<foreach
collection=
"departmentIds"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{id,jdbcType=VARCHAR}
</foreach>
and status_flag = 1
</select>
</mapper>
</mapper>
\ No newline at end of file
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/DepartmentContoller.java
View file @
15ffd874
...
@@ -94,10 +94,13 @@ public class DepartmentContoller extends WebBaseController{
...
@@ -94,10 +94,13 @@ public class DepartmentContoller extends WebBaseController{
for
(
DepartmentDTO
departmentDTO
:
result
)
{
for
(
DepartmentDTO
departmentDTO
:
result
)
{
String
chainId
=
departmentDTO
.
getChainId
()
+
Constant
.
ID_SEPARATOR
+
departmentDTO
.
getDepartmentId
();
String
chainId
=
departmentDTO
.
getChainId
()
+
Constant
.
ID_SEPARATOR
+
departmentDTO
.
getDepartmentId
();
List
<
DepartmentDTO
>
sonList
=
departmentApiService
.
listByChainId
(
chainId
,
wxEnterpriseId
);
List
<
DepartmentDTO
>
sonList
=
departmentApiService
.
listByChainId
(
chainId
,
wxEnterpriseId
);
int
staffCount
=
staffApiService
.
countByDepartmentId
(
departmentDTO
.
getDepartmentId
());;
int
staffCount
=
0
;
List
<
String
>
departmentIds
=
new
ArrayList
<>();
departmentIds
.
add
(
departmentDTO
.
getDepartmentId
());
for
(
DepartmentDTO
departmentDTO2
:
sonList
)
{
for
(
DepartmentDTO
departmentDTO2
:
sonList
)
{
staffCount
+=
staffApiService
.
countByDepartmentI
d
(
departmentDTO2
.
getDepartmentId
());
departmentIds
.
ad
d
(
departmentDTO2
.
getDepartmentId
());
}
}
staffCount
+=
staffApiService
.
countByDepartmentIds
(
departmentIds
);
departmentDTO
.
setStaffCount
(
staffCount
);
departmentDTO
.
setStaffCount
(
staffCount
);
departmentDTO
.
setHasSonNode
(
departmentApiService
.
hasSonNode
(
departmentDTO
.
getDepartmentId
()));
departmentDTO
.
setHasSonNode
(
departmentApiService
.
hasSonNode
(
departmentDTO
.
getDepartmentId
()));
}
}
...
...
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