增加飞机 实体类,DAO , controller 接口实现
This commit is contained in:
@@ -0,0 +1,34 @@
|
|||||||
|
package com.gzzn.omms.adminapi.controller.basicdata;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
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.SysAircraftDao;
|
||||||
|
import com.gzzn.omms.adminapi.domain.secondary.entity.baiscdata.SysAircraft;
|
||||||
|
import com.gzzn.omms.adminapi.dto.ResponseDto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 飞机
|
||||||
|
* @author nyr
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
public class SysAircraftController {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 飞机接口
|
||||||
|
*/
|
||||||
|
@Autowired
|
||||||
|
private SysAircraftDao sysAircraftDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取所有飞机数据
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping(value="/basicdata/sysAircrafts")
|
||||||
|
public ResponseDto getSysAircraft() {
|
||||||
|
List<SysAircraft> sysAircraftList = (List<SysAircraft>) sysAircraftDao.findAll();
|
||||||
|
return ResponseDto.success(sysAircraftList);
|
||||||
|
}
|
||||||
|
}
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
package com.gzzn.omms.adminapi.domain.secondary.dao.basicdata;
|
||||||
|
|
||||||
|
import org.springframework.data.repository.CrudRepository;
|
||||||
|
import com.gzzn.omms.adminapi.domain.secondary.entity.baiscdata.SysAircraft;
|
||||||
|
|
||||||
|
public interface SysAircraftDao extends CrudRepository<SysAircraft, String> {
|
||||||
|
|
||||||
|
}
|
||||||
+147
@@ -0,0 +1,147 @@
|
|||||||
|
package com.gzzn.omms.adminapi.domain.secondary.entity.baiscdata;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.NamedQuery;
|
||||||
|
import javax.persistence.SequenceGenerator;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 飞机
|
||||||
|
* @author nyr
|
||||||
|
*/
|
||||||
|
@Entity
|
||||||
|
@Table(name="SYS_AIRCRAFT")
|
||||||
|
@NamedQuery(name="SysAircraft.findAll", query="SELECT s FROM SysAircraft s")
|
||||||
|
public class SysAircraft {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@SequenceGenerator(name="SYS_AIRCRAFT_AIRCRAFTID_GENERATOR", sequenceName="SYS_AIRCRAFT")
|
||||||
|
@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="SYS_AIRCRAFT_AIRCRAFTID_GENERATOR")
|
||||||
|
@Column(name="AIRCRAFT_ID")
|
||||||
|
private long aircraftId; //飞机号表记录ID
|
||||||
|
|
||||||
|
@Column(name="AIRCRAFT_NUMBER")
|
||||||
|
private String aircraftNumber; //飞机号(飞机机尾号)
|
||||||
|
|
||||||
|
@Column(name="AIRCRAFT_OWNER_CODE")
|
||||||
|
private String aircraftOwnerCode; //机主航空公司代码
|
||||||
|
|
||||||
|
@Column(name="AIRCRAFT_TYPE_CODE")
|
||||||
|
private String aircraftTypeCode; //机型代码
|
||||||
|
|
||||||
|
@Column(name="AIRLINE_CODE")
|
||||||
|
private String airlineCode; //航空公司代码
|
||||||
|
|
||||||
|
@Column(name="MAX_AIRBRIDGES")
|
||||||
|
private BigDecimal maxAirbridges; //最大乘客数
|
||||||
|
|
||||||
|
@Column(name="MAX_FREIGHT_WEIGHT")
|
||||||
|
private BigDecimal maxFreightWeight; //最大货物重量
|
||||||
|
|
||||||
|
@Column(name="MAX_PASSENGERS")
|
||||||
|
private BigDecimal maxPassengers; //飞机使用廊桥的最大数目
|
||||||
|
|
||||||
|
@Column(name="MAX_TAKEOFF_WEIGHT")
|
||||||
|
private BigDecimal maxTakeoffWeight; //最大起飞重量
|
||||||
|
|
||||||
|
private BigDecimal operate; //操作标识 1-使用 0-删除标识
|
||||||
|
|
||||||
|
private BigDecimal owid; //所属机构ID
|
||||||
|
|
||||||
|
public SysAircraft() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getAircraftId() {
|
||||||
|
return this.aircraftId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAircraftId(long aircraftId) {
|
||||||
|
this.aircraftId = aircraftId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAircraftNumber() {
|
||||||
|
return this.aircraftNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAircraftNumber(String aircraftNumber) {
|
||||||
|
this.aircraftNumber = aircraftNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAircraftOwnerCode() {
|
||||||
|
return this.aircraftOwnerCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAircraftOwnerCode(String aircraftOwnerCode) {
|
||||||
|
this.aircraftOwnerCode = aircraftOwnerCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAircraftTypeCode() {
|
||||||
|
return this.aircraftTypeCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAircraftTypeCode(String aircraftTypeCode) {
|
||||||
|
this.aircraftTypeCode = aircraftTypeCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAirlineCode() {
|
||||||
|
return this.airlineCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAirlineCode(String airlineCode) {
|
||||||
|
this.airlineCode = airlineCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getMaxAirbridges() {
|
||||||
|
return this.maxAirbridges;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMaxAirbridges(BigDecimal maxAirbridges) {
|
||||||
|
this.maxAirbridges = maxAirbridges;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getMaxFreightWeight() {
|
||||||
|
return this.maxFreightWeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMaxFreightWeight(BigDecimal maxFreightWeight) {
|
||||||
|
this.maxFreightWeight = maxFreightWeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getMaxPassengers() {
|
||||||
|
return this.maxPassengers;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMaxPassengers(BigDecimal maxPassengers) {
|
||||||
|
this.maxPassengers = maxPassengers;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getMaxTakeoffWeight() {
|
||||||
|
return this.maxTakeoffWeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMaxTakeoffWeight(BigDecimal maxTakeoffWeight) {
|
||||||
|
this.maxTakeoffWeight = maxTakeoffWeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getOperate() {
|
||||||
|
return this.operate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOperate(BigDecimal operate) {
|
||||||
|
this.operate = operate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getOwid() {
|
||||||
|
return this.owid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOwid(BigDecimal owid) {
|
||||||
|
this.owid = owid;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user