完成ckdt值机柜台事件处理
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
package com.gzzn.omms.msgexchangeapi.msghandler.flop;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.gzzn.omms.msgexchangeapi.entity.msg.flop.botm.BOTMMsg;
|
||||
import com.gzzn.omms.msgexchangeapi.entity.msg.flop.ckdt.CKDTMsg;
|
||||
import com.gzzn.omms.msgexchangeapi.entity.msg.schd.dnld.FLTR;
|
||||
import com.gzzn.omms.msgexchangeapi.msghandler.HandlerResult;
|
||||
import com.gzzn.omms.msgexchangeapi.msghandler.IBaseHandler;
|
||||
import com.gzzn.omms.msgexchangeapi.service.IExchangeService;
|
||||
import com.gzzn.omms.msgexchangeapi.service.flightInfo.IFlightInfoService;
|
||||
import com.gzzn.omms.msgexchangeapi.utils.SpringUtil;
|
||||
|
||||
/**
|
||||
* 值机柜台事件处理
|
||||
* @author zhouxiunai
|
||||
*
|
||||
*/
|
||||
public class CKDTHandler implements IBaseHandler {
|
||||
private static Logger logger = LoggerFactory.getLogger(ACFTHandler.class);
|
||||
|
||||
@Override
|
||||
public HandlerResult run(String msg) {
|
||||
IExchangeService exchangeService = (IExchangeService) SpringUtil.getBean("exchangeService");
|
||||
IFlightInfoService flightInfoService = (IFlightInfoService) SpringUtil.getBean("flightInfoService");
|
||||
|
||||
CKDTMsg ckdtMsg = exchangeService.xmlstrToObject(msg, CKDTMsg.class);
|
||||
FLTR fltr = flightInfoService.getByFlid(ckdtMsg.getFLOP().getFLID());
|
||||
if(null != fltr)
|
||||
{
|
||||
fltr.setCKDT(ckdtMsg.getFLOP().getCKDT());
|
||||
flightInfoService.saveFltr(fltr);
|
||||
return HandlerResult.success(fltr);
|
||||
}
|
||||
else {
|
||||
//没有该动态航班信息
|
||||
logger.warn("没有flid为:{}的消息",ckdtMsg.getFLOP().getFLID());
|
||||
}
|
||||
|
||||
return HandlerResult.failure();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user