Browse Source

发起公出判定修改

anderx 1 year ago
parent
commit
8bcc0305ea

+ 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;
     }