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
2df1d160
Commit
2df1d160
authored
Mar 12, 2021
by
cq990612
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化代码结构
parent
904e6b74
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
WorkProjectMapper.xml
...gy-mapper/src/main/resources/mapper/WorkProjectMapper.xml
+1
-1
WorkProjectServiceImpl.java
...ava/cn/wisenergy/service/impl/WorkProjectServiceImpl.java
+16
-1
No files found.
wisenergy-mapper/src/main/resources/mapper/WorkProjectMapper.xml
View file @
2df1d160
...
...
@@ -153,7 +153,7 @@
LEFT JOIN work_user_project up ON p.id = up.project_id
LEFT JOIN work_user u on u.id = up.user_id
<where>
<if
test=
"deptAndManager
!=
0"
>
<if
test=
"deptAndManager
>
0"
>
<if
test=
"null !=type"
>
AND p.type = #{type}
</if>
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/impl/WorkProjectServiceImpl.java
View file @
2df1d160
...
...
@@ -222,13 +222,28 @@ public class WorkProjectServiceImpl implements WorkProjectService {
if
(
LevelRankEnum
.
DEPARTMENT_LEVEL
.
getRank
().
equals
(
userRoleLevelDto
.
getRank
())||
LevelRankEnum
.
CENTRAL_LEVEL
.
getRank
().
equals
(
userRoleLevelDto
.
getRank
()))
{
deptAndManager
++;
}
if
(
LevelRankEnum
.
DEPARTMENT_LEVEL
.
getRank
().
equals
(
userRoleLevelDto
.
getRank
()))
{
if
(
null
!=
gmpv
.
getDeptId
()
&&
!
user
.
getDeptId
().
equals
(
gmpv
.
getDeptId
()))
{
int
isCentre
=
0
;
for
(
UserRoleLevelDto
roleLevelDto
:
roleUserLevel
)
{
if
(
LevelEnum
.
PROJECT_MANAGER
.
getLevelName
().
equals
(
roleLevelDto
.
getLevelName
())
)
{
if
(
LevelRankEnum
.
CENTRAL_LEVEL
.
getRank
().
equals
(
roleLevelDto
.
getRank
()))
{
isCentre
++;
}
}
}
if
(
isCentre
==
0
)
{
deptAndManager
-=
10
;
}
}
}
}
}
if
(
projectIndex
==
0
)
{
user
.
setId
(
null
);
}
System
.
out
.
println
(
"deptAndManager = "
+
deptAndManager
);
int
page
=
gmpv
.
getPage
()
==
null
?
1
:
gmpv
.
getPage
();
int
pageSize
=
gmpv
.
getPageSize
()
==
null
?
10
:
gmpv
.
getPageSize
();
Integer
isConclusion
=
gmpv
.
getIsConclusion
();
...
...
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