2 Commits 72bcec7d14 ... 5b76997666

Author SHA1 Message Date
  zwj 5b76997666 Merge remote-tracking branch 'origin/master' 10 months ago
  zwj 94c069a676 添加超级管理员权限 10 months ago

+ 11 - 0
ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostAssessmentRulesController.java

@@ -186,6 +186,9 @@ public class PostAssessmentRulesController extends BaseController
186
 
186
 
187
         // 判断审核的权限
187
         // 判断审核的权限
188
         LoginUser loginUser = SecurityUtils.getLoginUser();
188
         LoginUser loginUser = SecurityUtils.getLoginUser();
189
+        if (SecurityUtils.isAdmin(loginUser.getUserId())) {
190
+            return toAjax(postAssessmentRulesService.statusApprove(id, status,  statusReason));
191
+        }
189
         // 当前登录用户的部门id 查询岗位id是否在内
192
         // 当前登录用户的部门id 查询岗位id是否在内
190
         SysDept sysDept = sysDeptService.selectDeptById(loginUser.getDeptId());
193
         SysDept sysDept = sysDeptService.selectDeptById(loginUser.getDeptId());
191
         if (!sysDept.getDeptCode().equals(DeptCode.DEPT_ICFA.getCode())) {
194
         if (!sysDept.getDeptCode().equals(DeptCode.DEPT_ICFA.getCode())) {
@@ -214,6 +217,10 @@ public class PostAssessmentRulesController extends BaseController
214
 
217
 
215
         // 判断审核的权限
218
         // 判断审核的权限
216
         LoginUser loginUser = SecurityUtils.getLoginUser();
219
         LoginUser loginUser = SecurityUtils.getLoginUser();
220
+        if (SecurityUtils.isAdmin(loginUser.getUserId())){
221
+            return toAjax(postAssessmentRulesService.statusApprove(id, status,  statusReason));
222
+        }
223
+
217
         // 当前登录用户的部门id 查询岗位id是否在内
224
         // 当前登录用户的部门id 查询岗位id是否在内
218
         SysDept sysDept = sysDeptService.selectDeptById(loginUser.getDeptId());
225
         SysDept sysDept = sysDeptService.selectDeptById(loginUser.getDeptId());
219
         if (!sysDept.getDeptCode().equals(DeptCode.DEPT_ICFA.getCode())) {
226
         if (!sysDept.getDeptCode().equals(DeptCode.DEPT_ICFA.getCode())) {
@@ -241,6 +248,10 @@ public class PostAssessmentRulesController extends BaseController
241
 
248
 
242
         // 判断审核的权限
249
         // 判断审核的权限
243
         LoginUser loginUser = SecurityUtils.getLoginUser();
250
         LoginUser loginUser = SecurityUtils.getLoginUser();
251
+        if (SecurityUtils.isAdmin(loginUser.getUserId())) {
252
+            return toAjax(postAssessmentRulesService.statusApprove(id, status,  statusReason));
253
+        }
254
+
244
         // 当前登录用户的部门id 查询岗位id是否在内
255
         // 当前登录用户的部门id 查询岗位id是否在内
245
         SysDept sysDept = sysDeptService.selectDeptById(loginUser.getDeptId());
256
         SysDept sysDept = sysDeptService.selectDeptById(loginUser.getDeptId());
246
         if (!sysDept.getDeptCode().equals(DeptCode.DEPT_ICFA.getCode())) {
257
         if (!sysDept.getDeptCode().equals(DeptCode.DEPT_ICFA.getCode())) {

+ 4 - 0
ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostCheckedReportController.java

@@ -230,6 +230,10 @@ public class PostCheckedReportController extends BaseController
230
 
230
 
231
         // 判断审核的权限
231
         // 判断审核的权限
232
         LoginUser loginUser = SecurityUtils.getLoginUser();
232
         LoginUser loginUser = SecurityUtils.getLoginUser();
233
+        if (SecurityUtils.isAdmin(loginUser.getUserId())) {
234
+            return toAjax(postCheckedReportService.statusApprove(id, status,  statusReason));
235
+        }
236
+
233
         // 当前登录用户的部门id 查询岗位id是否在内
237
         // 当前登录用户的部门id 查询岗位id是否在内
234
         SysDept sysDept = sysDeptService.selectDeptById(loginUser.getDeptId());
238
         SysDept sysDept = sysDeptService.selectDeptById(loginUser.getDeptId());
235
         if (!sysDept.getDeptCode().equals(DeptCode.DEPT_ICFA.getCode())) {
239
         if (!sysDept.getDeptCode().equals(DeptCode.DEPT_ICFA.getCode())) {

+ 11 - 3
ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostPlanController.java

@@ -219,14 +219,18 @@ public class PostPlanController extends BaseController {
219
     @Log(title = "岗检计划审核-Icfa", businessType = BusinessType.UPDATE)
219
     @Log(title = "岗检计划审核-Icfa", businessType = BusinessType.UPDATE)
220
     @PutMapping("/approveIcfa")
220
     @PutMapping("/approveIcfa")
221
     public AjaxResult approveIcfa(Long id, Integer statusIcfa, String reasonIcfa) {
221
     public AjaxResult approveIcfa(Long id, Integer statusIcfa, String reasonIcfa) {
222
+        // 判断审核的权限
223
+        LoginUser loginUser = SecurityUtils.getLoginUser();
224
+        if (SecurityUtils.isAdmin(loginUser.getUserId())) {
225
+            return toAjax(postPlanService.approveIcfa(id, statusIcfa, reasonIcfa));
226
+        }
222
         // 判断当前状态
227
         // 判断当前状态
223
         PostPlan postPlan = postPlanService.selectPostPlanById(id);
228
         PostPlan postPlan = postPlanService.selectPostPlanById(id);
224
         // 审核过得不在审核
229
         // 审核过得不在审核
225
         if (postPlan.getStatusIcfa() == PostPlanEnum.STATUS_ICFA_PASS.getValue()) {
230
         if (postPlan.getStatusIcfa() == PostPlanEnum.STATUS_ICFA_PASS.getValue()) {
226
             return AjaxResult.error("审核失败,请勿重复审核!");
231
             return AjaxResult.error("审核失败,请勿重复审核!");
227
         }
232
         }
228
-        // 判断审核的权限
229
-        LoginUser loginUser = SecurityUtils.getLoginUser();
233
+
230
         // 当前登录用户的部门id 查询岗位id是否在内
234
         // 当前登录用户的部门id 查询岗位id是否在内
231
         SysDept sysDept = sysDeptService.selectDeptById(loginUser.getDeptId());
235
         SysDept sysDept = sysDeptService.selectDeptById(loginUser.getDeptId());
232
         if (!sysDept.getDeptCode().equals(DeptCode.DEPT_ICFA.getCode())) {
236
         if (!sysDept.getDeptCode().equals(DeptCode.DEPT_ICFA.getCode())) {
@@ -253,6 +257,11 @@ public class PostPlanController extends BaseController {
253
     @Log(title = "岗检计划审核-HR", businessType = BusinessType.UPDATE)
257
     @Log(title = "岗检计划审核-HR", businessType = BusinessType.UPDATE)
254
     @PutMapping("/approveHr")
258
     @PutMapping("/approveHr")
255
     public AjaxResult approveHr(Long id, Integer statusHr, String reasonHr) {
259
     public AjaxResult approveHr(Long id, Integer statusHr, String reasonHr) {
260
+        // 判断审核的权限
261
+        LoginUser loginUser = SecurityUtils.getLoginUser();
262
+        if (SecurityUtils.isAdmin(loginUser.getUserId())) {
263
+            return toAjax(postPlanService.approveHr(id, statusHr, reasonHr));
264
+        }
256
         // 判断当前状态
265
         // 判断当前状态
257
         PostPlan postPlan = postPlanService.selectPostPlanById(id);
266
         PostPlan postPlan = postPlanService.selectPostPlanById(id);
258
         // 审核过得不在审核
267
         // 审核过得不在审核
@@ -265,7 +274,6 @@ public class PostPlanController extends BaseController {
265
             return AjaxResult.error(HttpStatus.WARN,"审核失败,审核流程有误!!");
274
             return AjaxResult.error(HttpStatus.WARN,"审核失败,审核流程有误!!");
266
         }
275
         }
267
         // 判断审核的权限
276
         // 判断审核的权限
268
-        LoginUser loginUser = SecurityUtils.getLoginUser();
269
         // 当前登录用户的部门id 查询岗位id是否在内
277
         // 当前登录用户的部门id 查询岗位id是否在内
270
         SysDept sysDept = sysDeptService.selectDeptById(loginUser.getDeptId());
278
         SysDept sysDept = sysDeptService.selectDeptById(loginUser.getDeptId());
271
         if (!sysDept.getDeptCode().equals(DeptCode.DEPT_HR.getCode())) {
279
         if (!sysDept.getDeptCode().equals(DeptCode.DEPT_HR.getCode())) {

+ 10 - 5
ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostProgrammeController.java

@@ -206,6 +206,10 @@ public class PostProgrammeController extends BaseController {
206
     @Log(title = "岗检方案审核-HR", businessType = BusinessType.UPDATE)
206
     @Log(title = "岗检方案审核-HR", businessType = BusinessType.UPDATE)
207
     @PutMapping("/approveHr")
207
     @PutMapping("/approveHr")
208
     public AjaxResult approveHr(Long id, Integer statusHr, String reasonHr) {
208
     public AjaxResult approveHr(Long id, Integer statusHr, String reasonHr) {
209
+        LoginUser loginUser = SecurityUtils.getLoginUser();
210
+        if (SecurityUtils.isAdmin(loginUser.getUserId())) {
211
+            return toAjax(postProgrammeService.approveHr(id, statusHr, reasonHr));
212
+        }
209
         // 判断当前状态
213
         // 判断当前状态
210
         PostProgramme postProgramme = postProgrammeService.selectPostProgrammeById(id);
214
         PostProgramme postProgramme = postProgrammeService.selectPostProgrammeById(id);
211
         // 审核过得不在审核
215
         // 审核过得不在审核
@@ -213,8 +217,6 @@ public class PostProgrammeController extends BaseController {
213
         if (postProgramme.getStatusHr() == PostProgrammeEnum.STATUS_HR_PASS.getValue()) {
217
         if (postProgramme.getStatusHr() == PostProgrammeEnum.STATUS_HR_PASS.getValue()) {
214
             return AjaxResult.error("审核失败,请勿重复审核!");
218
             return AjaxResult.error("审核失败,请勿重复审核!");
215
         }
219
         }
216
-        // 判断审核的权限
217
-        LoginUser loginUser = SecurityUtils.getLoginUser();
218
         // 当前登录用户的部门id 查询岗位id是否在内
220
         // 当前登录用户的部门id 查询岗位id是否在内
219
         SysDept sysDept = sysDeptService.selectDeptById(loginUser.getDeptId());
221
         SysDept sysDept = sysDeptService.selectDeptById(loginUser.getDeptId());
220
         if (!sysDept.getDeptCode().equals(DeptCode.DEPT_HR.getCode())) {
222
         if (!sysDept.getDeptCode().equals(DeptCode.DEPT_HR.getCode())) {
@@ -239,6 +241,11 @@ public class PostProgrammeController extends BaseController {
239
     @Log(title = "岗检方案审核-Icfa", businessType = BusinessType.UPDATE)
241
     @Log(title = "岗检方案审核-Icfa", businessType = BusinessType.UPDATE)
240
     @PutMapping("/approveIcfa")
242
     @PutMapping("/approveIcfa")
241
     public AjaxResult approveIcfa(Long id, Integer statusIcfa, String reasonIcfa) {
243
     public AjaxResult approveIcfa(Long id, Integer statusIcfa, String reasonIcfa) {
244
+        // 判断审核的权限
245
+        LoginUser loginUser = SecurityUtils.getLoginUser();
246
+        if (SecurityUtils.isAdmin(loginUser.getUserId())) {
247
+           return toAjax(postProgrammeService.approveIcfa(id, statusIcfa, reasonIcfa));
248
+        }
242
         // 判断当前状态
249
         // 判断当前状态
243
         PostProgramme postProgramme = postProgrammeService.selectPostProgrammeById(id);
250
         PostProgramme postProgramme = postProgrammeService.selectPostProgrammeById(id);
244
         // 审核过得不在审核
251
         // 审核过得不在审核
@@ -250,8 +257,7 @@ public class PostProgrammeController extends BaseController {
250
         if (postProgramme.getStatusIcfa() == PostProgrammeEnum.STATUS_ICFA_PASS.getValue()) {
257
         if (postProgramme.getStatusIcfa() == PostProgrammeEnum.STATUS_ICFA_PASS.getValue()) {
251
             return AjaxResult.error("审核失败,请勿重复审核!");
258
             return AjaxResult.error("审核失败,请勿重复审核!");
252
         }
259
         }
253
-        // 判断审核的权限
254
-        LoginUser loginUser = SecurityUtils.getLoginUser();
260
+
255
         // 当前登录用户的部门id 查询岗位id是否在内
261
         // 当前登录用户的部门id 查询岗位id是否在内
256
         SysDept sysDept = sysDeptService.selectDeptById(loginUser.getDeptId());
262
         SysDept sysDept = sysDeptService.selectDeptById(loginUser.getDeptId());
257
         if (!sysDept.getDeptCode().equals(DeptCode.DEPT_ICFA.getCode())) {
263
         if (!sysDept.getDeptCode().equals(DeptCode.DEPT_ICFA.getCode())) {
@@ -262,7 +268,6 @@ public class PostProgrammeController extends BaseController {
262
         if (sysPost.getPostLevel() != 1) {
268
         if (sysPost.getPostLevel() != 1) {
263
             return AjaxResult.error(HttpStatus.FORBIDDEN, "没有权限,请联系管理员授权");
269
             return AjaxResult.error(HttpStatus.FORBIDDEN, "没有权限,请联系管理员授权");
264
         }
270
         }
265
-
266
         return toAjax(postProgrammeService.approveIcfa(id, statusIcfa, reasonIcfa));
271
         return toAjax(postProgrammeService.approveIcfa(id, statusIcfa, reasonIcfa));
267
     }
272
     }
268
 }
273
 }