public BankAccountVO find(String accountId) { ArrayList<BankAccountPO> poList = bankaccountDataService.getAccount(); for (BankAccountPO po : poList) { if (po.getAccount().equals(accountId)) return new BankAccountVO(po.getName(), po.getMoney()); } return null; }
public ArrayList<BankAccountVO> showBankAccount(String subName) { ArrayList<BankAccountPO> poList = bankaccountDataService.getAccount(); ArrayList<BankAccountVO> voList = new ArrayList<BankAccountVO>(); for (int i = 0; i < poList.size(); i++) { BankAccountPO tempo = poList.get(i); String name = tempo.getName(); if (name.contains(subName)) { voList.add(new BankAccountVO(tempo.getAccount(), name, String.valueOf(tempo.getMoney()))); } } return voList; }