删除不必要的航班动态DTO 类
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
package com.gzzn.omms.msgexchangeapi.dto.msg;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.gzzn.omms.msgexchangeapi.entity.msg.ABNORMALTYPE;
|
||||
|
||||
public class ABNDATADto {
|
||||
@XmlElement(name = "TYPE", required = true)
|
||||
@JsonProperty("TYPE")
|
||||
protected ABNORMALTYPE type;
|
||||
|
||||
@XmlElement(name = "BODY")
|
||||
@JsonProperty("BODY")
|
||||
protected String body;//json字符串,根据type而不同
|
||||
|
||||
public ABNORMALTYPE getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(ABNORMALTYPE type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getBody() {
|
||||
return body;
|
||||
}
|
||||
|
||||
public void setBody(String body) {
|
||||
this.body = body;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,51 +0,0 @@
|
||||
package com.gzzn.omms.msgexchangeapi.dto.msg.convert;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
|
||||
import com.gzzn.omms.msgexchangeapi.dto.msg.ABNDATADto;
|
||||
import com.gzzn.omms.msgexchangeapi.dto.msg.FltrEsDto;
|
||||
import com.gzzn.omms.msgexchangeapi.entity.msg.ABNDATA;
|
||||
import com.gzzn.omms.msgexchangeapi.entity.msg.SCHD;
|
||||
import com.gzzn.omms.msgexchangeapi.utils.JsonUtil;
|
||||
|
||||
/**
|
||||
* 航班转换
|
||||
* @author zhouxiunai
|
||||
*
|
||||
*/
|
||||
@Mapper(componentModel="spring",imports = JsonUtil.class)
|
||||
public interface FltrConvert {
|
||||
|
||||
/**
|
||||
* 转es中的dto
|
||||
* @param abndata
|
||||
* @return
|
||||
*/
|
||||
@Mapping(target = "body" , expression = "java( JsonUtil.getString(abndata.getBody()) )" )
|
||||
ABNDATADto abndataToAbndataDto(ABNDATA abndata) throws Exception;
|
||||
|
||||
/**
|
||||
* es中的dto转abndata
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Mapping(target = "body" , expression = "java( JsonUtil.getObject(dto.getBody(),ABNDATADto.class) )" )
|
||||
ABNDATA abndataDtoToAbndata(ABNDATADto dto) throws Exception;
|
||||
|
||||
|
||||
/**
|
||||
* 转换为es的dto 对象
|
||||
* @param fltr
|
||||
* @return es 的 dto
|
||||
*/
|
||||
FltrEsDto FltrToFltrEsDto(SCHD.FLTR fltr);
|
||||
|
||||
|
||||
/**
|
||||
* 转换航班动态为
|
||||
* @param fltrEsdto
|
||||
* @return 航班动态信息
|
||||
*/
|
||||
SCHD.FLTR FltrEsDtoToFltr(FltrEsDto fltrEsdto);
|
||||
}
|
||||
-5
@@ -9,15 +9,12 @@ import org.elasticsearch.index.query.BoolQueryBuilder;
|
||||
import org.elasticsearch.index.query.QueryBuilders;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.gzzn.omms.msgexchangeapi.dto.msg.FltrEsDto;
|
||||
import com.gzzn.omms.msgexchangeapi.dto.msg.convert.FltrConvert;
|
||||
import com.gzzn.omms.msgexchangeapi.elasticsearch.ElasticsearchUtil;
|
||||
import com.gzzn.omms.msgexchangeapi.entity.msg.DIVERSIONDATA;
|
||||
import com.gzzn.omms.msgexchangeapi.entity.msg.MOVEMENTINDICATOR;
|
||||
@@ -58,8 +55,6 @@ public class FlightHisServiceImpl {
|
||||
@Value("${hstCondition.SODT_HST_TIME}")
|
||||
private Integer SODT_HST_TIME ;
|
||||
|
||||
@Autowired
|
||||
FltrConvert fltrConvert;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user