@Override public Iterator<DriverVO> findAll() { // TODO Auto-generated method stub cd = DataFactory.getDriverData(); ArrayList<DriverVO> voList = new ArrayList<DriverVO>(); ArrayList<DriverPO> poList = new ArrayList<DriverPO>(); try { poList = cd.findAll(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } for (int i = 0; i < poList.size(); i++) { DriverPO po = poList.get(i); DriverVO vo = new DriverVO( po.getNumber(), po.getName(), po.getBirthday(), po.getID(), po.getTel(), po.getCarunit(), po.getSex(), po.getLicensedate()); voList.add(vo); } return voList.iterator(); }
@Override public ArrayList<MoneyOutListPO> findList() { ListStateDataService od = DataFactory.getListStateData(); ArrayList<MoneyOutListPO> list = new ArrayList<MoneyOutListPO>(); try { list = od.findallMoneyOut(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return list; }
@Override public void updata(ArrayList<BaccountPO> polist) { // TODO Auto-generated method stub BAccountManageDataService data = DataFactory.getBAccountManageData(); for (int i = 0; i < polist.size(); i++) { try { data.update(polist.get(i)); } catch (RemoteException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }
@Override public ArrayList<BaccountPO> findAll() { // TODO Auto-generated method stub BAccountManageDataService data = DataFactory.getBAccountManageData(); ArrayList<BaccountPO> polist = new ArrayList<BaccountPO>(); try { polist = data.findAll(); } catch (RemoteException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return polist; }
public WareShowView(WareOutBLservice bl) { this.setName("库存查看"); this.bl = bl; this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); this.gd = DataFactory.getGarageData(); this.list = new ArrayList<GarageBodyPO>(); transcenterid = Long.parseLong(bl.getPo().getStaff().getOrgid()); // transcenterid=Long.parseLong(bl.getPo().getStaff().getOrgid()); // 初始化快件信息输入界面 initImportItemField(); initTable(); // 初始化快件列表界面 // initTable2(); // 初始化 this.validate(); }
@Override public boolean submit() { // TODO Auto-generated method stub ArrayList<BaccountPO> accountList = new ArrayList<BaccountPO>(); accountList = findAll(); MoneyOutListDataService od = DataFactory.getMoneyOutListData(); if (!moneyOutListList.isEmpty()) { for (int i = 0; i < moneyOutListList.size(); i++) { MoneyOutListVO vo = moneyOutListList.get(i); MoneyOutListPO po = new MoneyOutListPO( vo.getId(), vo.getTime(), vo.getMoney(), vo.getName(), vo.getAccount(), vo.getEntry(), vo.getNote(), vo.getLst()); try { result = od.insert(po); } catch (RemoteException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } for (int l = 0; l < accountList.size(); l++) { if (po.getAccount().getName().equals(accountList.get(l).getName())) { double balance = Double.parseDouble(accountList.get(l).getBalance()); balance -= po.getMoney(); accountList.get(l).setBalance(balance + ""); } } } updata(accountList); moneyOutListList.clear(); count = 0; return result; } else return false; }
@Override public long myGetListId(TimePO time) { MoneyOutListDataService od = DataFactory.getMoneyOutListData(); if (time.getHour() >= 10) { preFour = time.getHour() + ""; } else { preFour = "0" + time.getHour(); } if (time.getMin() >= 10) preFour += (time.getMin() + ""); else preFour += ("0" + time.getMin()); try { lastFour = (od.findLast().getId() + 1) + ""; } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } lastFour = lastFour.substring(6); return Long.parseLong(preFour + "03" + lastFour); }