Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
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
fangxinjiang
yifu-mvp
Commits
873ff4b9
Commit
873ff4b9
authored
Jun 12, 2023
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.5.4--紧急新增任务:SSC开发组增加全量项目权限;
parent
2bd2a9b1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
6 deletions
+35
-6
TEmpChangeInfoServiceImpl.java
...yifu/archives/service/impl/TEmpChangeInfoServiceImpl.java
+27
-0
TSettleDomainMapper.xml
...ves-biz/src/main/resources/mapper/TSettleDomainMapper.xml
+8
-6
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpChangeInfoServiceImpl.java
View file @
873ff4b9
...
...
@@ -35,6 +35,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpChangeInfoService;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TEmpChangeInfoNewVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TEmpChangeInfoVO
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ClientNameConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
...
...
@@ -341,9 +342,35 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
public
IPage
<
TSettleDomain
>
getAllDeptPagePermission
(
Page
page
,
String
departName
,
String
nameOrNo
,
String
customerId
,
String
flag
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
String
userId
=
user
.
getId
();
// SSC开发组-1668092146875969537L 超管1
long
roleId
=
1659016108176130049L
;
boolean
isSsc
=
this
.
haveRole
(
user
,
roleId
);
if
(!
isSsc
)
{
isSsc
=
this
.
haveRole
(
user
,
1L
);
}
if
(
isSsc
)
{
userId
=
"-999"
;
}
return
tSettleDomainMapper
.
getPagePerMission
(
page
,
userId
,
departName
,
nameOrNo
,
customerId
,
flag
);
}
/**
* @Description: 检测是否有某个角色权限
* @Author: hgw
* @Date: 2023/6/12 11:09
* @return: boolean
**/
private
boolean
haveRole
(
YifuUser
user
,
long
roleId
)
{
List
<
Long
>
roleList
=
user
.
getClientRoleMap
().
get
(
ClientNameConstants
.
CLIENT_MVP
);
for
(
Long
role
:
roleList
)
{
if
(
role
==
roleId
)
{
return
true
;
}
}
return
false
;
}
/**
* 分页获取所有项目名称
* @return R
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TSettleDomainMapper.xml
View file @
873ff4b9
...
...
@@ -271,10 +271,14 @@
<include
refid=
"Base_Column_List"
/>
FROM
t_settle_domain a
<if
test=
"userId != null and userId.trim() != '-999'"
>
LEFT JOIN t_cutsomer_data_permisson b ON b.SETTLE_DOMAIN_NO = a.DEPART_NO
WHERE
b.USER_ID = #{userId}
AND a.DELETE_FLAG = '0'
</if>
WHERE a.DELETE_FLAG = '0'
/* 2023-6-12 11:12:15 hgw根据 */
<if
test=
"userId != null and userId.trim() != '-999'"
>
AND b.USER_ID = #{userId}
</if>
<if
test=
"departName != null and departName.trim() != ''"
>
and a.DEPART_NAME like concat("%",#{departName},"%")
</if>
...
...
@@ -287,9 +291,7 @@
<if
test=
"flag != null"
>
and a.STOP_FLAG='0'
</if>
GROUP BY
b.USER_ID,
b.SETTLE_DOMAIN_NO
GROUP BY a.id
</select>
...
...
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