给仓库和账户的第一次录入设置为默认

This commit is contained in:
季圣华
2023-02-09 21:26:17 +08:00
parent 215c403ce6
commit 07d1f4ad68
2 changed files with 12 additions and 2 deletions

View File

@@ -138,7 +138,12 @@ public class AccountService {
if(account.getInitialAmount() == null) {
account.setInitialAmount(BigDecimal.ZERO);
}
account.setIsDefault(false);
List<Account> accountList = getAccountByParam(null, null);
if(accountList.size() == 0) {
account.setIsDefault(true);
} else {
account.setIsDefault(false);
}
account.setEnabled(true);
int result=0;
try{