zwj пре 10 месеци
родитељ
комит
1d08af4fe3

+ 8 - 6
ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostPlanController.java

@@ -5,6 +5,7 @@ import javax.servlet.http.HttpServletResponse;
5
 
5
 
6
 import com.baomidou.mybatisplus.annotation.TableField;
6
 import com.baomidou.mybatisplus.annotation.TableField;
7
 import com.ruoyi.common.constant.HttpStatus;
7
 import com.ruoyi.common.constant.HttpStatus;
8
+import com.ruoyi.common.constant.PostPlanEnum;
8
 import com.ruoyi.common.core.domain.entity.SysDept;
9
 import com.ruoyi.common.core.domain.entity.SysDept;
9
 import com.ruoyi.common.core.domain.model.LoginUser;
10
 import com.ruoyi.common.core.domain.model.LoginUser;
10
 import com.ruoyi.common.enums.DeptCode;
11
 import com.ruoyi.common.enums.DeptCode;
@@ -221,8 +222,8 @@ public class PostPlanController extends BaseController {
221
         // 判断当前状态
222
         // 判断当前状态
222
         PostPlan postPlan = postPlanService.selectPostPlanById(id);
223
         PostPlan postPlan = postPlanService.selectPostPlanById(id);
223
         // 审核过得不在审核
224
         // 审核过得不在审核
224
-        if (postPlan.getStatusIcfa() == 3) {
225
-            return AjaxResult.error(HttpStatus.SUCCESS,"审核失败,请勿重复审核!");
225
+        if (postPlan.getStatusIcfa() == PostPlanEnum.STATUS_ICFA_PASS.getValue()) {
226
+            return AjaxResult.error("审核失败,请勿重复审核!");
226
         }
227
         }
227
         // 判断审核的权限
228
         // 判断审核的权限
228
         LoginUser loginUser = SecurityUtils.getLoginUser();
229
         LoginUser loginUser = SecurityUtils.getLoginUser();
@@ -255,12 +256,13 @@ public class PostPlanController extends BaseController {
255
         // 判断当前状态
256
         // 判断当前状态
256
         PostPlan postPlan = postPlanService.selectPostPlanById(id);
257
         PostPlan postPlan = postPlanService.selectPostPlanById(id);
257
         // 审核过得不在审核
258
         // 审核过得不在审核
258
-        if (postPlan.getStatusHr() == 3) {
259
-            return AjaxResult.error(HttpStatus.SUCCESS, "审核失败,请勿重复审核!");
259
+        if (postPlan.getStatusHr() == PostPlanEnum.STATUS_HR_PASS.getValue()) {
260
+            return AjaxResult.error( "审核失败,请勿重复审核!");
260
         }
261
         }
261
         // 判断顺序
262
         // 判断顺序
262
-        if (postPlan.getStatusIcfa() != 3) {
263
-            return AjaxResult.error(HttpStatus.SUCCESS,"审核失败,审核流程有误!!");
263
+        if (postPlan.getStatusIcfa() != PostPlanEnum.STATUS_ICFA_PASS.getValue()
264
+                && postPlan.getStatus() != PostPlanEnum.STATUS_ING.getValue()) {
265
+            return AjaxResult.error(HttpStatus.WARN,"审核失败,审核流程有误!!");
264
         }
266
         }
265
         // 判断审核的权限
267
         // 判断审核的权限
266
         LoginUser loginUser = SecurityUtils.getLoginUser();
268
         LoginUser loginUser = SecurityUtils.getLoginUser();

+ 8 - 6
ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostProgrammeController.java

@@ -6,6 +6,7 @@ import java.util.Optional;
6
 import javax.servlet.http.HttpServletResponse;
6
 import javax.servlet.http.HttpServletResponse;
7
 
7
 
8
 import com.ruoyi.common.constant.HttpStatus;
8
 import com.ruoyi.common.constant.HttpStatus;
9
+import com.ruoyi.common.constant.PostProgrammeEnum;
9
 import com.ruoyi.common.core.domain.entity.SysDept;
10
 import com.ruoyi.common.core.domain.entity.SysDept;
10
 import com.ruoyi.common.core.domain.model.LoginUser;
11
 import com.ruoyi.common.core.domain.model.LoginUser;
11
 import com.ruoyi.common.enums.DeptCode;
12
 import com.ruoyi.common.enums.DeptCode;
@@ -209,8 +210,8 @@ public class PostProgrammeController extends BaseController {
209
         PostProgramme postProgramme = postProgrammeService.selectPostProgrammeById(id);
210
         PostProgramme postProgramme = postProgrammeService.selectPostProgrammeById(id);
210
         // 审核过得不在审核
211
         // 审核过得不在审核
211
 
212
 
212
-        if (postProgramme.getStatusHr() == 3) {
213
-            return AjaxResult.error(HttpStatus.SUCCESS, "审核失败,请勿重复审核!");
213
+        if (postProgramme.getStatusHr() == PostProgrammeEnum.STATUS_HR_PASS.getValue()) {
214
+            return AjaxResult.error("审核失败,请勿重复审核!");
214
         }
215
         }
215
         // 判断审核的权限
216
         // 判断审核的权限
216
         LoginUser loginUser = SecurityUtils.getLoginUser();
217
         LoginUser loginUser = SecurityUtils.getLoginUser();
@@ -241,12 +242,13 @@ public class PostProgrammeController extends BaseController {
241
         // 判断当前状态
242
         // 判断当前状态
242
         PostProgramme postProgramme = postProgrammeService.selectPostProgrammeById(id);
243
         PostProgramme postProgramme = postProgrammeService.selectPostProgrammeById(id);
243
         // 审核过得不在审核
244
         // 审核过得不在审核
244
-        if (postProgramme.getStatusHr() != 3) {
245
-            return AjaxResult.error(HttpStatus.SUCCESS,"审核失败,审核流程有误!!");
245
+        if (postProgramme.getStatusHr() != PostProgrammeEnum.STATUS_PASS.getValue()
246
+                && postProgramme.getStatus() == PostProgrammeEnum.STATUS_ING.getValue()) {
247
+            return AjaxResult.error(HttpStatus.WARN,"审核失败,审核流程有误!!");
246
         }
248
         }
247
 
249
 
248
-        if (postProgramme.getStatusIcfa() == 3) {
249
-            return AjaxResult.error(HttpStatus.SUCCESS,"审核失败,请勿重复审核!");
250
+        if (postProgramme.getStatusIcfa() == PostProgrammeEnum.STATUS_ICFA_PASS.getValue()) {
251
+            return AjaxResult.error("审核失败,请勿重复审核!");
250
         }
252
         }
251
         // 判断审核的权限
253
         // 判断审核的权限
252
         LoginUser loginUser = SecurityUtils.getLoginUser();
254
         LoginUser loginUser = SecurityUtils.getLoginUser();