소스 검색

发起公出判定修改

anderx 1 년 전
부모
커밋
8bcc0305ea
1개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 5 3
      src/main/java/com/goafanti/expenseAccount/service/impl/ExpenseAccountServiceImpl.java

+ 5 - 3
src/main/java/com/goafanti/expenseAccount/service/impl/ExpenseAccountServiceImpl.java

@@ -1045,9 +1045,11 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
 
         in.setAid(TokenManager.getAdminId());
         OutExpenseAccount useEa = expenseAccountMapper.selectByaidAndPrid(in);
-        ExpenseRelationship er = expenseRelationshipMapper.selectSonId(useEa.getId());
-        if (er!=null){
-            throw new BusinessException("公出已经发起报销");
+        if (useEa!=null){
+            ExpenseRelationship er = expenseRelationshipMapper.selectSonId(useEa.getId());
+            if (er!=null){
+                throw new BusinessException("公出已经发起报销");
+            }
         }
         return useEa;
     }