Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wms_api
Project
Project
Details
Activity
Releases
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
高宇
wms_api
Commits
55c9f988
Commit
55c9f988
authored
Dec 23, 2024
by
方建宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改导出权限
parent
26645fc9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
72 additions
and
1 deletion
+72
-1
CustInfoServiceImpl.java
...cisoft/bus/custinfo/service/impl/CustInfoServiceImpl.java
+16
-0
CustRechargeController.java
...t/bus/custrecharge/controller/CustRechargeController.java
+1
-1
CustRechargeServiceImpl.java
...us/custrecharge/service/impl/CustRechargeServiceImpl.java
+16
-0
StoreGoodsApplyServiceImpl.java
...regoodsapply/service/impl/StoreGoodsApplyServiceImpl.java
+16
-0
StoreGoodsLogServiceImpl.java
.../storegoodslog/service/impl/StoreGoodsLogServiceImpl.java
+23
-0
No files found.
src/main/java/org/rcisoft/bus/custinfo/service/impl/CustInfoServiceImpl.java
View file @
55c9f988
...
...
@@ -150,6 +150,22 @@ public class CustInfoServiceImpl extends ServiceImpl<CustInfoRepository,CustInfo
*/
@Override
public
List
<
CustInfo
>
export
(
CustInfo
custInfo
)
{
// 获取当前用户的角色ID
String
roleIds
=
CyUserUtil
.
getAuthenRoleIds
();
boolean
adminKey
=
adminProperties
.
getAdmin
().
contains
(
CyUserUtil
.
getAuthenBusinessId
());
// 将角色ID字符串分割成数组,并去除每个ID前后的空白字符
Set
<
String
>
userRoles
=
Arrays
.
stream
(
roleIds
.
split
(
","
))
.
map
(
String:
:
trim
)
.
collect
(
Collectors
.
toSet
());
// 检查当前用户是否有管理员权限
boolean
isAdmin
=
userRoles
.
stream
()
.
anyMatch
(
adminProperties
.
getAdminRole
()::
contains
);
// 根据是否是管理员调整查询条件
if
(!
isAdmin
||
!
adminKey
)
{
custInfo
.
setStoreId
(
CyUserUtil
.
getAuthenDept
());
}
List
<
CustInfo
>
custInfoList
=
baseMapper
.
queryCustInfos
(
custInfo
);
return
custInfoList
;
}
...
...
src/main/java/org/rcisoft/bus/custrecharge/controller/CustRechargeController.java
View file @
55c9f988
...
...
@@ -123,7 +123,7 @@ public class CustRechargeController extends CyPaginationController<CustRecharge>
custRechargeServiceImpl
.
findAllByPagination
(
getPaginationUtility
(),
custRecharge
);
return
getGridModelResponse
();
}
//@PreAuthorize("@cyPerm.hasPerm('sys:recharge:export')")
@CyOpeLogAnno
(
title
=
"system-客户消费表管理-查询客户消费表"
,
businessType
=
CyLogTypeEnum
.
EXPORT
)
@ApiOperation
(
value
=
"导出客户消费表信息"
,
notes
=
"导出客户消费表信息"
)
@GetMapping
(
value
=
"/export"
)
...
...
src/main/java/org/rcisoft/bus/custrecharge/service/impl/CustRechargeServiceImpl.java
View file @
55c9f988
...
...
@@ -153,6 +153,22 @@ public class CustRechargeServiceImpl extends ServiceImpl<CustRechargeRepository,
*/
@Override
public
List
<
CustRecharge
>
export
(
CustRecharge
custRecharge
)
{
// 获取当前用户的角色ID
String
roleIds
=
CyUserUtil
.
getAuthenRoleIds
();
boolean
adminKey
=
adminProperties
.
getAdmin
().
contains
(
CyUserUtil
.
getAuthenBusinessId
());
// 将角色ID字符串分割成数组,并去除每个ID前后的空白字符
Set
<
String
>
userRoles
=
Arrays
.
stream
(
roleIds
.
split
(
","
))
.
map
(
String:
:
trim
)
.
collect
(
Collectors
.
toSet
());
// 检查当前用户是否有管理员权限
boolean
isAdmin
=
userRoles
.
stream
()
.
anyMatch
(
adminProperties
.
getAdminRole
()::
contains
);
// 根据是否是管理员调整查询条件
if
(!
isAdmin
||
!
adminKey
)
{
custRecharge
.
setStoreId
(
CyUserUtil
.
getAuthenDept
());
}
List
<
CustRecharge
>
custRechargeList
=
baseMapper
.
queryCustRecharges
(
custRecharge
);
return
custRechargeList
;
}
...
...
src/main/java/org/rcisoft/bus/storegoodsapply/service/impl/StoreGoodsApplyServiceImpl.java
View file @
55c9f988
...
...
@@ -361,6 +361,22 @@ public class StoreGoodsApplyServiceImpl extends ServiceImpl<StoreGoodsApplyRepos
*/
@Override
public
List
<
StoreGoodsApply
>
export
(
StoreGoodsApply
storeGoodsApply
)
{
// 获取当前用户的角色ID
String
roleIds
=
CyUserUtil
.
getAuthenRoleIds
();
boolean
adminKey
=
adminProperties
.
getAdmin
().
contains
(
CyUserUtil
.
getAuthenBusinessId
());
// 将角色ID字符串分割成数组,并去除每个ID前后的空白字符
Set
<
String
>
userRoles
=
Arrays
.
stream
(
roleIds
.
split
(
","
))
.
map
(
String:
:
trim
)
.
collect
(
Collectors
.
toSet
());
// 检查当前用户是否有管理员权限
boolean
isAdmin
=
userRoles
.
stream
()
.
anyMatch
(
adminProperties
.
getAdminRole
()::
contains
);
// 根据是否是管理员调整查询条件
if
(!
isAdmin
||
!
adminKey
)
{
storeGoodsApply
.
setStoreId
(
CyUserUtil
.
getAuthenDept
());
}
List
<
StoreGoodsApply
>
storeGoodsApplyList
=
baseMapper
.
queryWmsGoodsApplys
(
storeGoodsApply
);
return
storeGoodsApplyList
;
}
...
...
src/main/java/org/rcisoft/bus/storegoodslog/service/impl/StoreGoodsLogServiceImpl.java
View file @
55c9f988
...
...
@@ -3,6 +3,7 @@ package org.rcisoft.bus.storegoodslog.service.impl;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
lombok.extern.slf4j.Slf4j
;
import
org.rcisoft.bean.AdminProperties
;
import
org.rcisoft.bus.storegoodsapply.entity.StoreGoodsApply
;
import
org.rcisoft.bus.storegoodsapply.service.StoreGoodsApplyService
;
import
org.rcisoft.bus.storegoodslog.dao.StoreGoodsLogRepository
;
...
...
@@ -20,7 +21,10 @@ import org.springframework.transaction.annotation.Isolation;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
/**
* Created by cy on 2024年5月29日 下午1:21:49.
...
...
@@ -30,6 +34,9 @@ import java.util.List;
@Slf4j
public
class
StoreGoodsLogServiceImpl
extends
ServiceImpl
<
StoreGoodsLogRepository
,
StoreGoodsLog
>
implements
StoreGoodsLogService
{
@Autowired
protected
AdminProperties
adminProperties
;
@Autowired
private
StoreGoodsLogService
storeGoodsLogServiceImpl
;
...
...
@@ -164,6 +171,22 @@ public class StoreGoodsLogServiceImpl extends ServiceImpl<StoreGoodsLogRepositor
*/
@Override
public
List
<
StoreGoodsLog
>
export
(
StoreGoodsLog
storeGoodsLog
)
{
// 获取当前用户的角色ID
String
roleIds
=
CyUserUtil
.
getAuthenRoleIds
();
boolean
adminKey
=
adminProperties
.
getAdmin
().
contains
(
CyUserUtil
.
getAuthenBusinessId
());
// 将角色ID字符串分割成数组,并去除每个ID前后的空白字符
Set
<
String
>
userRoles
=
Arrays
.
stream
(
roleIds
.
split
(
","
))
.
map
(
String:
:
trim
)
.
collect
(
Collectors
.
toSet
());
// 检查当前用户是否有管理员权限
boolean
isAdmin
=
userRoles
.
stream
()
.
anyMatch
(
adminProperties
.
getAdminRole
()::
contains
);
// 根据是否是管理员调整查询条件
if
(!
isAdmin
||
!
adminKey
)
{
storeGoodsLog
.
setStoreId
(
CyUserUtil
.
getAuthenDept
());
}
List
<
StoreGoodsLog
>
storeGoodsLogList
=
baseMapper
.
queryWmsGoodsLogs
(
storeGoodsLog
);
return
storeGoodsLogList
;
}
...
...
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