private void handleAddSelected() {
    JwList<Integer> v = getSelectedRouteIds();
    AcUtility.checkSelectedIds(v);

    Integer tmpId =
        getUspsInternationalRequestedRouteService()
            .copyToUspsInternationalCandidateRouteTmp(v, getData().getUser().getLogin());
    getPageSession()
        .setUspsInternationalCandidateRouteTmpWebKey(
            AcUspsInternationalCandidateRouteTmpTools.getWebKey(tmpId));
    AcUspsInternationalCandidateRouteTmpAddPage.instance.print();
  }
Пример #2
0
  protected AcCn46ActualConveyanceModel getModel(
      AcItem i, AcUpuTag upuTag, String offloadingAirport, boolean splitOnDispatchDestination) {
    AcFlight f = getDepartingFlight(i.getId());
    AcResult last = getLastHandledAction(i.getId());

    _dummy.clear();
    _dummy.setTypeFromTag(upuTag);
    if (splitOnDispatchDestination)
      _dummy.setDispatchDestination(upuTag.getDestinationDispatchImpcCode());
    if (last != null) {
      AcAirport a = getAirport(last.getAirportCode());
      _dummy.setLastHandledAirport(last.getAirportCode());
      _dummy.setGeneratedTz(a.getTimeZone());
    }
    _dummy.setOriginAdministration(i.getUpuShortPostName());
    _dummy.setAirportOfOffloading(offloadingAirport);
    if (f != null) {
      _dummy.setAirportOfLoading(f.getOriginAirportCode());
      _dummy.setFlightCarrierCode(f.getOperatorCarrierCode());
      _dummy.setFlightNumber(f.getOperatorNumber());
      _dummy.setFlightNumberDisplayLabel(f.getOperatorNumberDisplayLabel());
      _dummy.setDepartureDt(
          f.hasActualDepartureLocalTs()
              ? f.getActualDepartureLocalTs().getDate()
              : f.getScheduledDepartureLocalDt());
    }
    String key = _dummy.getHashKey();
    AcCn46ActualConveyanceModel model = _models.get(key);
    if (model == null) {
      model = _dummy.getCopy();
      model.setCarrierCode(AcUtility.getAccountCarrierName(_access.getAccountCode()));
      model.setGeneratedTs(_nowUtcTs);
      model.setNote("** Note: This document was generated out of VelocityMail **");
      _models.put(key, model);
    }

    return model;
  }
  public static void main(String[] args) {
    AcUtility.installDebugChannels();

    AcEdiUspsI1InvoiceClaim1r1AbstractClaimTest test = new AcEdiUspsI1InvoiceClaim1r1OdcTest();
    test.run();
  }