Browse Source

顺序bug

zhaowenjing 9 months ago
parent
commit
f943257df5

+ 10 - 9
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.PostPlanEnum;
9
 import com.ruoyi.common.constant.PostProgrammeEnum;
10
 import com.ruoyi.common.constant.PostProgrammeEnum;
10
 import com.ruoyi.common.core.domain.entity.SysDept;
11
 import com.ruoyi.common.core.domain.entity.SysDept;
11
 import com.ruoyi.common.core.domain.model.LoginUser;
12
 import com.ruoyi.common.core.domain.model.LoginUser;
@@ -214,10 +215,15 @@ public class PostProgrammeController extends BaseController {
214
         // 判断当前状态
215
         // 判断当前状态
215
         PostProgramme postProgramme = postProgrammeService.selectPostProgrammeById(id);
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
         // 当前登录用户的部门id 查询岗位id是否在内
227
         // 当前登录用户的部门id 查询岗位id是否在内
222
         SysDept sysDept = sysDeptService.selectDeptById(loginUser.getDeptId());
228
         SysDept sysDept = sysDeptService.selectDeptById(loginUser.getDeptId());
223
         if (!sysDept.getDeptCode().equals(DeptCode.DEPT_HR.getCode())) {
229
         if (!sysDept.getDeptCode().equals(DeptCode.DEPT_HR.getCode())) {
@@ -247,12 +253,7 @@ public class PostProgrammeController extends BaseController {
247
         // 判断当前状态
253
         // 判断当前状态
248
         PostProgramme postProgramme = postProgrammeService.selectPostProgrammeById(id);
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
             return AjaxResult.error("审核失败,请勿重复审核!");
257
             return AjaxResult.error("审核失败,请勿重复审核!");
257
         }
258
         }
258
 
259
 

+ 1 - 1
ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/service/impl/PostProgrammeServiceImpl.java

@@ -66,7 +66,7 @@ public class PostProgrammeServiceImpl extends ServiceImpl<PostProgrammeMapper, P
66
 
66
 
67
         postProgramme.setSubmitDate(new Date());//提交日期
67
         postProgramme.setSubmitDate(new Date());//提交日期
68
         postProgramme.setStatus(PostProgrammeEnum.STATUS_WAIT.getValue());//状态:1-待审核;2-审核中;3-通过;4-驳回;
68
         postProgramme.setStatus(PostProgrammeEnum.STATUS_WAIT.getValue());//状态:1-待审核;2-审核中;3-通过;4-驳回;
69
-        postProgramme.setStatusHr(PostProgrammeEnum.STATUS_HR_WAIT.getValue());//状态:1-人力资源审批-状态:1-待审核;3-通过;4-驳回;
69
+        postProgramme.setStatusIcfa(PostProgrammeEnum.STATUS_ICFA_WAIT.getValue());//状态:1-内控法务审核审批-状态:1-待审核;3-通过;4-驳回;
70
         return postProgrammeMapper.insertPostProgramme(postProgramme);
70
         return postProgrammeMapper.insertPostProgramme(postProgramme);
71
     }
71
     }
72
 
72