Ver código fonte

月度对表

hexiao 2 anos atrás
pai
commit
7c53af8926

+ 7 - 1
purchase-admin/src/main/java/com/ozs/web/controller/plan/MonthlyReconciliationController.java

@@ -65,7 +65,13 @@ public class MonthlyReconciliationController extends BaseController {
                            @RequestBody MonthlyReconciliationPageReqVo vo) {
         vo.setDeptId(getDeptId());
         vo.setUserId(getUserId());
-        vo.setRoleFlay(true);
+        vo.setRoleFlay(false);
+        // 添加数据权限
+        List<String> roleKeys = getLoginUser().getUser().getRoles().stream().map(SysRole::getRoleKey).collect(Collectors.toList());
+        if (roleKeys.contains(Constants.PURCHASING_MANAGEMENT)
+                || roleKeys.contains(Constants.PURCHASE_SERVICES)) {
+            vo.setRoleFlay(true);
+        }
         // 分页查询
         IPage<MonthlyReconciliation> page = monthlyReconciliationService.queryPage(vo);
         if (!ObjectUtils.isEmpty(page.getRecords()) && page.getRecords().size() > 0) {