Package com.ufis_as.ek_if.belt.entities

Examples of com.ufis_as.ek_if.belt.entities.EntDbLoadBagSummary


    if(!cmd.equalsIgnoreCase(IRT.name()) && !cmd.equalsIgnoreCase(DRT.name()) && !cmd.equalsIgnoreCase(URT.name())) {
      LOG.warn("LoadBagSummary record command is {} but not IRT/DRT/URT. The process won't be continued.", cmd);
      return;
    }
   
    EntDbLoadBagSummary updatedBagSummary = formNewLoadBagSummary(ufisMsgDTO);
    if(updatedBagSummary == null) {
      LOG.error("BagSummary cannot be created with provided data. The process will not be performed.");
      return;
    }
   
    LOG.info("ID_FLIGHT : {}, ID_CONX_FLIGHT : {}", updatedBagSummary.getIdFlight(), updatedBagSummary.getIdConxFlight());
   
    //To process only when both id_flight and id_conx_flight have value.
    if(updatedBagSummary.getIdFlight() == null || updatedBagSummary.getIdConxFlight() == null ||
        updatedBagSummary.getIdFlight().equals(BigDecimal.ZERO) || updatedBagSummary.getIdConxFlight().equals(BigDecimal.ZERO) ||
        updatedBagSummary.getIdFlight().equals(updatedBagSummary.getIdConxFlight())) {
      LOG.error("ID_FLIGHT[{}] and ID_CONX_FLIGHT[{}] must be provided and not be the same. Otherwise the process will not be performed.", updatedBagSummary.getIdFlight(), updatedBagSummary.getIdConxFlight());
      return;
    }
   
    switch(cmd) {
      case "IRT": processConxStatForLoadBagSummaryIRT(updatedBagSummary);
            break;
      case "DRT": processConxStatForLoadBagSummaryDRT(updatedBagSummary);
            break;
      case "URT": EntDbLoadBagSummary oldΒagSummary = formOldLoadBagSummary(ufisMsgDTO);
            if(oldΒagSummary == null) {
              LOG.error("BagSummary cannot be created with provided data. The process will not be performed.");
              return;
            }
            processConxStatForLoadBagSummaryURT(oldΒagSummary, updatedBagSummary);
View Full Code Here


    if(fldList.size() != data.size()) {
      LOG.error("Field list size and data list size are not equal. The process will not be performed.");
      return null;
    }
   
    EntDbLoadBagSummary bagSummary = new EntDbLoadBagSummary();
   
    int i = 0;
    for (String fld : fldList) {
      switch(fld.toUpperCase()){
        case "ID_FLIGHT": bagSummary.setIdFlight(BigDecimal.valueOf(Long.parseLong(data.get(i).toString()))); break;
        case "ID_CONX_FLIGHT" : bagSummary.setIdConxFlight(BigDecimal.valueOf(Long.parseLong(data.get(i).toString()))); break;
        case "INFO_TYPE" : bagSummary.setInfoType(data.get(i).toString()); break;
        case "BAG_PCS" : bagSummary.setBagPcs(BigDecimal.valueOf(Float.parseFloat(data.get(i).toString()))); break;
      }
      i++;
    }
   
    return bagSummary;
View Full Code Here

TOP

Related Classes of com.ufis_as.ek_if.belt.entities.EntDbLoadBagSummary

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.