public ResultMessage updatabyhall(GoodsReceivingVO vo, String orgname) { // 如果这次的货物是由营业厅来的 if (vo.getFormstate() != Formstate.checked) { return ResultMessage.failure; } GoodsReceivingFormDataService dataserv = RMIHelper.getGoodsreceiving(); HallLoadPO hallload = null; List<String> allbarcode = new ArrayList<String>(); ResultMessage result = ResultMessage.failure; try { hallload = dataserv.getHallLoadBycode(vo.getTranscode()); allbarcode = hallload.getAllbarcode(); } catch (RemoteException e) { System.out.println("update goodsreceving logistics information failed!!!"); e.printStackTrace(); } LogisticsInfoService infoserv = RMIHelper.getLogisticsinfo(); int len = allbarcode.size(); for (int i = 0; i <= len - 1; i++) // 依次根据订单号得到logisticspo 更新 { LogisticsPO newpo = null; try { newpo = infoserv.findLogisticsInfo(allbarcode.get(i)); String newstate = "到达" + orgname; newpo.setState(newstate); List<String> history = newpo.getHistory(); history.add(newstate); newpo.setHistory(history); } catch (RemoteException e) { System.out.println("Get LogisticsPO failed!!!"); e.printStackTrace(); } ResultMessage res = ResultMessage.failure; try { res = infoserv.update(newpo); } catch (RemoteException e) { res = ResultMessage.failure; System.out.println("Update Logistics failed!!!"); e.printStackTrace(); } if (res == ResultMessage.failure) { result = ResultMessage.failure; break; } } return result; }
public ResultMessage passdel() { VehiclesPO po = new VehiclesPO(vehiclecode, vehiclenum, extendtime); VehicleDataService dataserv = RMIHelper.getVehicledata(); ResultMessage result = null; try { result = dataserv.deleteVehicle(po); } catch (RemoteException e) { System.out.println("Delete Vehicle Failed!!!"); result = ResultMessage.failure; e.printStackTrace(); } return result; }
public ResultMessage passadd() { StockoutFormDataService data = RMIHelper.getStockouform(); StockoutPO po = new StockoutPO(id, ordercode, outtime, destination, transporttype, transcode, formstate); ResultMessage result = null; try { result = data.addStockoutForm(po); } catch (RemoteException e) { System.out.println("add stockout form failed!!!"); e.printStackTrace(); } return result; }
public BankAccountbl() { bankaccountDataService = RMIHelper.getBankAccountdataService(); }