浏览代码

新增上级设置自己,自动通过

anderx 11 月之前
父节点
当前提交
9f37503901

+ 3 - 5
ruoyi-system/src/main/java/com/ruoyi/project/service/impl/ProjectStaffRecordServiceImpl.java

@@ -90,11 +90,9 @@ public class ProjectStaffRecordServiceImpl implements ProjectStaffRecordService
         if(in.getProcessStatus()>1)in.setProcessStatus(1);
 
         boolean flag=false;
-        if (user.getUserId().equals(user.getSuperiorId())){
-            in.setProcessStatus(2);
-            sysUserMapper.userAddDuration(in.getAid(),in.getDuration());
-            projectTaskMapper.projectAddDuration(in.getPid(),in.getDuration());
-        }else if (SecurityUtils.hashRoles(UserRolesType.INSPECTORS.getCode())){
+        // 总监与上级是自己的情况下跳过审核
+        if (SecurityUtils.hashRoles(UserRolesType.INSPECTORS.getCode())||
+                user.getUserId().equals(user.getSuperiorId())){
             in.setProcessStatus(2);
             sysUserMapper.userAddDuration(in.getAid(),in.getDuration());
             projectTaskMapper.projectAddDuration(in.getPid(),in.getDuration());