zwj месяцев назад: 10
Родитель
Сommit
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 6
 import com.baomidou.mybatisplus.annotation.TableField;
7 7
 import com.ruoyi.common.constant.HttpStatus;
8
+import com.ruoyi.common.constant.PostPlanEnum;
8 9
 import com.ruoyi.common.core.domain.entity.SysDept;
9 10
 import com.ruoyi.common.core.domain.model.LoginUser;
10 11
 import com.ruoyi.common.enums.DeptCode;
@@ -221,8 +222,8 @@ public class PostPlanController extends BaseController {
221 222
         // 判断当前状态
222 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 229
         LoginUser loginUser = SecurityUtils.getLoginUser();
@@ -255,12 +256,13 @@ public class PostPlanController extends BaseController {
255 256
         // 判断当前状态
256 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 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 6
 import javax.servlet.http.HttpServletResponse;
7 7
 
8 8
 import com.ruoyi.common.constant.HttpStatus;
9
+import com.ruoyi.common.constant.PostProgrammeEnum;
9 10
 import com.ruoyi.common.core.domain.entity.SysDept;
10 11
 import com.ruoyi.common.core.domain.model.LoginUser;
11 12
 import com.ruoyi.common.enums.DeptCode;
@@ -209,8 +210,8 @@ public class PostProgrammeController extends BaseController {
209 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 217
         LoginUser loginUser = SecurityUtils.getLoginUser();
@@ -241,12 +242,13 @@ public class PostProgrammeController extends BaseController {
241 242
         // 判断当前状态
242 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 254
         LoginUser loginUser = SecurityUtils.getLoginUser();