Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
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
80169f81
Commit
80169f81
authored
Jan 29, 2021
by
nie'hong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化导出
parent
ec039315
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
WorkUserMapper.xml
...nergy-mapper/src/main/resources/mapper/WorkUserMapper.xml
+1
-1
StatisticsServiceImpl.java
...java/cn/wisenergy/service/impl/StatisticsServiceImpl.java
+4
-3
No files found.
wisenergy-mapper/src/main/resources/mapper/WorkUserMapper.xml
View file @
80169f81
...
...
@@ -86,7 +86,7 @@
where id = #{userId}
</select>
<select
id=
"getStatisticsTableDtos"
resultType=
"cn.wisenergy.model.dto.StatisticsTableDto"
>
select u.id AS user_id, u.name AS
dept
_name, d.dept_name
select u.id AS user_id, u.name AS
user
_name, d.dept_name
from work_user u join work_dept d on u.dept_id=d.id
where u.id in
<foreach
collection=
"list"
open=
"("
close=
")"
separator=
","
item=
"id"
>
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/impl/StatisticsServiceImpl.java
View file @
80169f81
...
...
@@ -104,15 +104,16 @@ public class StatisticsServiceImpl implements StatisticsService {
PageHelper
.
startPage
(
param
.
getCurrentPage
(),
param
.
getSize
());
List
<
Integer
>
userIds
=
workUserDeptMapper
.
listByDeptId
(
deptId
);
PageInfo
pageInfo
=
new
PageInfo
(
userIds
);
// 获取
员工一个月中已审核、自动审核的工单单日汇总汇总
// 获取
用户姓名、部门名称
List
<
StatisticsTableDto
>
statisticsTableDtos
=
workUserMapper
.
getStatisticsTableDtos
(
userIds
);
// 获取当月每天工时信息
// 获取
用户
当月每天工时信息
List
<
DayWorkTimeAndType
>
dayWorkTimeAndTypes
=
workTimeOrderMapper
.
listByDateAndUserId
(
year
,
month
,
userIds
);
// 将工单集合与对应用户信息封装在一起
Iterator
<
StatisticsTableDto
>
statisticsTableDtoIterator
=
statisticsTableDtos
.
iterator
();
while
(
statisticsTableDtoIterator
.
hasNext
())
{
StatisticsTableDto
statisticsTableDto
=
statisticsTableDtoIterator
.
next
();
// 存放一位用户一个月中每天的工时信息
ArrayList
<
DayWorkTimeAndType
>
dayWorkTimeAndTypes1
=
new
ArrayList
<>();
// 查询出的工时信息遍历
Iterator
<
DayWorkTimeAndType
>
workTimeAndTypeIterator
=
dayWorkTimeAndTypes
.
iterator
();
...
...
@@ -123,7 +124,7 @@ public class StatisticsServiceImpl implements StatisticsService {
}
}
statisticsTableDto
.
setDayWorkTimeAndTypeList
(
dayWorkTimeAndTypes1
);
statisticsTableDtos
.
add
(
statisticsTableDto
);
}
pageInfo
.
setList
(
statisticsTableDtos
);
return
pageInfo
;
...
...
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