/* (non-Javadoc)
   * @see businesslogic.Service.BusinessLobby.GetNeedGatheringService#getNeedGathering()
   */
  @Override
  public ArrayList<GatheringVO> getNeedGathering() {
    // TODO Auto-generated method stub
    ArrayList<GatheringVO> result = new ArrayList<GatheringVO>();
    try {
      GatheringStorageService searchGathering =
          (GatheringStorageService) Naming.lookup(RMIHelper.GATHERING_STORAGE_IMPL);
      ArrayList<String> requirement = new ArrayList<String>();
      requirement.add("bar_code like '%%'");

      ArrayList<GatheringStoragePO> searchResult =
          searchGathering.getGatheringStorage(
              URLHelper.getGatheringStorage(SystemLog.getInstitutionId()));

      if (searchResult.isEmpty()) {
        System.out.println("not found");
        return result;
      } else {
        for (int i = 0; i < searchResult.size(); i++)
          result.add(new GatheringVO(searchResult.get(i)));
      }
    } catch (MalformedURLException | RemoteException | NotBoundException e) {
      // TODO Auto-generated catch block
      System.out.println(e.getMessage());
      e.printStackTrace();
    }
    return result;
  }
예제 #2
0
 public LogisticsBlImpl() {
   try {
     logistics = (LogisticsDataService) Naming.lookup(NetAddress.getAddress("LogisticsData"));
   } catch (MalformedURLException | RemoteException | NotBoundException e) {
     e.printStackTrace();
     JOptionPane.showMessageDialog(
         MainFrame.getInstance(), "服务器未打开", "通信失败", JOptionPane.WARNING_MESSAGE);
   }
 }
 public IntermediateCenter(Log log) {
   super();
   try {
     intermediateCenterDataService =
         (IntermediateCenterDataService)
             Naming.lookup("rmi://" + ExpressSystem.RMI_IP + ":6600/intermediateCenterData");
   } catch (MalformedURLException | RemoteException | NotBoundException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   }
 }