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
bbb3d606
Commit
bbb3d606
authored
Feb 24, 2021
by
nie'hong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善工时统计
parent
041f9e52
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
StatisticsServiceImpl.java
...java/cn/wisenergy/service/impl/StatisticsServiceImpl.java
+6
-3
No files found.
wisenergy-service/src/main/java/cn/wisenergy/service/impl/StatisticsServiceImpl.java
View file @
bbb3d606
...
...
@@ -90,7 +90,7 @@ public class StatisticsServiceImpl implements StatisticsService {
// 用户权限名
List
<
String
>
userAuthority
=
this
.
getUserAuthority
(
param
.
getUserId
());
if
(!
userAuthority
.
contains
(
LevelEnum
.
TIMEEXPORT
.
getLevelName
()))
{
if
(
CollectionUtil
.
isEmpty
(
userAuthority
)
||
!
userAuthority
.
contains
(
LevelEnum
.
TIMEEXPORT
.
getLevelName
()))
{
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
THE_USER_NOT_MANAGER_PLASE_MANAGER_LOGIN
);
}
//默认时间为当月
...
...
@@ -155,7 +155,7 @@ public class StatisticsServiceImpl implements StatisticsService {
// 存放查询条件
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
// 用户有审批权限
if
(
userAuthority
.
contains
(
LevelEnum
.
EXAMINE
.
getLevelName
()))
{
if
(
CollectionUtil
.
isNotEmpty
(
userAuthority
)
&&
userAuthority
.
contains
(
LevelEnum
.
EXAMINE
.
getLevelName
()))
{
//以审批人、审核状态、开始时间查询本月审批数量
map
.
put
(
"reviewerId"
,
userId
);
map
.
put
(
"startDay"
,
firstDayOfMonth
);
...
...
@@ -269,7 +269,7 @@ public class StatisticsServiceImpl implements StatisticsService {
// 用户权限
List
<
String
>
userAuthority
=
this
.
getUserAuthority
(
userId
);
// 没有审批权限
if
(!
userAuthority
.
contains
(
LevelEnum
.
EXAMINE
.
getLevelName
()))
{
if
(
CollectionUtil
.
isNotEmpty
(
userAuthority
)
||
!
userAuthority
.
contains
(
LevelEnum
.
EXAMINE
.
getLevelName
()))
{
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
THE_USER_NOT_MANAGER_PLASE_MANAGER_LOGIN
);
}
WorkUser
user
=
workUserService
.
getById
(
userId
);
...
...
@@ -774,6 +774,9 @@ public class StatisticsServiceImpl implements StatisticsService {
List
<
Integer
>
list
=
UserRoleLevelUtils
.
getlevelIds
(
role
);
// 获取权限对象
List
<
WorkLevel
>
workLevels
=
UserRoleLevelUtils
.
getlevelByIds
(
list
);
if
(
CollectionUtil
.
isEmpty
(
workLevels
))
{
return
null
;
}
// 获取权限名
List
<
String
>
collect
=
workLevels
.
stream
().
map
(
WorkLevel:
:
getName
).
collect
(
Collectors
.
toList
());
return
collect
;
...
...
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