2 Commits 6313fdc934 ... 6ad0e6c573

Auteur SHA1 Message Date
  zhaowenjing 6ad0e6c573 Merge remote-tracking branch 'origin/master' il y a 9 mois
  zhaowenjing f943257df5 顺序bug il y a 9 mois

+ 10 - 9
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.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
 

+ 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 67
         postProgramme.setSubmitDate(new Date());//提交日期
68 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 70
         return postProgrammeMapper.insertPostProgramme(postProgramme);
71 71
     }
72 72