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

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


   * - and send to UFIS CEDA (Queue or Topic)
   * @param entAft
   */
  public void processConxStat(EntUfisMsgDTO ufisMsgDTO){
    try {
      EntDbAfttab entAft = extractInputDataAndCheck(ufisMsgDTO);
      if(entAft != null && entAft.getUrno() != null) {
        idFlight = entAft.getUrno();
        computeConxStat(entAft);
      }
    } catch(Exception ex){
      LOG.error("ERROR : {}", ex);
    }
View Full Code Here


            case "TIFD" : tifd = (String) data.get(i); break;
          }
        }
      }
    }
    EntDbAfttab entAft = null;
    if(HpUfisUtils.isNullOrEmptyStr(urno) || HpUfisUtils.isNullOrEmptyStr(adid)
        || HpUfisUtils.isNullOrEmptyStr(tifa) || HpUfisUtils.isNullOrEmptyStr(tifd)){
      LOG.debug("Data is missing for (URNO, ADID, TIFA, TIFD) to perform flight connect summary.");
    }else{
      entAft = new EntDbAfttab();
      entAft.setUrno(new BigDecimal(urno));
      entAft.setAdid(adid.charAt(0));
      entAft.setTifa(tifa);
      entAft.setTifd(tifd);
    }
    return entAft;
  }
