增加航班季度计划 实体类,DAO , controller、Dto、Convert接口实现
This commit is contained in:
+30
-11
@@ -1,33 +1,52 @@
|
||||
package com.gzzn.omms.adminapi.controller.schedule;
|
||||
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.gzzn.omms.adminapi.domain.secondary.entity.schedule.FimsFlightschdSeason;
|
||||
import com.gzzn.omms.adminapi.dto.ResponseDto;
|
||||
import com.gzzn.omms.adminapi.enums.ResultCode;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.gzzn.omms.adminapi.domain.secondary.dao.basicdata.FimsFlightschdSeasonDao;
|
||||
import com.gzzn.omms.adminapi.domain.secondary.entity.schedule.FimsFlightschdSeason;
|
||||
import com.gzzn.omms.adminapi.dto.ResponseDto;
|
||||
import com.gzzn.omms.adminapi.dto.basicdata.FimsFlightschdSeasonDto;
|
||||
import com.gzzn.omms.adminapi.dto.basicdata.convert.FimsFlightschdSeasonConvert;
|
||||
|
||||
/**
|
||||
* 航班季度计划
|
||||
* @author Administrator
|
||||
*
|
||||
*/
|
||||
@Api(value="航班季度计划",tags="航班季度计划")
|
||||
@RestController
|
||||
public class FlightSchdSeasonController {
|
||||
|
||||
/**
|
||||
* 航班季度计划接口
|
||||
*/
|
||||
@Autowired
|
||||
private FimsFlightschdSeasonDao fimsFlightschdSeasonDao;
|
||||
/**
|
||||
* 航班季度计划Dto接口
|
||||
*/
|
||||
@Autowired
|
||||
private FimsFlightschdSeasonConvert fimsFlightschdSeasonConvert;
|
||||
/**
|
||||
* 获取所有航班季度计划
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value="获取航班计划列表")
|
||||
@GetMapping(value="/schedule/flightSchdSeasons")
|
||||
public ResponseDto<FimsFlightschdSeason> getFlightSchdSeason()
|
||||
{
|
||||
return ResponseDto.failure(ResultCode.INTERFACE_NOT_IMPLEMENT);
|
||||
public ResponseDto<List<FimsFlightschdSeasonDto>> getFlightSchdSeason() {
|
||||
List<FimsFlightschdSeason> fimsFlightschdSeasonsList = (List<FimsFlightschdSeason>) fimsFlightschdSeasonDao.findAll();
|
||||
|
||||
//转换dto
|
||||
List<FimsFlightschdSeasonDto> fimsFlightschdSeasonsListDto = fimsFlightschdSeasonsList.stream().map(x -> {
|
||||
FimsFlightschdSeasonDto dto = fimsFlightschdSeasonConvert.fimsFlightschdSeasonToFimsFlightschdSeasonDto(x);
|
||||
return dto;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
return ResponseDto.success(fimsFlightschdSeasonsListDto);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package com.gzzn.omms.adminapi.domain.secondary.dao.basicdata;
|
||||
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
|
||||
import com.gzzn.omms.adminapi.domain.secondary.entity.schedule.FimsFlightschdSeason;
|
||||
|
||||
public interface FimsFlightschdSeasonDao extends CrudRepository<FimsFlightschdSeason, String> {
|
||||
|
||||
}
|
||||
+25
-23
@@ -3,7 +3,6 @@ package com.gzzn.omms.adminapi.domain.secondary.entity.schedule;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
@@ -12,10 +11,10 @@ import javax.persistence.Table;
|
||||
import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
|
||||
|
||||
/**
|
||||
* The persistent class for the FIMS_FLIGHTSCHD_SEASON database table.
|
||||
*
|
||||
* 航班季度计划
|
||||
* @author nyr
|
||||
* @date 18-10-31
|
||||
*/
|
||||
@Entity
|
||||
@Table(name="FIMS_FLIGHTSCHD_SEASON")
|
||||
@@ -25,71 +24,74 @@ public class FimsFlightschdSeason implements Serializable {
|
||||
|
||||
@Id
|
||||
@Column(name="SEASONFLIGHT_ID")
|
||||
private long seasonflightId;
|
||||
private long seasonflightId; //季度计划航班ID
|
||||
|
||||
@Column(name="AIRCRAFT_TYPE_CODE")
|
||||
private String aircraftTypeCode;
|
||||
private String aircraftTypeCode; //机型代码
|
||||
|
||||
@Column(name="AIRLINE_ID")
|
||||
private BigDecimal airlineId;
|
||||
private BigDecimal airlineId; //航空公司ID
|
||||
|
||||
@Column(name="ARRI_OR_DEPT")
|
||||
private String arriOrDept;
|
||||
private String arriOrDept; //到达/出发(进港/出港)标志A-到达D-出发
|
||||
|
||||
@Column(name="ARRIVAL_TIME")
|
||||
private String arrivalTime;
|
||||
private String arrivalTime; //到达时间hhmm
|
||||
|
||||
@Column(name="DEPARTURE_TIME")
|
||||
private String departureTime;
|
||||
private String departureTime; //出发时间hhmm
|
||||
|
||||
@Column(name="END_AIRPORT")
|
||||
private String endAirport;
|
||||
private String endAirport; //终点机场(航线终点)
|
||||
|
||||
@Temporal(TemporalType.DATE)
|
||||
@Column(name="END_DATE")
|
||||
private Date endDate;
|
||||
private Date endDate; //结束日期
|
||||
|
||||
@Column(name="FLIGHT_NUMBER")
|
||||
private String flightNumber;
|
||||
private String flightNumber; //航班号
|
||||
|
||||
//航班任务:S正班、N包机、E急救、B专机、G通用、J加班、M军用、Q补班、X其他、A计划外(原参考分类:正班、加班、补班、中转、计划外、计划外中转、货运、训练...)
|
||||
@Column(name="FLIGHT_TASK")
|
||||
private String flightTask;
|
||||
|
||||
//航班类别(有待BHIA确认):P客机、F货机、B专机、O公务机、M军机、X其他(原参考分类:客机、货机、专机、公务机、军机、其他)
|
||||
@Column(name="FLIGHT_TYPE_CODE")
|
||||
private String flightTypeCode;
|
||||
|
||||
@Column(name="FLYING_DISTANCE")
|
||||
private BigDecimal flyingDistance;
|
||||
private BigDecimal flyingDistance; //飞行距离(单位:千米)
|
||||
|
||||
@Column(name="FLYING_TIME")
|
||||
private BigDecimal flyingTime;
|
||||
private BigDecimal flyingTime; //飞行时间(单位:分钟)
|
||||
|
||||
@Column(name="INTERNATIONAL_CODE")
|
||||
private String internationalCode;
|
||||
private String internationalCode; //航班国际代码
|
||||
|
||||
//运营日(周一至周日)对应表示方法为:1234567,当某日为非运营日时,对应位置用“-”表示,如周三、五为非运营日,则表示为:12-4-67
|
||||
@Column(name="OPERATION_DAYS")
|
||||
private String operationDays;
|
||||
|
||||
private String remarks;
|
||||
private String remarks; //备注说明
|
||||
|
||||
@Column(name="ROUTE_TYPE")
|
||||
private String routeType;
|
||||
private String routeType; //航线类别I-国际、D-国内、M-混合
|
||||
|
||||
@Column(name="SEASON_NAME")
|
||||
private String seasonName;
|
||||
private String seasonName; //季度名称
|
||||
|
||||
@Column(name="SEASON_REC_ID")
|
||||
private BigDecimal seasonRecId;
|
||||
private BigDecimal seasonRecId; //航班季度定义表记录ID
|
||||
|
||||
@Column(name="START_AIRPORT")
|
||||
private String startAirport;
|
||||
private String startAirport; //起点机场(航线起点)
|
||||
|
||||
@Temporal(TemporalType.DATE)
|
||||
@Column(name="START_DATE")
|
||||
private Date startDate;
|
||||
private Date startDate; //开始日期
|
||||
|
||||
@Column(name="SUB_AIRLINE_ID")
|
||||
private BigDecimal subAirlineId;
|
||||
private BigDecimal subAirlineId; //二级承运航空公司ID
|
||||
|
||||
public FimsFlightschdSeason() {
|
||||
}
|
||||
|
||||
@@ -0,0 +1,257 @@
|
||||
package com.gzzn.omms.adminapi.dto.basicdata;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@ApiModel(value="航班季度计划Dto",description="航班季度计划")
|
||||
public class FimsFlightschdSeasonDto {
|
||||
|
||||
@ApiModelProperty(value="季度计划航班ID",example="95761520")
|
||||
private long seasonflightId;
|
||||
|
||||
@ApiModelProperty(value="机型代码",example="jsdm")
|
||||
private String aircraftTypeCode;
|
||||
|
||||
@ApiModelProperty(value="航空公司ID",example="15233256")
|
||||
private BigDecimal airlineId;
|
||||
|
||||
@ApiModelProperty(value="到达/出发(进港/出港)标志A-到达D-出发",example="A")
|
||||
private String arriOrDept;
|
||||
|
||||
@ApiModelProperty(value="到达时间hhmm",example="1520")
|
||||
private String arrivalTime;
|
||||
|
||||
@ApiModelProperty(value="出发时间hhmm",example="")
|
||||
private String departureTime;
|
||||
|
||||
@ApiModelProperty(value="终点机场(航线终点)",example="CTU")
|
||||
private String endAirport;
|
||||
|
||||
@ApiModelProperty(value="结束日期",example="2018-10-31 00:00:00")
|
||||
private Date endDate;
|
||||
|
||||
@ApiModelProperty(value="航班号",example="3U8692")
|
||||
private String flightNumber;
|
||||
|
||||
@ApiModelProperty(value="航班任务:S正班、N包机、E急救、B专机、G通用、J加班、M军用、Q补班、X其他、A计划外(原参考分类:正班、加班、补班、中转、计划外、计划外中转、货运、训练...)",example="S")
|
||||
private String flightTask;
|
||||
|
||||
@ApiModelProperty(value="航班类别(有待BHIA确认):P客机、F货机、B专机、O公务机、M军机、X其他(原参考分类:客机、货机、专机、公务机、军机、其他)",example="P")
|
||||
private String flightTypeCode;
|
||||
|
||||
@ApiModelProperty(value="飞行距离(单位:千米)",example="1000")
|
||||
private BigDecimal flyingDistance;
|
||||
|
||||
@ApiModelProperty(value="飞行时间(单位:分钟)",example="")
|
||||
private BigDecimal flyingTime;
|
||||
|
||||
@ApiModelProperty(value="航班国际代码",example="")
|
||||
private String internationalCode;
|
||||
|
||||
@ApiModelProperty(value="运营日(周一至周日)对应表示方法为:1234567,当某日为非运营日时,对应位置用“-”表示,如周三、五为非运营日,则表示为:12-4-67",example="12-4-67")
|
||||
private String operationDays;
|
||||
|
||||
@ApiModelProperty(value="备注说明",example="")
|
||||
private String remarks;
|
||||
|
||||
@ApiModelProperty(value="航线类别I-国际、D-国内、M-混合",example="D")
|
||||
private String routeType;
|
||||
|
||||
@ApiModelProperty(value="季度名称",example="2012XIAQIU")
|
||||
private String seasonName;
|
||||
|
||||
@ApiModelProperty(value="航班季度定义表记录ID",example="")
|
||||
private BigDecimal seasonRecId;
|
||||
|
||||
@ApiModelProperty(value="起点机场(航线起点)",example="CAN")
|
||||
private String startAirport;
|
||||
|
||||
@ApiModelProperty(value="开始日期",example="2012-04-01 00:00:00")
|
||||
private Date startDate;
|
||||
|
||||
@ApiModelProperty(value="二级承运航空公司ID",example="")
|
||||
private BigDecimal subAirlineId;
|
||||
|
||||
public FimsFlightschdSeasonDto() {
|
||||
}
|
||||
|
||||
public long getSeasonflightId() {
|
||||
return this.seasonflightId;
|
||||
}
|
||||
|
||||
public void setSeasonflightId(long seasonflightId) {
|
||||
this.seasonflightId = seasonflightId;
|
||||
}
|
||||
|
||||
public String getAircraftTypeCode() {
|
||||
return this.aircraftTypeCode;
|
||||
}
|
||||
|
||||
public void setAircraftTypeCode(String aircraftTypeCode) {
|
||||
this.aircraftTypeCode = aircraftTypeCode;
|
||||
}
|
||||
|
||||
public BigDecimal getAirlineId() {
|
||||
return this.airlineId;
|
||||
}
|
||||
|
||||
public void setAirlineId(BigDecimal airlineId) {
|
||||
this.airlineId = airlineId;
|
||||
}
|
||||
|
||||
public String getArriOrDept() {
|
||||
return this.arriOrDept;
|
||||
}
|
||||
|
||||
public void setArriOrDept(String arriOrDept) {
|
||||
this.arriOrDept = arriOrDept;
|
||||
}
|
||||
|
||||
public String getArrivalTime() {
|
||||
return this.arrivalTime;
|
||||
}
|
||||
|
||||
public void setArrivalTime(String arrivalTime) {
|
||||
this.arrivalTime = arrivalTime;
|
||||
}
|
||||
|
||||
public String getDepartureTime() {
|
||||
return this.departureTime;
|
||||
}
|
||||
|
||||
public void setDepartureTime(String departureTime) {
|
||||
this.departureTime = departureTime;
|
||||
}
|
||||
|
||||
public String getEndAirport() {
|
||||
return this.endAirport;
|
||||
}
|
||||
|
||||
public void setEndAirport(String endAirport) {
|
||||
this.endAirport = endAirport;
|
||||
}
|
||||
|
||||
public Date getEndDate() {
|
||||
return this.endDate;
|
||||
}
|
||||
|
||||
public void setEndDate(Date endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public String getFlightNumber() {
|
||||
return this.flightNumber;
|
||||
}
|
||||
|
||||
public void setFlightNumber(String flightNumber) {
|
||||
this.flightNumber = flightNumber;
|
||||
}
|
||||
|
||||
public String getFlightTask() {
|
||||
return this.flightTask;
|
||||
}
|
||||
|
||||
public void setFlightTask(String flightTask) {
|
||||
this.flightTask = flightTask;
|
||||
}
|
||||
|
||||
public String getFlightTypeCode() {
|
||||
return this.flightTypeCode;
|
||||
}
|
||||
|
||||
public void setFlightTypeCode(String flightTypeCode) {
|
||||
this.flightTypeCode = flightTypeCode;
|
||||
}
|
||||
|
||||
public BigDecimal getFlyingDistance() {
|
||||
return this.flyingDistance;
|
||||
}
|
||||
|
||||
public void setFlyingDistance(BigDecimal flyingDistance) {
|
||||
this.flyingDistance = flyingDistance;
|
||||
}
|
||||
|
||||
public BigDecimal getFlyingTime() {
|
||||
return this.flyingTime;
|
||||
}
|
||||
|
||||
public void setFlyingTime(BigDecimal flyingTime) {
|
||||
this.flyingTime = flyingTime;
|
||||
}
|
||||
|
||||
public String getInternationalCode() {
|
||||
return this.internationalCode;
|
||||
}
|
||||
|
||||
public void setInternationalCode(String internationalCode) {
|
||||
this.internationalCode = internationalCode;
|
||||
}
|
||||
|
||||
public String getOperationDays() {
|
||||
return this.operationDays;
|
||||
}
|
||||
|
||||
public void setOperationDays(String operationDays) {
|
||||
this.operationDays = operationDays;
|
||||
}
|
||||
|
||||
public String getRemarks() {
|
||||
return this.remarks;
|
||||
}
|
||||
|
||||
public void setRemarks(String remarks) {
|
||||
this.remarks = remarks;
|
||||
}
|
||||
|
||||
public String getRouteType() {
|
||||
return this.routeType;
|
||||
}
|
||||
|
||||
public void setRouteType(String routeType) {
|
||||
this.routeType = routeType;
|
||||
}
|
||||
|
||||
public String getSeasonName() {
|
||||
return this.seasonName;
|
||||
}
|
||||
|
||||
public void setSeasonName(String seasonName) {
|
||||
this.seasonName = seasonName;
|
||||
}
|
||||
|
||||
public BigDecimal getSeasonRecId() {
|
||||
return this.seasonRecId;
|
||||
}
|
||||
|
||||
public void setSeasonRecId(BigDecimal seasonRecId) {
|
||||
this.seasonRecId = seasonRecId;
|
||||
}
|
||||
|
||||
public String getStartAirport() {
|
||||
return this.startAirport;
|
||||
}
|
||||
|
||||
public void setStartAirport(String startAirport) {
|
||||
this.startAirport = startAirport;
|
||||
}
|
||||
|
||||
public Date getStartDate() {
|
||||
return this.startDate;
|
||||
}
|
||||
|
||||
public void setStartDate(Date startDate) {
|
||||
this.startDate = startDate;
|
||||
}
|
||||
|
||||
public BigDecimal getSubAirlineId() {
|
||||
return this.subAirlineId;
|
||||
}
|
||||
|
||||
public void setSubAirlineId(BigDecimal subAirlineId) {
|
||||
this.subAirlineId = subAirlineId;
|
||||
}
|
||||
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package com.gzzn.omms.adminapi.dto.basicdata.convert;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import com.gzzn.omms.adminapi.domain.secondary.entity.schedule.FimsFlightschdSeason;
|
||||
import com.gzzn.omms.adminapi.dto.basicdata.FimsFlightschdSeasonDto;
|
||||
|
||||
@Mapper(componentModel="spring")
|
||||
public interface FimsFlightschdSeasonConvert {
|
||||
|
||||
public FimsFlightschdSeasonDto fimsFlightschdSeasonToFimsFlightschdSeasonDto(FimsFlightschdSeason fimsFlightschdSeason);
|
||||
}
|
||||
Reference in New Issue
Block a user