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