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
6e20d889
Commit
6e20d889
authored
Feb 25, 2021
by
nie'hong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善工时统计
parent
7d8010e5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
StatisticsServiceImpl.java
...java/cn/wisenergy/service/impl/StatisticsServiceImpl.java
+12
-11
No files found.
wisenergy-service/src/main/java/cn/wisenergy/service/impl/StatisticsServiceImpl.java
View file @
6e20d889
...
@@ -513,7 +513,6 @@ public class StatisticsServiceImpl implements StatisticsService {
...
@@ -513,7 +513,6 @@ public class StatisticsServiceImpl implements StatisticsService {
List
<
Integer
>
role
=
UserRoleLevelUtils
.
getRole
(
userId
);
List
<
Integer
>
role
=
UserRoleLevelUtils
.
getRole
(
userId
);
// 判断是否有该权限
// 判断是否有该权限
UserRoleLevelUtils
.
isManagerLevel
(
userId
,
LevelEnum
.
PROJECT_STATITSTICS
.
getLevelName
());
UserRoleLevelUtils
.
isManagerLevel
(
userId
,
LevelEnum
.
PROJECT_STATITSTICS
.
getLevelName
());
// 获取用户信息
// 获取用户信息
WorkUser
user
=
workUserService
.
getById
(
userId
);
WorkUser
user
=
workUserService
.
getById
(
userId
);
// 获取用户权限的级别
// 获取用户权限的级别
...
@@ -547,8 +546,9 @@ public class StatisticsServiceImpl implements StatisticsService {
...
@@ -547,8 +546,9 @@ public class StatisticsServiceImpl implements StatisticsService {
// 查询部门下所有项目,部门主键是用户的部门主键,当前权限最高级别为部门级别
// 查询部门下所有项目,部门主键是用户的部门主键,当前权限最高级别为部门级别
map
.
put
(
"deptId"
,
user
.
getDeptId
());
map
.
put
(
"deptId"
,
user
.
getDeptId
());
userManageProjects
=
workProjectMapper
.
getListByCriteria
(
map
);
userManageProjects
=
workProjectMapper
.
getListByCriteria
(
map
);
}
else
{
map
.
put
(
"managerId"
,
user
.
getId
());
map
.
put
(
"managerId"
,
user
.
getId
());
workProjectMapper
.
getListByCriteria
(
map
);
userManageProjects
=
workProjectMapper
.
getListByCriteria
(
map
);
}
}
// 管理项目为空则提前结束
// 管理项目为空则提前结束
...
@@ -569,6 +569,9 @@ public class StatisticsServiceImpl implements StatisticsService {
...
@@ -569,6 +569,9 @@ public class StatisticsServiceImpl implements StatisticsService {
queryType
.
add
(
type
.
getId
());
queryType
.
add
(
type
.
getId
());
}
}
}
}
// 查询各个项目下所有人的加班工时和平常工时
List
<
UserWorkTimeStatisticsByProject
>
userProjectWorkTimeStatistics1
=
workTimeOrderMapper
.
getUserProjectWorkTimeStatistics
(
startDate
,
endDate
,
projectIds
,
true
);
// 部门级别以上的用户可以查询所管理项目的成员所填的其他类型的工单
// 部门级别以上的用户可以查询所管理项目的成员所填的其他类型的工单
List
<
Integer
>
userIds
=
workUserProjectMapper
.
selectUserIdByProjectIds
(
projectIds
);
List
<
Integer
>
userIds
=
workUserProjectMapper
.
selectUserIdByProjectIds
(
projectIds
);
if
(
rank
.
contains
(
LevelRankEnum
.
DEPARTMENT_LEVEL
.
getRank
())
||
rank
.
contains
(
LevelRankEnum
.
CENTRAL_LEVEL
.
getRank
()))
{
if
(
rank
.
contains
(
LevelRankEnum
.
DEPARTMENT_LEVEL
.
getRank
())
||
rank
.
contains
(
LevelRankEnum
.
CENTRAL_LEVEL
.
getRank
()))
{
...
@@ -576,9 +579,6 @@ public class StatisticsServiceImpl implements StatisticsService {
...
@@ -576,9 +579,6 @@ public class StatisticsServiceImpl implements StatisticsService {
if
(
CollectionUtil
.
isNotEmpty
(
userWorkTimeStatisticsByProjectList
))
{
if
(
CollectionUtil
.
isNotEmpty
(
userWorkTimeStatisticsByProjectList
))
{
userProjectWorkTimeStatistics
.
get
(
0
).
getProjectWorkTimeAndType
().
addAll
(
userWorkTimeStatisticsByProjectList
.
get
(
0
).
getProjectWorkTimeAndType
());
userProjectWorkTimeStatistics
.
get
(
0
).
getProjectWorkTimeAndType
().
addAll
(
userWorkTimeStatisticsByProjectList
.
get
(
0
).
getProjectWorkTimeAndType
());
}
}
}
// 查询各个项目下所有人的加班工时和平常工时
List
<
UserWorkTimeStatisticsByProject
>
userProjectWorkTimeStatistics1
=
workTimeOrderMapper
.
getUserProjectWorkTimeStatistics
(
startDate
,
endDate
,
projectIds
,
true
);
// 查询各个项目下所有人的其他除了项目、商机、请假、调休类型的加班工时和平常工时
// 查询各个项目下所有人的其他除了项目、商机、请假、调休类型的加班工时和平常工时
List
<
UserWorkTimeStatisticsByProject
>
userWorkTimeStatisticsByProjects
=
workTimeOrderMapper
.
selectListByType
(
startDate
,
endDate
,
queryType
,
userIds
,
true
);
List
<
UserWorkTimeStatisticsByProject
>
userWorkTimeStatisticsByProjects
=
workTimeOrderMapper
.
selectListByType
(
startDate
,
endDate
,
queryType
,
userIds
,
true
);
for
(
UserWorkTimeStatisticsByProject
userWorkTimeStatisticsByProject
:
userWorkTimeStatisticsByProjects
)
{
for
(
UserWorkTimeStatisticsByProject
userWorkTimeStatisticsByProject
:
userWorkTimeStatisticsByProjects
)
{
...
@@ -588,6 +588,7 @@ public class StatisticsServiceImpl implements StatisticsService {
...
@@ -588,6 +588,7 @@ public class StatisticsServiceImpl implements StatisticsService {
}
}
}
}
}
}
}
userProjectWorkTimeStatistics
.
addAll
(
userProjectWorkTimeStatistics1
);
userProjectWorkTimeStatistics
.
addAll
(
userProjectWorkTimeStatistics1
);
// 取出单人的项目工时统计
// 取出单人的项目工时统计
...
...
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