View Full Code Here

              flight.getUrno());
          for (int i = 0; i < loadPaxSumList.size(); i++) {
            EntDbLoadPaxSummary loadPaxSummary = loadPaxSumList.get(i);
            if (loadPaxSummary.getIdDepFlight() != null) {
              // find the conx dept flight from AFTTAB
              EntDbAfttab dept = clsAfttabBeanLocal.findFlightForConx(
                      loadPaxSummary.getIdDepFlight());
              if (dept != null) {
                criticalNum += processFltConxSummary(flight, dept);
              } else {
                LOG.debug("No Connected flight(urno:{}) found in AFTTAB for flight(urno: {})",
                    loadPaxSummary.getIdDepFlight(),
                    flight.getUrno());
              }
            }
          }
        }
      } else if ('D' == flight.getAdid()) {

        // look for connected arr flight from load_pax_summary
        List<EntDbLoadPaxSummary> loadPaxSumList = clsDlLoadSummaryBean.findByDepFlId(flight.getUrno());
        if (loadPaxSumList != null) {
          LOG.debug("{} records found in Load_Pax_Summary for idDepFlight={}",
              loadPaxSumList.size(),
              flight.getUrno());
          for (int i = 0; i < loadPaxSumList.size(); i++) {
            EntDbLoadPaxSummary loadPaxSummary = loadPaxSumList.get(i);
            if (loadPaxSummary.getIdArrFlight() != null) {
              EntDbAfttab arr = clsAfttabBeanLocal.findFlightForConx(
                      loadPaxSummary.getIdArrFlight());
              if (arr != null) {
                // process only when the conx flight existed.
                criticalNum += processFltConxSummary(arr, flight);
              } else {
View Full Code Here

             
             
            if (isValid) { 
              long start = System.currentTimeMillis();
              // find arrival and departure flight from afttab
              EntDbAfttab flight = afttabBean.findFlightForConxByUrno(Long.parseLong(idFlight));
                EntDbAfttab conxFlight = afttabBean.findFlightForConxByUrno(Long.parseLong(idConxFlight));
                LOG.debug("Search Flight from afttab used: {}", (System.currentTimeMillis() - start));
                // Main flight and conx flight must be existing in afttab
                if (flight == null) {
                  LOG.warn("Flight not found for urno: {}", idFlight);
                  return null;
                }
                if (conxFlight == null) {
                  LOG.warn("Conx Flight not found for urno: {}", idConxFlight);
                  return null;
                }
                // Main flight and conx flight must be either arrival or departure flight
                if (ADID_ARRIVAL != flight.getAdid() && ADID_DEPARTURE != flight.getAdid()) {
                  LOG.warn("Main flight must be arrival or departure flight");
                  LOG.warn("ADID={} for main flight={}", flight.getAdid(), flight.getUrno());
                  return null;
                }
                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());
                  return null;
                }
               
                // calculate the time span between main and connect flight
                BigDecimal idArrFlight = null;
                BigDecimal idDepFlight = null;
                HpUfisCalendar tifa = null;
                HpUfisCalendar tifd = null;
                if (ADID_ARRIVAL == flight.getAdid()) {
                  tifa = new HpUfisCalendar(flight.getTifa());
                  tifd = new HpUfisCalendar(conxFlight.getTifd());
                  idArrFlight = flight.getUrno();
                  idDepFlight = conxFlight.getUrno();
                } else {
                  tifa = new HpUfisCalendar(conxFlight.getTifd());
                  tifd = new HpUfisCalendar(flight.getTifa());
                  idArrFlight = conxFlight.getUrno();
                  idDepFlight = flight.getUrno();
                }
               
                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

   
    List<EntDbFltConnectSummary> fltConnectSummaryList = dlFltConxSummaryBean.findExistingForAllFlights(uldSummary.getIdFlight(), uldSummary.getIdConxFlight());
   
    //Find FLT_CONNECT_SUMMARY with conxflights and record doesn't exist / evaluate ULD connection status
    if(fltConnectSummaryList.isEmpty()) {
      EntDbAfttab entAft = dlAfttabBean.find(uldSummary.getIdFlight());
     
      List<FltConnectionDTO> list = new ArrayList<>();
      FltConnectionDTO dto = new FltConnectionDTO();
      dto.setIdFlight(uldSummary.getIdFlight());
      dto.setIdConxFlight(uldSummary.getIdConxFlight());
      dto.setUldPcs((int) uldSummary.getUldPcs());
      list.add(dto);
     
      fltConxProcessBean.process(HpUfisAppConstants.CON_LOAD_ULD_SUMMARY, entAft, list);
     
      return;
    }
   
    //Find FLT_CONNECT_SUMMARY with conxflights and record exists.
    //If ‘ULD 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.getConxStatUld().trim()) || entDbFltConnectSummary.getConxStatUld().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

        return false;
      }
     
      String ffltNo = null;
      String fltDate = null;
      EntDbAfttab entFlight = null;
      BigDecimal urno = null;
      String id_load_pax = null;
      String id_md_lounge_code = "0";
      String scanTime = null;
      List<EntDbMdLoungeCode> entLoungeCodeList = new ArrayList<>();
     
      //convert the string for flight "EK" to ufis ceda flight num format
      ffltNo = _input.getFlightID().getFFltNo().substring(0,2) + " " +
          HpUfisUtils.formatCedaFltn(_input.getFlightID().getFFltNo().substring(2, _input.getFlightID().getFFltNo().length()));
     
      /**** For input UTC ******/
      HpUfisCalendar inputFlDate = new HpUfisCalendar(_input.getFlightID().getFltDate());
      fltDate = inputFlDate.getCedaString();
     
      /**** For input LOCAL ****/
      //fltDate = convertFlDateToUTC_Lounge(_input.getFlightID().getFltDate());
     
      if(HpEKConstants.EK_HOPO.equals(_input.getFlightID().getArrStn())
          && HpEKConstants.EK_HOPO.equals(_input.getFlightID().getDepStn())){// ArrStn = DepStn = DXB
        entFlight = clsAfttabBeanLocal.findFlightForReturn(ffltNo, fltDate);
      }else if(HpEKConstants.EK_HOPO.equals(_input.getFlightID().getArrStn())){// ArrStn = DXB
        entFlight = clsAfttabBeanLocal.findFlightForEKArr(ffltNo, fltDate);
      }
      else if(HpEKConstants.EK_HOPO.equals(_input.getFlightID().getDepStn())){// DepStn = DXB
        entFlight = clsAfttabBeanLocal.findFlightForEKDept(ffltNo, fltDate);
      }else{// ArrStn != DepStn != DXB
        //search from VIAL
        LOG.debug("Looking for the flight from its VIAL..");
        entFlight = clsAfttabBeanLocal.findFlightFromVial(ffltNo, fltDate, _input.getFlightID().getDepStn(), _input.getFlightID().getArrStn());
      }
      //urno = (entFlight == null) ? new BigDecimal(0) : entFlight.getUrno();
      EntDbLoadPax load_pax = null;
      if(entFlight == null){
        LOG.error("Flight flno <{}> is not found. Message dropped.", ffltNo);
        addExptInfo(EnumExceptionCodes.ENOFL.name(), ffltNo);
        return false;
      }
      else{
        urno = entFlight.getUrno();
        load_pax = clsDlPaxBean.getPaxWithPaxRefNum(_input.getPaxDetails().getSeqNo(), String.valueOf(urno));
      }
      /*if(intFlid != null){
        //get the pax id
        load_pax = clsDlPaxBean.getPaxForPaxLounge(_input.getPaxDetails().getSeqNo(), intFlid);
View Full Code Here

    if("DXB".equalsIgnoreCase(org3) && "DXB".equalsIgnoreCase(des3)){
   
      urno = clsAfttabBeanLocal.findUrnoForReturnFlight(flno, flDate, adid);
   
    }else{
      EntDbAfttab entFlight = null;
      switch(adid){
        case "A" :
          entFlight = clsAfttabBeanLocal.findFlightForEKArr(flno, flDate); break;
        case "D" :
          entFlight = clsAfttabBeanLocal.findFlightForEKDept(flno, flDate); break;
      }
      if(entFlight != null)
        urno = entFlight.getUrno();
    }
    return urno;
  }
View Full Code Here

    if("DXB".equalsIgnoreCase(org3) && "DXB".equalsIgnoreCase(des3)){
   
      urno = clsAfttabBeanLocal.findUrnoForReturnFlight(flno, flDate, adid);
   
    }else{
      EntDbAfttab entFlight = null;
      switch(adid){
        case "A" :
          entFlight = clsAfttabBeanLocal.findFlightForEKArr(flno, flDate); break;
        case "D" :
          entFlight = clsAfttabBeanLocal.findFlightForEKDept(flno, flDate); break;
      }
      if(entFlight != null)
        urno = entFlight.getUrno();
    }
    return urno;
  }
View Full Code Here

    }
  }*/
 
  public void calculateUldSummary(BigDecimal idFlightDecimal){
    try {
      EntDbAfttab entAft = clsAfttabBeanLocal.getFlightByUrno(idFlightDecimal);
      if (entAft == null)
        return;
      LOG.debug("############### START for flight <{}> ###############", idFlightDecimal);
      switch (entAft.getAdid()) {
      case 'A':
        // if ARRIVAL, summarize for all conx flights' ULD
        summarizeUld(idFlightDecimal, HpEKConstants.ADID_A);
        break;
      case 'D':
View Full Code Here

     
      String fltSuffix = null;
      String flNum = null;
      Date flDate = null;
      BigDecimal urno = null;
      EntDbAfttab entFlight = null;
      String idFltJobAssign = "0";
      Date checkInDate = null;
      Date msgInTime = null;
      EntDbFltJobAssign entFltJobAssign = null;
      String cmd = UfisASCommands.IRT.name();
     
      fltSuffix = _input.getFlightID().getFltSuffix() == null? "": _input.getFlightID().getFltSuffix();
     
      //format ceda flight string
      /*flNum = _input.getFlightID().getCxCd() +" "+
            HpUfisUtils.formatCedaFltn(String.valueOf(_input.getFlightID().getFltNo())) + fltSuffix;*/
      flNum = HpUfisUtils.formatCedaFlno(_input.getFlightID().getCxCd(), String.valueOf(_input.getFlightID().getFltNo()), fltSuffix);
     
      flDate = inputFlDate.parse(_input.getFlightID().getFltDate());
      //perform only for deptStn = DXB
      if (HpEKConstants.EK_HOPO.equals(_input.getFlightID().getDepStn()))
        entFlight = clsAfttabBeanLocal.findFlightByFlda(flNum, dfDate.format(flDate), _input.getFlightID().getArrStn());
      else{
        LOG.error("Processing performs only for departure station = DXB. Message dropped.");
        addExptInfo(EnumExceptionCodes.ENDEP.name(), _input.getFlightID().getDepStn());
        return false;
      }
      if(entFlight == null){
        LOG.error("Flight flno <{}> is not found. Message dropped.", flNum);
        addExptInfo(EnumExceptionCodes.ENOFL.name(), flNum);
        return false;
      }
      else{
        urno = entFlight.getUrno();
        //get the flt_job_assign by staff_number and id_flight
        entFltJobAssign = clsIDlFltJobAssignLocal.getAssignedCrewIdByFlight(urno, _input.getCheckInInfo().getStaffno(), _input.getCheckInInfo().getCrewType());
        idFltJobAssign = (entFltJobAssign == null)? "0" : entFltJobAssign.getId();
      }
      checkInDate = sf.parse(convertFlDateToUTC(_input.getCheckInInfo().getCheckInTime()));
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.