新增延误信息消息处理
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
package com.gzzn.omms.msgexchangeapi.msghandler.flop;
|
||||
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import com.gzzn.omms.msgexchangeapi.entity.msg.DELAYDATA;
|
||||
import com.gzzn.omms.msgexchangeapi.entity.msg.FLOP;
|
||||
import com.gzzn.omms.msgexchangeapi.entity.msg.OPTDELAYDATA;
|
||||
import com.gzzn.omms.msgexchangeapi.entity.msg.SCHD;
|
||||
|
||||
/**
|
||||
* 航班延误消息处理
|
||||
* @author zhouxiunai
|
||||
*
|
||||
*/
|
||||
public class DELYHandler extends FlopBaseHandler {
|
||||
|
||||
@Override
|
||||
protected SCHD.FLTR updateFltr(FLOP flop,SCHD.FLTR fltr)
|
||||
{
|
||||
//update
|
||||
if(CollectionUtils.isEmpty(flop.getDELY()) )
|
||||
{
|
||||
//清空延误信息
|
||||
fltr.getDELY().clear();
|
||||
}
|
||||
else {
|
||||
//延误信息只新增
|
||||
for (OPTDELAYDATA optdelaydata : flop.getDELY() ) {
|
||||
|
||||
DELAYDATA delaydata = new DELAYDATA();
|
||||
BeanUtils.copyProperties(optdelaydata, delaydata);
|
||||
|
||||
fltr.getDELY().add(delaydata);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return fltr;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user