|
@@ -6,6 +6,7 @@ import java.util.Optional;
|
6
|
6
|
import javax.servlet.http.HttpServletResponse;
|
7
|
7
|
|
8
|
8
|
import com.ruoyi.common.constant.HttpStatus;
|
|
9
|
+import com.ruoyi.common.constant.PostPlanEnum;
|
9
|
10
|
import com.ruoyi.common.constant.PostProgrammeEnum;
|
10
|
11
|
import com.ruoyi.common.core.domain.entity.SysDept;
|
11
|
12
|
import com.ruoyi.common.core.domain.model.LoginUser;
|
|
@@ -214,10 +215,15 @@ public class PostProgrammeController extends BaseController {
|
214
|
215
|
// 判断当前状态
|
215
|
216
|
PostProgramme postProgramme = postProgrammeService.selectPostProgrammeById(id);
|
216
|
217
|
// 审核过得不在审核
|
217
|
|
-
|
218
|
|
- if (postProgramme.getStatusHr() == PostProgrammeEnum.STATUS_HR_PASS.getValue()) {
|
219
|
|
- return AjaxResult.error("审核失败,请勿重复审核!");
|
|
218
|
+ if (postProgramme.getStatusHr() == PostPlanEnum.STATUS_HR_PASS.getValue()) {
|
|
219
|
+ return AjaxResult.error( "审核失败,请勿重复审核!");
|
|
220
|
+ }
|
|
221
|
+ // 判断顺序
|
|
222
|
+ if (postProgramme.getStatusIcfa() != PostPlanEnum.STATUS_ICFA_PASS.getValue()
|
|
223
|
+ && postProgramme.getStatus() != PostPlanEnum.STATUS_ING.getValue()) {
|
|
224
|
+ return AjaxResult.error(HttpStatus.WARN,"审核失败,审核流程有误!!");
|
220
|
225
|
}
|
|
226
|
+
|
221
|
227
|
// 当前登录用户的部门id 查询岗位id是否在内
|
222
|
228
|
SysDept sysDept = sysDeptService.selectDeptById(loginUser.getDeptId());
|
223
|
229
|
if (!sysDept.getDeptCode().equals(DeptCode.DEPT_HR.getCode())) {
|
|
@@ -247,12 +253,7 @@ public class PostProgrammeController extends BaseController {
|
247
|
253
|
// 判断当前状态
|
248
|
254
|
PostProgramme postProgramme = postProgrammeService.selectPostProgrammeById(id);
|
249
|
255
|
// 审核过得不在审核
|
250
|
|
- if (postProgramme.getStatusHr() != PostProgrammeEnum.STATUS_PASS.getValue()
|
251
|
|
- && postProgramme.getStatus() == PostProgrammeEnum.STATUS_ING.getValue()) {
|
252
|
|
- return AjaxResult.error(HttpStatus.WARN,"审核失败,审核流程有误!!");
|
253
|
|
- }
|
254
|
|
-
|
255
|
|
- if (postProgramme.getStatusIcfa() == PostProgrammeEnum.STATUS_ICFA_PASS.getValue()) {
|
|
256
|
+ if (postProgramme.getStatusIcfa() == PostPlanEnum.STATUS_ICFA_PASS.getValue()) {
|
256
|
257
|
return AjaxResult.error("审核失败,请勿重复审核!");
|
257
|
258
|
}
|
258
|
259
|
|