给仓库和账户的第一次录入设置为默认
This commit is contained in:
@@ -138,7 +138,12 @@ public class AccountService {
|
||||
if(account.getInitialAmount() == null) {
|
||||
account.setInitialAmount(BigDecimal.ZERO);
|
||||
}
|
||||
List<Account> accountList = getAccountByParam(null, null);
|
||||
if(accountList.size() == 0) {
|
||||
account.setIsDefault(true);
|
||||
} else {
|
||||
account.setIsDefault(false);
|
||||
}
|
||||
account.setEnabled(true);
|
||||
int result=0;
|
||||
try{
|
||||
|
||||
@@ -125,7 +125,12 @@ public class DepotService {
|
||||
int result=0;
|
||||
try{
|
||||
depot.setType(0);
|
||||
List<Depot> depotList = getDepot();
|
||||
if(depotList.size() == 0) {
|
||||
depot.setIsDefault(true);
|
||||
} else {
|
||||
depot.setIsDefault(false);
|
||||
}
|
||||
depot.setEnabled(true);
|
||||
result=depotMapper.insertSelective(depot);
|
||||
//新增仓库时给当前用户自动授权
|
||||
|
||||
Reference in New Issue
Block a user