Package com.ufis_as.ufisapp.server.oldflightdata.entities

Examples of com.ufis_as.ufisapp.server.oldflightdata.entities.EntDbAfttab


  }

  public static EntDbAfttab searchDestCodeInVial(EntDbAfttab obj,
      String destCode) {
    EntDbAfttab result = null;
    int index = 1; // first char is space
    long vianValue = Long.parseLong(obj.getVian().trim());
    if (vianValue > 0) {
      for (int i = 0; i < vianValue; i++) {
        if (obj.getVial().substring(index, index + 3)
View Full Code Here


        }
      }
      */
       
        // According to type, build afttab flight search criteria and parameters
        EntDbAfttab criteriaParams = new EntDbAfttab();
        criteriaParams.setFltn(fltn);
        criteriaParams.setRegn(regn);
       
        // get the configurable time range offset
        int from = 0;
        int to = 0;
        if (MSGTYPE.MVT == type) {
View Full Code Here

        // LOG.debug("Total Duration on searching flight from AFTTAB (in ms): {}",
        // new Date().getTime() - startTime);
        // } else {

        // Change
        EntDbAfttab criteriaParams = new EntDbAfttab();
        // startTime = new Date().getTime();
        criteriaParams.setFlno(flightNumber);
        criteriaParams.setFlda(fltDate);
        // criteriaParams.setAdid('D');
        if (HpUfisUtils.isNullOrEmptyStr(bagDetails.getFlightInfo()
            .getArrivalAirport())) {
          urno = _afttabBean.getUrnoByFldaFlnoAdid(criteriaParams,
              null, bagDetails.getFlightInfo()
View Full Code Here

        if(mainFlt.getUrno().equals(dto.getIdConxFlight())) {
          LOG.error("ID_FLIGHT[{}] and ID_CONX_FLIGHT[{}] must not be the same. Otherwise the process will not be performed.", mainFlt.getUrno(), dto.getIdConxFlight());
          return;
        }
        if (dto.getIdConxFlight().intValue() != 0) {
          EntDbAfttab conxFlight = afttabBean.findFlightForConx(dto.getIdConxFlight());
          if (conxFlight != null) {
            // Main flight and conx flight must be either arrival or departure flight
              if (ADID_ARRIVAL != mainFlt.getAdid() && ADID_DEPARTURE != mainFlt.getAdid()) {
                LOG.warn("Main flight must be arrival or departure flight");
                LOG.warn("ADID={} for main flight={}", mainFlt.getAdid(), mainFlt.getUrno());
                continue;
              }
              if (ADID_ARRIVAL != conxFlight.getAdid() && ADID_DEPARTURE != conxFlight.getAdid()) {
                LOG.warn("Conx flight must be arrival or departure flight");
                LOG.warn("ADID={} for conx flight={}", conxFlight.getAdid(), conxFlight.getUrno());
                continue;
              }
             
              // Calculate the time span between main and connect flight
              BigDecimal idArrFlight = null;
              BigDecimal idDepFlight = null;
              HpUfisCalendar tifa = null;
              HpUfisCalendar tifd = null;
              char tga1 = ' ';
              char tgd1 = ' ';
              if (ADID_ARRIVAL == mainFlt.getAdid()) {
                tifa = new HpUfisCalendar(mainFlt.getTifa());
                tifd = new HpUfisCalendar(conxFlight.getTifd());
                idArrFlight = mainFlt.getUrno();
                idDepFlight = conxFlight.getUrno();
                tga1 = mainFlt.getTga1();
                tgd1 = conxFlight.getTgd1();
              } else {
                tifa = new HpUfisCalendar(conxFlight.getTifa());
                tifd = new HpUfisCalendar(mainFlt.getTifd());
                idArrFlight = conxFlight.getUrno();
                idDepFlight = mainFlt.getUrno();
                tga1 = conxFlight.getTgd1();
                tgd1 = mainFlt.getTga1();
              }
              int timeDiff = (int) tifa.timeDiff(tifd, EnumTimeInterval.Minutes, false);
              LOG.debug("Time Difference between main flight and conx flight: {} mins", timeDiff);
             
View Full Code Here

    BigDecimal idConxFlight = BigDecimal.valueOf(loadPaxConnect.getIdConxFlight());
    List<EntDbFltConnectSummary> fltConnectSummaryList = dlFltConxSummaryBean.findExistingForAllFlights(idFlight, idConxFlight);
   
    //Find FLT_CONNECT_SUMMARY with conxflights and record doesn't exist / evaluate Pax connection status
    if(fltConnectSummaryList.isEmpty()) {
      EntDbAfttab entAft = dlAfttabBean.find(idFlight);
     
      List<FltConnectionDTO> list = new ArrayList<>();
      FltConnectionDTO dto = new FltConnectionDTO();
      dto.setIdFlight(idFlight);
      dto.setIdConxFlight(idConxFlight);
      dto.setTotalPax(1);
      list.add(dto);
     
      LOG.info("NO FLT CONX SUMMARY => id_flight[{}, {}], id_conx_flight[{}]", idFlight, entAft.getUrno(), idConxFlight);
     
      fltConxProcessBean.process(HpUfisAppConstants.CON_LOAD_PAX_SUMMARY, entAft, list);
     
      return;
    }
   
    //Find FLT_CONNECT_SUMMARY with conxflights and record exists.
    //If ‘PAX connection status’ is blank or ‘no connection’, do processing. Otherwise skip
    //Result is at most 2 - idFlight/arr and idConxFlight/dep OR idConxFlight/arr and idFlight/dep
    for (EntDbFltConnectSummary entDbFltConnectSummary : fltConnectSummaryList) {
      if(HpUfisUtils.isNullOrEmptyStr(entDbFltConnectSummary.getConxStatPax().trim()) || entDbFltConnectSummary.getConxStatPax().trim().equalsIgnoreCase("X")) {
        EntDbAfttab entAft = dlAfttabBean.find(entDbFltConnectSummary.getIdArrFlight());
 
        List<FltConnectionDTO> list = new ArrayList<>();
        FltConnectionDTO dto = new FltConnectionDTO();
        dto.setIdFlight(entDbFltConnectSummary.getIdArrFlight());
        dto.setIdConxFlight(entDbFltConnectSummary.getIdDepFlight());
        dto.setTotalPax(1);
        list.add(dto);
       
        LOG.info("FLT CONX SUMMARY => id_flight[{}, {}], id_conx_flight[{}]", entDbFltConnectSummary.getIdArrFlight(), entAft.getUrno(), entDbFltConnectSummary.getIdDepFlight());
 
        //One pair only
        fltConxProcessBean.process(HpUfisAppConstants.CON_LOAD_PAX_SUMMARY, entAft, list);
      }
    }
View Full Code Here

   
    //Find FLT_CONNECT_SUMMARY with conxflights and record exists.
    //If ‘Pax connection status’ is blank or ‘no connection’, do processing. Otherwise skip
    //Find FLT_CONNECT_SUMMARY with conxflights and record doesn't exist / evaluate Pax connection status
    if(fltConnectSummaryList.isEmpty()) {
      EntDbAfttab entAft = dlAfttabBean.find(paxSummary.getIdFlight());
     
      List<FltConnectionDTO> list = new ArrayList<>();
      FltConnectionDTO dto = new FltConnectionDTO();
      dto.setIdFlight(paxSummary.getIdFlight());
      dto.setIdConxFlight(paxSummary.getIdConxFlight());
      dto.setTotalPax(paxSummary.getTotalPax().intValue());
      list.add(dto);
     
      fltConxProcessBean.process(HpUfisAppConstants.CON_LOAD_PAX_SUMMARY, entAft, list);
     
      return;
    }
   
    //Find FLT_CONNECT_SUMMARY with no conxflights (status is 'X' or status = ' ') and Record exists / evaluate and update PAX conn status
    //Result is at most 2 - idFlight/arr and idConxFlight/dep OR idConxFlight/arr and idFlight/dep
    for (EntDbFltConnectSummary entDbFltConnectSummary : fltConnectSummaryList) {
      if(HpUfisUtils.isNullOrEmptyStr(entDbFltConnectSummary.getConxStatPax().trim()) || entDbFltConnectSummary.getConxStatPax().trim().equalsIgnoreCase("X")) {
        EntDbAfttab entAft = dlAfttabBean.find(entDbFltConnectSummary.getIdArrFlight());
 
        List<FltConnectionDTO> list = new ArrayList<>();
        FltConnectionDTO dto = new FltConnectionDTO();
        dto.setIdFlight(entDbFltConnectSummary.getIdArrFlight());
        dto.setIdConxFlight(entDbFltConnectSummary.getIdDepFlight());
View Full Code Here

      if(!cmd.equalsIgnoreCase(DFR.name()) && !cmd.equalsIgnoreCase(UFR.name())) {
        LOG.warn("AFTTAB record command is {} but not DFR/UFR. The process won't be continued.", cmd);
        return;
      }
     
      EntDbAfttab temp = cmd.equalsIgnoreCase(DFR.name()) ? validateForDFRAfttab(ufisMsgDTO) : validateForUFRAfttab(ufisMsgDTO);
      EntDbAfttab entAft = dlAfttabBean.find(temp.getUrno()); //FIXME: Performance??? How to work with temp??
      if(entAft == null) {
        LOG.warn("Flight information cannot be retrieved for AFTTAB. The process cannot be continued.");
        return;
      }
      if(entAft.getUrno() != null) {
        if(cmd.equalsIgnoreCase(DFR.name())) {
          computeConxStatForFlightDFR(entAft);
        }
       
        if(cmd.equalsIgnoreCase(UFR.name())) {
View Full Code Here

        && HpUfisUtils.isNullOrEmptyStr(tga1) && HpUfisUtils.isNullOrEmptyStr(tgd1)){
      LOG.debug("Data is missing for either of (TIFA, TIFD, PSTA, PSTD, TGA1, TGD2) to perform flight connect summary for AFTTAB.");
      return null;
    }
   
    EntDbAfttab entAft = new EntDbAfttab();
    entAft.setUrno(new BigDecimal(urno));
    entAft.setAdid(adid.charAt(0));
    entAft.setTifa(tifa);
    entAft.setTifd(tifd);
    entAft.setPsta(psta);
    entAft.setPstd(pstd);
    entAft.setTga1(HpUfisUtils.isNullOrEmptyStr(tga1) ? null : tga1.charAt(0));
    entAft.setTgd1(HpUfisUtils.isNullOrEmptyStr(tgd1) ? null : tgd1.charAt(0));
    entAft.setFtyp(HpUfisUtils.isNullOrEmptyStr(ftyp) ? null : ftyp.charAt(0));
    return entAft;
  }
View Full Code Here

    return result;
  }

  @Override
  public EntDbAfttab findFlightByUaft(String uaft) {
    EntDbAfttab entity = null;
    Query query = em.createNamedQuery("EntDbAfttab.findByUaft",
        EntDbAfttab.class);
    query.setParameter("urno", uaft);

    List<EntDbAfttab> result = query.getResultList();
View Full Code Here

      query.setParameter("regn", regn);
    }
    query.setParameter("ftyp", 'O');
    query.setParameter("fromDate", ufisCalendarFrom.getCedaString());
    query.setParameter("endDate", ufisCalendarTo.getCedaString());
    EntDbAfttab flight = null;
    try {
      List<EntDbAfttab> list = query.getResultList();
      if (list != null && list.size() > 0) {
        flight = list.get(0);
      }
View Full Code Here

TOP

Related Classes of com.ufis_as.ufisapp.server.oldflightdata.entities.EntDbAfttab

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.