public void submit() throws RemoteException, ClassNotFoundException, IOException { String arriveDate = dataField.getText(); arriveDate += "-" + box1.getSelectedIndex() + "-" + "0" + "-" + "0"; start = TimePO.toTime(arriveDate); String arriveDate2 = dataField2.getText(); arriveDate2 += "-" + box2.getSelectedIndex() + "-" + "59" + "-" + "59"; end = TimePO.toTime(arriveDate2); WareShowVO show; list = bl.getWareIn(start, end); ArrayList<GarageBodyPO> outlist = new ArrayList<GarageBodyPO>(); outlist = bl.getWareOut(start, end); Inshow.setText(list.size() + ""); Outshow.setText(outlist.size() + ""); if (list.size() != 0) { for (int i = 0; i < list.size(); i++) { show = new WareShowVO( ListState.SUBMITTED, list.get(i).getItem().getId(), list.get(i).getItem().getTime(), list.get(i).getPlace().getQu(), list.get(i).getPlace().getPai(), list.get(i).getPlace().getJia(), list.get(i).getPlace().getWei()); deliveryInputModel2.addRow(show); WareShowView.this.validate(); } } int num = bl.getNum(transid); numshow.setText(num + ""); if (outlist.size() != 0) { for (int i = 0; i < outlist.size(); i++) { show = new WareShowVO( ListState.REVIEWED, outlist.get(i).getItem().getId(), outlist.get(i).getItem().getTime(), outlist.get(i).getPlace().getQu(), outlist.get(i).getPlace().getPai(), outlist.get(i).getPlace().getJia(), outlist.get(i).getPlace().getWei()); deliveryInputModel2.addRow(show); WareShowView.this.validate(); } } // TimePO time =new TimePO(1,2,3,4,5,6); }
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(); }