|
@@ -143,8 +143,12 @@ public class CostControlServiceImpl extends ServiceImpl<CostControlMapper, CostC
|
|
|
new SqlField(CostControl::getVoucherNo)
|
|
|
);
|
|
|
|
|
|
- //权限过滤 自己看自己
|
|
|
- wrapper.eq("cc", CostControl::getCreateUser, SecurityUtils.getUserId());
|
|
|
+ //权限过滤 自己看自己, 财务主管看全部
|
|
|
+ List<String> roleKeys = UserUtil.getUserRoleKeys(SecurityUtils.getUserId());
|
|
|
+ if (!roleKeys.contains("cfo")) {
|
|
|
+ //非财务主管 自己看自己
|
|
|
+ wrapper.eq("cc", CostControl::getCreateUser, SecurityUtils.getUserId());
|
|
|
+ }
|
|
|
|
|
|
wrapper.orderByDesc("cc", CostControl::getId);
|
|
|
Page<CostControlVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
|