diff --git a/pom.xml b/pom.xml index 353b5a5e..c2800cb0 100644 --- a/pom.xml +++ b/pom.xml @@ -23,6 +23,8 @@ UTF-8 1.8 Edgware.SR5 + jdt_apt + 1.3.0.Final @@ -145,10 +147,32 @@ + + org.mapstruct + mapstruct + ${org.mapstruct.version} + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.5.1 + + 1.8 + 1.8 + + + org.mapstruct + mapstruct-processor + ${org.mapstruct.version} + + + + org.springframework.boot spring-boot-maven-plugin diff --git a/src/main/java/com/gzzn/omms/msgexchangeapi/dto/msg/ABNDATADto.java b/src/main/java/com/gzzn/omms/msgexchangeapi/dto/msg/ABNDATADto.java new file mode 100644 index 00000000..d7145b17 --- /dev/null +++ b/src/main/java/com/gzzn/omms/msgexchangeapi/dto/msg/ABNDATADto.java @@ -0,0 +1,32 @@ +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; + } +} diff --git a/src/main/java/com/gzzn/omms/msgexchangeapi/dto/msg/FltrEsDto.java b/src/main/java/com/gzzn/omms/msgexchangeapi/dto/msg/FltrEsDto.java new file mode 100644 index 00000000..edfb33a6 --- /dev/null +++ b/src/main/java/com/gzzn/omms/msgexchangeapi/dto/msg/FltrEsDto.java @@ -0,0 +1,1823 @@ +package com.gzzn.omms.msgexchangeapi.dto.msg; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.List; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.gzzn.omms.msgexchangeapi.entity.msg.ABORTDATA; +import com.gzzn.omms.msgexchangeapi.entity.msg.BELTDATA; +import com.gzzn.omms.msgexchangeapi.entity.msg.BRIDGEDATA; +import com.gzzn.omms.msgexchangeapi.entity.msg.CHOCKSDATA; +import com.gzzn.omms.msgexchangeapi.entity.msg.CHUTEDATA; +import com.gzzn.omms.msgexchangeapi.entity.msg.DELAYDATA; +import com.gzzn.omms.msgexchangeapi.entity.msg.DESKDATA; +import com.gzzn.omms.msgexchangeapi.entity.msg.DIVERSIONDATA; +import com.gzzn.omms.msgexchangeapi.entity.msg.DOMINTMIXRGNCODE; +import com.gzzn.omms.msgexchangeapi.entity.msg.GATEDATA; +import com.gzzn.omms.msgexchangeapi.entity.msg.MAFLDATA; +import com.gzzn.omms.msgexchangeapi.entity.msg.MOVEMENTINDICATOR; +import com.gzzn.omms.msgexchangeapi.entity.msg.RETURNDATA; +import com.gzzn.omms.msgexchangeapi.entity.msg.ROUTEDAILY; +import com.gzzn.omms.msgexchangeapi.entity.msg.SERVICEDATA; +import com.gzzn.omms.msgexchangeapi.entity.msg.STANDDATA; +import com.gzzn.omms.msgexchangeapi.entity.msg.VIPDATA; + +/** + * es 存储的历史航班Dto + * @author zhouxiunai + * + */ +public class FltrEsDto + implements Serializable +{ + + private final static long serialVersionUID = 1L; + + @XmlElement(name = "FLID", required = true) + @JsonProperty("FLID") + protected BigInteger flid;//航班id + + @XmlElement(name = "ALCD", required = true) + @JsonProperty("ALCD") + protected String alcd;//airline code 航空公司代码 + + @XmlElement(name = "ALSC") + @JsonProperty("ALSC") + protected String alsc;//airline subcompany code 航空公司子公司代码 + + @XmlElement(name = "FLNO", required = true) + @JsonProperty("FLNO") + protected String flno;//flight number 航班号 + + @XmlElement(name = "MVIN", required = true) + @JsonProperty("MVIN") + @XmlSchemaType(name = "string") + protected MOVEMENTINDICATOR mvin;//movement indicator 运行标识,A – Arrival/到达 D – Departure/离港 + + @XmlElement(name = "SODT", required = true) + @JsonProperty("SODT") + protected String sodt;//航班计划日期/时间 STA 到达 ,STD 离港 + + @XmlElement(name = "FLTY", required = true) + @JsonProperty("FLTY") + protected String flty;//航班类型如客机、货机、军用、VIP等 + + @XmlElement(name = "FLIN", required = true) + @JsonProperty("FLIN") + @XmlSchemaType(name = "string") + protected DOMINTMIXRGNCODE flin;//Flight indicator 航班标识 + + @XmlElement(name = "ROUT", required = true) + @JsonProperty("ROUT") + protected List rout;//航线 + + @XmlElement(name = "ACFT", required = true) + @JsonProperty("ACFT") + protected String acft;//Aircraft type 航班使用的机型 + + @XmlElement(name = "RENO") + @JsonProperty("RENO") + protected String reno;//Registration or tail number of flight 航班注册号或尾号 + + @XmlElement(name = "LRENO") + @JsonProperty("LRENO") + protected String lreno;//Registration or tail number of flight 航班注册号或尾号,上一次的值 + + @XmlElement(name = "TAOP") + @JsonProperty("TAOP") + protected String taop;//Turnaround operator 承运人 + + @XmlElement(name = "TAFL") + @JsonProperty("TAFL") + protected String tafl;//Turnaround flight number 承运航班号 + + @XmlElement(name = "TAID") + @JsonProperty("TAID") + protected BigInteger taid;// 后接飞航班唯一的AODB ID + + @XmlElement(name = "TRML") + @JsonProperty("TRML") + protected String trml;// Terminal 航班航站楼 + + @XmlElement(name = "MAXP") + @JsonProperty("MAXP") + protected BigInteger maxp;//Maximum passengers 该航班最大载客数 + + @XmlElement(name = "CSOP") + @JsonProperty("CSOP") + protected String csop;//code share flight Operator 共享航班的主航班承运人代码 + + @XmlElement(name = "CSFT") + @JsonProperty("CSFT") + protected String csft;//code share flight Flight number 共享航班的主航班号 + + @XmlElement(name = "MAID") + @JsonProperty("MAID") + protected BigInteger maid;//代码共享航班的主航班的唯一的master flight AODB ID + + @XmlElement(name = "ESTT") + @JsonProperty("ESTT") + protected String estt;//Estimated time of flight. 预计时间 + + @XmlElement(name = "ACTT") + @JsonProperty("ACTT") + protected String actt;//Actual time of flight. 实际时间 + + @XmlElement(name = "CHDT") + @JsonProperty("CHDT") + protected List chdt;//chutes 多行李传送带数据 + + @XmlElement(name = "GTDT") + @JsonProperty("GTDT") + protected List gtdt;//gate data 航班登机门数据 + + @XmlElement(name = "STND") + @JsonProperty("STND") + protected String stnd;// stand 航班当前停机位位置 + + @XmlElement(name = "PSDT") + @JsonProperty("PSDT") + protected List psdt;//航班计划机位数据 plan stand data + + @XmlElement(name = "LPSDT") + @JsonProperty("LPSDT") + protected String lpsdt;//上次航班机位数据,机位逗号分隔 + + @XmlElement(name = "CKDT") + @JsonProperty("CKDT") + protected List ckdt;// check in counter data 值机位数据 + + @XmlElement(name = "PHAG") + @JsonProperty("PHAG") + protected BigInteger phag;//Passenger handling agent for flight 航班旅客处理柜员 + + @XmlElement(name = "CNCL") + @JsonProperty("CNCL") + protected String cncl;//取消日期时间 + + @XmlElement(name = "DELY") + @JsonProperty("DELY") + protected List dely;//延误信息数据 + + @XmlElement(name = "REMC") + @JsonProperty("REMC") + protected String remc;// remarks 文本注释 + + @XmlElement(name = "CLDT") + @JsonProperty("CLDT") + protected List cldt;//航班的行李传送转盘数据 + + @XmlElement(name = "BOTM") + @JsonProperty("BOTM") + protected String botm;//Boarding open time 离港航班登机开始时间 + + @XmlElement(name = "LACL") + @JsonProperty("LACL") + protected String lacl;//last call 离港航班最后通知时间 + + @XmlElement(name = "FINT") + @JsonProperty("FINT") + protected String fint;//Finals Time. 最终时间。 + + @XmlElement(name = "CHOT") + @JsonProperty("CHOT") + protected List chot;// chocks time 轮挡时间数据 + + @XmlElement(name = "APPT") + @JsonProperty("APPT") + protected String appt;//Approved time for departures 批准的离港时间 + + @XmlElement(name = "EGSR") + @JsonProperty("EGSR") + protected String egsr;//Engine start request for departures 离港时引擎发动请求 + + @XmlElement(name = "EGST") + @JsonProperty("EGST") + protected String egst;//Engine start time for departures 离港引擎发动时间 + + @XmlElement(name = "FHAG") + @JsonProperty("FHAG") + protected BigInteger fhag;//Field (or Ground) Handling agent for flight. 航班的机坪(或外场)处理代理 + + @XmlElement(name = "MHAG") + @JsonProperty("MHAG") + protected BigInteger mhag;//Maintenance Handling agent for flight. 航班维护处理代理 + + @XmlElement(name = "VIPP") + @JsonProperty("VIPP") + protected BigInteger vipp;//VIP passengers.当前航班的VIP旅客数 + + @XmlElement(name = "VIPR") + @JsonProperty("VIPR") + protected BigInteger vipr;//VIP航班等级标志 一个单一数字表示VIP的 等级 + + @XmlElement(name = "FDIV") + @JsonProperty("FDIV") + protected DIVERSIONDATA fdiv;//转场 + + @XmlElement(name = "FRET") + @JsonProperty("FRET") + protected RETURNDATA fret;//flight has returned 航班返回原因描述 + + @XmlElement(name = "ABTM") + @JsonProperty("ABTM") + protected List abtm;//Air bridge time 登机桥时间数据 + + + @XmlElement(name = "ABDG") + @JsonProperty("ABDG") + protected String abdg;//登机桥数据,逗号分隔 + + + @XmlElement(name = "FLAB") + @JsonProperty("FLAB") + protected ABORTDATA flab;// flight’s landing has been aborted.航班着陆中止原因的描述 + + @XmlElement(name = "SRVT") + @JsonProperty("SRVT") + protected List srvt;//service 服务数据 + + @XmlElement(name = "VIPF") + @JsonProperty("VIPF") + protected List vipf;//VIP 数据 + + @XmlElement(name = "LBNO") + @JsonProperty("LBNO") + protected BigInteger lbno;//No of local bags 离港航班本地值机行李件数 + + @XmlElement(name = "LBWT") + @JsonProperty("LBWT") + protected BigDecimal lbwt;//Total local checked in bag weight for departure flights 离港航班本地值机行李总重量 + + @XmlElement(name = "PAXC") + @JsonProperty("PAXC") + protected BigInteger paxc;//Total number of passengers on the flight 航班旅客总数 + + @XmlElement(name = "ERUT", required = true) + @JsonProperty("ERUT") + protected List erut;//完整航线的细节信息 和 rout 有区别 + + @XmlElement(name = "EXSC") + @JsonProperty("EXSC") + protected String exsc;//Flight external status code 航班外部状态代码 + + @XmlElement(name = "EXSR") + @JsonProperty("EXSR") + protected String exsr;//Flight external status remarks 航班外部状态备注 + + @XmlElement(name = "FTSS", required = true) + @JsonProperty("FTSS") + protected String ftss;//Flight status 航班状态,参照基础数据, + + @XmlElement(name = "PEDT") + @JsonProperty("PEDT") + protected String pedt; + + @XmlElement(name = "NEAT") + @JsonProperty("NEAT") + protected String neat; + + @XmlElement(name = "PADT") + @JsonProperty("PADT") + protected String padt;//Actual departure time for previous step. 前站实际起飞时间 + + @XmlElement(name = "NAAT") + @JsonProperty("NAAT") + protected String naat; + + @XmlElement(name = "ABN") + @JsonProperty("ABN") + protected List abn;//abnormal 异常状态信息列表,DLY,RTN,CAN,ALT + + @XmlElement(name = "MAFL") + @JsonProperty("MAFL") + protected List mafl;//共享航班数据信息 + + /** + * 获取flid属性的值。 + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getFLID() { + return flid; + } + + /** + * 设置flid属性的值。 + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setFLID(BigInteger value) { + this.flid = value; + } + + /** + * 获取alcd属性的值。 + * + * @return + * possible object is + * {@link String } + * + */ + public String getALCD() { + return alcd; + } + + /** + * 设置alcd属性的值。 + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setALCD(String value) { + this.alcd = value; + } + + /** + * 获取alsc属性的值。 + * + * @return + * possible object is + * {@link String } + * + */ + public String getALSC() { + return alsc; + } + + /** + * 设置alsc属性的值。 + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setALSC(String value) { + this.alsc = value; + } + + /** + * 获取flno属性的值。 + * + * @return + * possible object is + * {@link String } + * + */ + public String getFLNO() { + return flno; + } + + /** + * 设置flno属性的值。 + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFLNO(String value) { + this.flno = value; + } + + /** + * 获取mvin属性的值。 + * + * @return + * possible object is + * {@link MOVEMENTINDICATOR } + * + */ + public MOVEMENTINDICATOR getMVIN() { + return mvin; + } + + /** + * 设置mvin属性的值。 + * + * @param value + * allowed object is + * {@link MOVEMENTINDICATOR } + * + */ + public void setMVIN(MOVEMENTINDICATOR value) { + this.mvin = value; + } + + /** + * 获取sodt属性的值。 + * + * @return + * possible object is + * {@link String } + * + */ + public String getSODT() { + return sodt; + } + + /** + * 设置sodt属性的值。 + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSODT(String value) { + this.sodt = value; + } + + /** + * 获取flty属性的值。 + * + * @return + * possible object is + * {@link String } + * + */ + public String getFLTY() { + return flty; + } + + /** + * 设置flty属性的值。 + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFLTY(String value) { + this.flty = value; + } + + /** + * 获取flin属性的值。 + * + * @return + * possible object is + * {@link DOMINTMIXRGNCODE } + * + */ + public DOMINTMIXRGNCODE getFLIN() { + return flin; + } + + /** + * 设置flin属性的值。 + * + * @param value + * allowed object is + * {@link DOMINTMIXRGNCODE } + * + */ + public void setFLIN(DOMINTMIXRGNCODE value) { + this.flin = value; + } + + /** + * Gets the value of the rout property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the rout property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getROUT().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link ROUTEDAILY } + * + * + */ + public List getROUT() { + if (rout == null) { + rout = new ArrayList(); + } + return this.rout; + } + + /** + * 获取acft属性的值。 + * + * @return + * possible object is + * {@link String } + * + */ + public String getACFT() { + return acft; + } + + /** + * 设置acft属性的值。 + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setACFT(String value) { + this.acft = value; + } + + /** + * 获取reno属性的值。 + * + * @return + * possible object is + * {@link String } + * + */ + public String getRENO() { + return reno; + } + + /** + * 设置reno属性的值。 + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setRENO(String value) { + this.reno = value; + } + + /** + * 获取taop属性的值。 + * + * @return + * possible object is + * {@link String } + * + */ + public String getTAOP() { + return taop; + } + + /** + * 设置taop属性的值。 + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTAOP(String value) { + this.taop = value; + } + + /** + * 获取tafl属性的值。 + * + * @return + * possible object is + * {@link String } + * + */ + public String getTAFL() { + return tafl; + } + + /** + * 设置tafl属性的值。 + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTAFL(String value) { + this.tafl = value; + } + + /** + * 获取taid属性的值。 + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getTAID() { + return taid; + } + + /** + * 设置taid属性的值。 + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setTAID(BigInteger value) { + this.taid = value; + } + + /** + * 获取trml属性的值。 + * + * @return + * possible object is + * {@link String } + * + */ + public String getTRML() { + return trml; + } + + /** + * 设置trml属性的值。 + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTRML(String value) { + this.trml = value; + } + + /** + * 获取maxp属性的值。 + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getMAXP() { + return maxp; + } + + /** + * 设置maxp属性的值。 + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setMAXP(BigInteger value) { + this.maxp = value; + } + + /** + * 获取csop属性的值。 + * + * @return + * possible object is + * {@link String } + * + */ + public String getCSOP() { + return csop; + } + + /** + * 设置csop属性的值。 + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCSOP(String value) { + this.csop = value; + } + + /** + * 获取csft属性的值。 + * + * @return + * possible object is + * {@link String } + * + */ + public String getCSFT() { + return csft; + } + + /** + * 设置csft属性的值。 + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCSFT(String value) { + this.csft = value; + } + + /** + * 获取maid属性的值。 + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getMAID() { + return maid; + } + + /** + * 设置maid属性的值。 + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setMAID(BigInteger value) { + this.maid = value; + } + + /** + * 获取estt属性的值。 + * + * @return + * possible object is + * {@link String } + * + */ + public String getESTT() { + return estt; + } + + /** + * 设置estt属性的值。 + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setESTT(String value) { + this.estt = value; + } + + /** + * 获取actt属性的值。 + * + * @return + * possible object is + * {@link String } + * + */ + public String getACTT() { + return actt; + } + + /** + * 设置actt属性的值。 + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setACTT(String value) { + this.actt = value; + } + + /** + * Gets the value of the chdt property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the chdt property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getCHDT().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link CHUTEDATA } + * + * + */ + public List getCHDT() { + if (chdt == null) { + chdt = new ArrayList(); + } + return this.chdt; + } + + /** + * Gets the value of the gtdt property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the gtdt property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getGTDT().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link GATEDATA } + * + * + */ + public List getGTDT() { + if (gtdt == null) { + gtdt = new ArrayList(); + } + return this.gtdt; + } + + /** + * 获取stnd属性的值。 + * + * @return + * possible object is + * {@link String } + * + */ + public String getSTND() { + return stnd; + } + + /** + * 设置stnd属性的值。 + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSTND(String value) { + this.stnd = value; + } + + /** + * Gets the value of the psdt property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the psdt property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getPSDT().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link STANDDATA } + * + * + */ + public List getPSDT() { + if (psdt == null) { + psdt = new ArrayList(); + } + return this.psdt; + } + + /** + * Gets the value of the ckdt property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the ckdt property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getCKDT().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link DESKDATA } + * + * + */ + public List getCKDT() { + if (ckdt == null) { + ckdt = new ArrayList(); + } + return this.ckdt; + } + + /** + * 获取phag属性的值。 + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getPHAG() { + return phag; + } + + /** + * 设置phag属性的值。 + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setPHAG(BigInteger value) { + this.phag = value; + } + + /** + * 获取cncl属性的值。 + * + * @return + * possible object is + * {@link String } + * + */ + public String getCNCL() { + return cncl; + } + + /** + * 设置cncl属性的值。 + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCNCL(String value) { + this.cncl = value; + } + + /** + * Gets the value of the dely property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the dely property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getDELY().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link DELAYDATA } + * + * + */ + public List getDELY() { + if (dely == null) { + dely = new ArrayList(); + } + return this.dely; + } + + /** + * 获取remc属性的值。 + * + * @return + * possible object is + * {@link String } + * + */ + public String getREMC() { + return remc; + } + + /** + * 设置remc属性的值。 + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setREMC(String value) { + this.remc = value; + } + + /** + * Gets the value of the cldt property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the cldt property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getCLDT().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link BELTDATA } + * + * + */ + public List getCLDT() { + if (cldt == null) { + cldt = new ArrayList(); + } + return this.cldt; + } + + /** + * 获取botm属性的值。 + * + * @return + * possible object is + * {@link String } + * + */ + public String getBOTM() { + return botm; + } + + /** + * 设置botm属性的值。 + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setBOTM(String value) { + this.botm = value; + } + + /** + * 获取lacl属性的值。 + * + * @return + * possible object is + * {@link String } + * + */ + public String getLACL() { + return lacl; + } + + /** + * 设置lacl属性的值。 + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setLACL(String value) { + this.lacl = value; + } + + /** + * 获取fint属性的值。 + * + * @return + * possible object is + * {@link String } + * + */ + public String getFINT() { + return fint; + } + + /** + * 设置fint属性的值。 + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFINT(String value) { + this.fint = value; + } + + /** + * Gets the value of the chot property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the chot property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getCHOT().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link CHOCKSDATA } + * + * + */ + public List getCHOT() { + if (chot == null) { + chot = new ArrayList(); + } + return this.chot; + } + + /** + * 获取appt属性的值。 + * + * @return + * possible object is + * {@link String } + * + */ + public String getAPPT() { + return appt; + } + + /** + * 设置appt属性的值。 + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAPPT(String value) { + this.appt = value; + } + + /** + * 获取egsr属性的值。 + * + * @return + * possible object is + * {@link String } + * + */ + public String getEGSR() { + return egsr; + } + + /** + * 设置egsr属性的值。 + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setEGSR(String value) { + this.egsr = value; + } + + /** + * 获取egst属性的值。 + * + * @return + * possible object is + * {@link String } + * + */ + public String getEGST() { + return egst; + } + + /** + * 设置egst属性的值。 + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setEGST(String value) { + this.egst = value; + } + + /** + * 获取fhag属性的值。 + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getFHAG() { + return fhag; + } + + /** + * 设置fhag属性的值。 + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setFHAG(BigInteger value) { + this.fhag = value; + } + + /** + * 获取mhag属性的值。 + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getMHAG() { + return mhag; + } + + /** + * 设置mhag属性的值。 + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setMHAG(BigInteger value) { + this.mhag = value; + } + + /** + * 获取vipp属性的值。 + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getVIPP() { + return vipp; + } + + /** + * 设置vipp属性的值。 + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setVIPP(BigInteger value) { + this.vipp = value; + } + + /** + * 获取vipr属性的值。 + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getVIPR() { + return vipr; + } + + /** + * 设置vipr属性的值。 + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setVIPR(BigInteger value) { + this.vipr = value; + } + + /** + * 获取fdiv属性的值。 + * + * @return + * possible object is + * {@link DIVERSIONDATA } + * + */ + public DIVERSIONDATA getFDIV() { + return fdiv; + } + + /** + * 设置fdiv属性的值。 + * + * @param value + * allowed object is + * {@link DIVERSIONDATA } + * + */ + public void setFDIV(DIVERSIONDATA value) { + this.fdiv = value; + } + + /** + * 获取fret属性的值。 + * + * @return + * possible object is + * {@link RETURNDATA } + * + */ + public RETURNDATA getFRET() { + return fret; + } + + /** + * 设置fret属性的值。 + * + * @param value + * allowed object is + * {@link RETURNDATA } + * + */ + public void setFRET(RETURNDATA value) { + this.fret = value; + } + + /** + * Gets the value of the abtm property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the abtm property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getABTM().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link BRIDGEDATA } + * + * + */ + public List getABTM() { + if (abtm == null) { + abtm = new ArrayList(); + } + return this.abtm; + } + + /** + * 获取flab属性的值。 + * + * @return + * possible object is + * {@link ABORTDATA } + * + */ + public ABORTDATA getFLAB() { + return flab; + } + + /** + * 设置flab属性的值。 + * + * @param value + * allowed object is + * {@link ABORTDATA } + * + */ + public void setFLAB(ABORTDATA value) { + this.flab = value; + } + + /** + * Gets the value of the srvt property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the srvt property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getSRVT().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link SERVICEDATA } + * + * + */ + public List getSRVT() { + if (srvt == null) { + srvt = new ArrayList(); + } + return this.srvt; + } + + /** + * Gets the value of the vipf property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the vipf property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getVIPF().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link VIPDATA } + * + * + */ + public List getVIPF() { + if (vipf == null) { + vipf = new ArrayList(); + } + return this.vipf; + } + + /** + * 获取lbno属性的值。 + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getLBNO() { + return lbno; + } + + /** + * 设置lbno属性的值。 + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setLBNO(BigInteger value) { + this.lbno = value; + } + + /** + * 获取lbwt属性的值。 + * + * @return + * possible object is + * {@link BigDecimal } + * + */ + public BigDecimal getLBWT() { + return lbwt; + } + + /** + * 设置lbwt属性的值。 + * + * @param value + * allowed object is + * {@link BigDecimal } + * + */ + public void setLBWT(BigDecimal value) { + this.lbwt = value; + } + + /** + * 获取paxc属性的值。 + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getPAXC() { + return paxc; + } + + /** + * 设置paxc属性的值。 + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setPAXC(BigInteger value) { + this.paxc = value; + } + + /** + * Gets the value of the erut property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the erut property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getERUT().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link ROUTEDAILY } + * + * + */ + public List getERUT() { + if (erut == null) { + erut = new ArrayList(); + } + return this.erut; + } + + /** + * 获取exsc属性的值。 + * + * @return + * possible object is + * {@link String } + * + */ + public String getEXSC() { + return exsc; + } + + /** + * 设置exsc属性的值。 + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setEXSC(String value) { + this.exsc = value; + } + + /** + * 获取exsr属性的值。 + * + * @return + * possible object is + * {@link String } + * + */ + public String getEXSR() { + return exsr; + } + + /** + * 设置exsr属性的值。 + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setEXSR(String value) { + this.exsr = value; + } + + /** + * 获取ftss属性的值。 + * + * @return + * possible object is + * {@link String } + * + */ + public String getFTSS() { + return ftss; + } + + /** + * 设置ftss属性的值。 + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFTSS(String value) { + this.ftss = value; + } + + /** + * 获取pedt属性的值。 + * + * @return + * possible object is + * {@link String } + * + */ + public String getPEDT() { + return pedt; + } + + /** + * 设置pedt属性的值。 + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPEDT(String value) { + this.pedt = value; + } + + /** + * 获取neat属性的值。 + * + * @return + * possible object is + * {@link String } + * + */ + public String getNEAT() { + return neat; + } + + /** + * 设置neat属性的值。 + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setNEAT(String value) { + this.neat = value; + } + + /** + * 获取padt属性的值。 + * + * @return + * possible object is + * {@link String } + * + */ + public String getPADT() { + return padt; + } + + /** + * 设置padt属性的值。 + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPADT(String value) { + this.padt = value; + } + + /** + * 获取naat属性的值。 + * + * @return + * possible object is + * {@link String } + * + */ + public String getNAAT() { + return naat; + } + + /** + * 设置naat属性的值。 + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setNAAT(String value) { + this.naat = value; + } + + public String getLpsdt() { + return lpsdt; + } + + public void setLpsdt(String lpsdt) { + this.lpsdt = lpsdt; + } + + public String getLreno() { + return lreno; + } + + public void setLreno(String lreno) { + this.lreno = lreno; + } + + public List getAbn() { + if (abn == null) { + abn = new ArrayList(); + } + return abn; + } + + public void setAbn(List abn) { + this.abn = abn; + } + + public List getMafl() { + if (null == mafl) { + mafl = new ArrayList(); + } + return mafl; + } + + public void setMafl(List mafl) { + this.mafl = mafl; + } + + public String getAbdg() { + return abdg; + } + + public void setAbdg(String abdg) { + this.abdg = abdg; + } +} diff --git a/src/main/java/com/gzzn/omms/msgexchangeapi/dto/msg/convert/FltrConvert.java b/src/main/java/com/gzzn/omms/msgexchangeapi/dto/msg/convert/FltrConvert.java new file mode 100644 index 00000000..831a361f --- /dev/null +++ b/src/main/java/com/gzzn/omms/msgexchangeapi/dto/msg/convert/FltrConvert.java @@ -0,0 +1,51 @@ +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); +} diff --git a/src/main/java/com/gzzn/omms/msgexchangeapi/scheduled/FlightHisScheduled.java b/src/main/java/com/gzzn/omms/msgexchangeapi/scheduled/FlightHisScheduled.java index ffb48868..9634654e 100644 --- a/src/main/java/com/gzzn/omms/msgexchangeapi/scheduled/FlightHisScheduled.java +++ b/src/main/java/com/gzzn/omms/msgexchangeapi/scheduled/FlightHisScheduled.java @@ -63,13 +63,17 @@ public class FlightHisScheduled { logger.info("获取到历史动态航班数据:{}条,准备转历史",fltrsHistory.size()); //航班历史写入ELK - flightHisServiceImpl.save(fltrsHistory); + List successSaveFltr = flightHisServiceImpl.save(fltrsHistory); - //从redis中删除历史航班 - List fltrIdForHistory = fltrsHistory.stream().map(node->{ + //从redis中删除成功保存的历史航班 + List fltrIdForHistory = successSaveFltr.stream().map(node->{ return node.getFLID().toString(); }).collect(Collectors.toList()); - flightInfoService.batchDeleteFltr(fltrIdForHistory); + + if(!CollectionUtils.isEmpty(fltrIdForHistory)) + { + flightInfoService.batchDeleteFltr(fltrIdForHistory); + } } catch (Exception e) { logger.error("动态航班转历史错误:{}",e.getMessage()); } diff --git a/src/main/java/com/gzzn/omms/msgexchangeapi/service/flightInfo/FlightHisServiceImpl.java b/src/main/java/com/gzzn/omms/msgexchangeapi/service/flightInfo/FlightHisServiceImpl.java index 3cad3222..fcfd4f6c 100644 --- a/src/main/java/com/gzzn/omms/msgexchangeapi/service/flightInfo/FlightHisServiceImpl.java +++ b/src/main/java/com/gzzn/omms/msgexchangeapi/service/flightInfo/FlightHisServiceImpl.java @@ -9,12 +9,15 @@ 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; @@ -22,6 +25,7 @@ import com.gzzn.omms.msgexchangeapi.entity.msg.SCHD.FLTR; import com.gzzn.omms.msgexchangeapi.utils.DateTimeUtil; import com.gzzn.omms.msgexchangeapi.utils.JsonUtil; + /** * 航班历史服务 * @author zhouxiunai @@ -54,6 +58,9 @@ public class FlightHisServiceImpl { @Value("${hstCondition.SODT_HST_TIME}") private Integer SODT_HST_TIME ; + @Autowired + FltrConvert fltrConvert; + /** * 历史航班数据索引 @@ -119,13 +126,19 @@ public class FlightHisServiceImpl { /** * 保存航班历史到ELK * @param fltrs - * @return + * @return 成功保存的航班动态 */ - public boolean save(List fltrs) + public List save(List fltrs) { + List fltrSaveSuccess = new ArrayList(); //成功转历史的航班列表信息 + for(FLTR fltr : fltrs){ try { - JSONObject jsondata = JSONObject.parseObject(JsonUtil.getString(fltr)); + //先转换航班信息为可存储到es 中的fltr dto 对象 + FltrEsDto fltrEsDto = fltrConvert.FltrToFltrEsDto(fltr); + + + JSONObject jsondata = JSONObject.parseObject(JsonUtil.getString(fltrEsDto)); //判断是否已经拥有该历史数据 因es类型原因请注意类型转换 String SODT = fltr.getSODT(); Long FLID = fltr.getFLID().longValue(); @@ -143,11 +156,13 @@ public class FlightHisServiceImpl { //新增 ElasticsearchUtil.addData(jsondata, INDEX_NAME, ES_TYPE); } + + fltrSaveSuccess.add(fltr); } catch (Exception e) { logger.error("插入或更新动态航班历史错误:{}",e.getMessage()); } } - return false; + return fltrSaveSuccess; } diff --git a/src/test/java/com/gzzn/omms/msgexchangeapi/service/flightInfo/FlightHisServiceImplTest.java b/src/test/java/com/gzzn/omms/msgexchangeapi/service/flightInfo/FlightHisServiceImplTest.java index 61b52c86..ea06b9f2 100644 --- a/src/test/java/com/gzzn/omms/msgexchangeapi/service/flightInfo/FlightHisServiceImplTest.java +++ b/src/test/java/com/gzzn/omms/msgexchangeapi/service/flightInfo/FlightHisServiceImplTest.java @@ -43,8 +43,21 @@ public class FlightHisServiceImplTest { List fltrsHis = flightHisServiceImpl.getHisToBeTran(fltrs); System.out.println("等待转历史航班动态条数:"+fltrsHis.size()); - //flightHisServiceImpl.save(fltrsHis); assertThat(fltrsHis).isNotEmpty(); } + + /** + * 测试保存航班历史 + */ + @Test + public void testSave() + { + List fltrs = flightInfoService.findAll(); + assertThat(fltrs).isNotEmpty(); + + + List fltrsSuccess = flightHisServiceImpl.save(fltrs); + assertThat(fltrsSuccess).hasSize(fltrs.size()); + } }