if(_input.getAudit().getScanTime() != null){
scanTime = convertFlDateToUTC_Lounge(_input.getAudit().getScanTime());
scanTimeUTC = new HpUfisCalendar(scanTime).getTime();
}
EntDbPaxLoungeMove oldEnt = null; String cmd = UfisASCommands.IRT.name();
//find existing pax lounge move only if the flight is not null.
EntDbPaxLoungeMove entPaxLoungeMove = clsDlPaxLoungeMoveBean.getPaxLoungeMove(_input.getPaxDetails().getRegKey(), urno);
if(entPaxLoungeMove == null){
entPaxLoungeMove = new EntDbPaxLoungeMove();
entPaxLoungeMove.setCreatedUser(HpEKConstants.OPERA_SOURCE);
entPaxLoungeMove.setCreatedDate(HpUfisCalendar.getCurrentUTCTime());
}
else{
oldEnt = new EntDbPaxLoungeMove(entPaxLoungeMove);
entPaxLoungeMove.setUpdatedUser(HpEKConstants.OPERA_SOURCE);
entPaxLoungeMove.setUpdatedDate(HpUfisCalendar.getCurrentUTCTime());
cmd = UfisASCommands.URT.name();
}
entPaxLoungeMove.setPaxRegnKey(_input.getPaxDetails().getRegKey());
entPaxLoungeMove.setIdFlight(urno);
entPaxLoungeMove.setIdLoadPax(id_load_pax);
entPaxLoungeMove.setIdMdLoungeCode(id_md_lounge_code);
if(_input.getMeta().getMessageTime() != null)
entPaxLoungeMove.setMsgSentDate(new HpUfisCalendar(
_input.getMeta().getMessageTime().toGregorianCalendar().getTime()).getTime());
entPaxLoungeMove.setMsgId(new BigDecimal(_input.getMeta().getMessageID()));
entPaxLoungeMove.setFlightNumber(ffltNo);
entPaxLoungeMove.setDepNum((_input.getFlightID().getDepNo()== null)? null : String.valueOf(_input.getFlightID().getDepNo()));
entPaxLoungeMove.setFltDate(_input.getFlightID().getFltDate().toGregorianCalendar().getTime());
entPaxLoungeMove.setFltOrigin3(_input.getFlightID().getDepStn());
entPaxLoungeMove.setFltDest3(_input.getFlightID().getArrStn());
entPaxLoungeMove.setLegNum(String.valueOf(_input.getFlightID().getLegNo()));
entPaxLoungeMove.setPaxRefNum(_input.getPaxDetails().getSeqNo());
entPaxLoungeMove.setPaxNameRec(_input.getPaxDetails().getPNR());
entPaxLoungeMove.setPaxName(_input.getPaxDetails().getPaxName());
entPaxLoungeMove.setPaxFreqFlyerId(_input.getPaxDetails().getPaxFFID());
entPaxLoungeMove.setPaxFreqFlyerTier(_input.getPaxDetails().getPaxFFTier());
entPaxLoungeMove.setScanLoungeDate(scanTimeUTC);
entPaxLoungeMove.setEnterExitFlag(_input.getPaxDetails().getStatus());
entPaxLoungeMove.setLoungeCode(_input.getPaxDetails().getLoungeCode());
entPaxLoungeMove.setLoungeClass(_input.getPaxDetails().getLoungeClass());
entPaxLoungeMove.setGuestFlag(_input.getPaxDetails().getGuestFlag());
entPaxLoungeMove.setGuestMapkey(_input.getPaxDetails().getGuestMapKey());
entPaxLoungeMove.setScanUser(_input.getAudit().getScanBy());
//merge the entity input data
EntDbPaxLoungeMove entPaxLoungeMoveResult = clsDlPaxLoungeMoveBean.merge(entPaxLoungeMove);
if(entPaxLoungeMoveResult != null)
sendNotifyUldInfoToInJson(entPaxLoungeMoveResult, oldEnt, cmd);
} catch (JAXBException e) {
LOG.error("JAXBContext when unmarshalling... {}", e.getMessage());
addExptInfo(EnumExceptionCodes.EXSDF.name(), "");