Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
work_service
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
licc
work_service
Commits
ba287222
Commit
ba287222
authored
Feb 01, 2021
by
nie'hong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改查找用户状态
parent
1546ba9a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
WorkUserDeptMapper.java
...src/main/java/cn/wisenergy/mapper/WorkUserDeptMapper.java
+2
-1
WorkUserDeptMapper.xml
...y-mapper/src/main/resources/mapper/WorkUserDeptMapper.xml
+2
-2
StatisticsServiceImpl.java
...java/cn/wisenergy/service/impl/StatisticsServiceImpl.java
+1
-1
No files found.
wisenergy-mapper/src/main/java/cn/wisenergy/mapper/WorkUserDeptMapper.java
View file @
ba287222
...
...
@@ -15,5 +15,6 @@ import java.util.List;
*/
public
interface
WorkUserDeptMapper
extends
BaseMapper
<
WorkUserDept
>
{
List
<
Integer
>
listByDeptId
(
Integer
deptId
);
// 根据部门主键查询在职的用户
List
<
Integer
>
listByDeptIdAndStatus
(
Integer
deptId
);
}
wisenergy-mapper/src/main/resources/mapper/WorkUserDeptMapper.xml
View file @
ba287222
...
...
@@ -26,10 +26,10 @@
id, user_id, dept_id
</sql>
<select
id=
"listByDeptId"
resultType=
"integer"
parameterType=
"integer"
>
<select
id=
"listByDeptId
AndStatus
"
resultType=
"integer"
parameterType=
"integer"
>
select user_id
from
<include
refid=
"table"
/>
where dept_id = #{deptId}
where dept_id = #{deptId}
and status = 1
</select>
</mapper>
wisenergy-service/src/main/java/cn/wisenergy/service/impl/StatisticsServiceImpl.java
View file @
ba287222
...
...
@@ -103,7 +103,7 @@ public class StatisticsServiceImpl implements StatisticsService {
// 分页获取部门下所有员工主键
PageHelper
.
startPage
(
param
.
getCurrentPage
(),
param
.
getSize
());
List
<
Integer
>
userIds
=
workUserDeptMapper
.
listByDeptId
(
deptId
);
List
<
Integer
>
userIds
=
workUserDeptMapper
.
listByDeptId
AndStatus
(
deptId
);
PageInfo
pageInfo
=
new
PageInfo
(
userIds
);
// 获取用户姓名、部门名称
List
<
StatisticsTableDto
>
statisticsTableDtos
=
workUserMapper
.
getStatisticsTableDtos
(
userIds
);
...
...
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