소스 검색

月度对表

hexiao 2 년 전
부모
커밋
9871c61062
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      purchase-system/src/main/java/com/ozs/pm/service/impl/PmAuditDeptRefServiceImpl.java

+ 3 - 3
purchase-system/src/main/java/com/ozs/pm/service/impl/PmAuditDeptRefServiceImpl.java

@@ -59,11 +59,11 @@ public class PmAuditDeptRefServiceImpl extends ServiceImpl<PmAuditDeptRefMapper,
             deptLevel = "C";
         } else if (ancestors.length == 3) { //B级
             deptLevel = "B";
-            cdeptId = Long.valueOf(ancestors[1]);
+            cdeptId = Long.valueOf(ancestors[2]);
         } else if (ancestors.length == 4) { //A级
             deptLevel = "A";
-            cdeptId = Long.valueOf(ancestors[1]);
-            bdeptId = Long.valueOf(ancestors[2]);
+            cdeptId = Long.valueOf(ancestors[2]);
+            bdeptId = Long.valueOf(ancestors[3]);
         }
         if (!Arrays.asList("A", "B", "C").contains(deptLevel)) {
             throw new BaseException("当前用户单位不属于ABC三级,无权提交");