新增机位Dto、Convert接口实现

This commit is contained in:
714943302@qq.com
2018-10-30 17:55:51 +08:00
parent d20e95a05c
commit 647f42aabf
3 changed files with 299 additions and 3 deletions
@@ -1,6 +1,9 @@
package com.gzzn.omms.adminapi.controller.basicdata;
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;
@@ -9,6 +12,8 @@ import org.springframework.web.bind.annotation.RestController;
import com.gzzn.omms.adminapi.domain.secondary.dao.basicdata.OrmsStandDao;
import com.gzzn.omms.adminapi.domain.secondary.entity.baiscdata.OrmsStand;
import com.gzzn.omms.adminapi.dto.ResponseDto;
import com.gzzn.omms.adminapi.dto.basicdata.OrmsStandDto;
import com.gzzn.omms.adminapi.dto.basicdata.convert.OrmsStandConvert;
/**
* 机位
@@ -23,14 +28,26 @@ public class OrmsStandController {
*/
@Autowired
private OrmsStandDao ormsStandDao;
/**
* 机位Dto接口
*/
@Autowired
private OrmsStandConvert ormsStandConvert;
/**
* 获取所有机位数据
* @return
*/
@ApiOperation(value="获取机位列表",tags="基础数据")
@GetMapping(value="/basicdata/ormsStands")
public ResponseDto getOrmsStand() {
public ResponseDto<List<OrmsStandDto>> getOrmsStand() {
List<OrmsStand> ormsStandList = (List<OrmsStand>) ormsStandDao.findAll();
return ResponseDto.success(ormsStandList);
//转换dto
List<OrmsStandDto> ormsStandListDto = ormsStandList.stream().map(x -> {
OrmsStandDto dto = ormsStandConvert.ormsStandToOrmsStandDto(x);
return dto;
}).collect(Collectors.toList());
return ResponseDto.success(ormsStandListDto);
}
}
@@ -0,0 +1,267 @@
package com.gzzn.omms.adminapi.dto.basicdata;
import java.math.BigDecimal;
public class OrmsStandDto {
private String standCode; //停机位号
private BigDecimal currentFlightId; //当前航班ID
private String ddgt; //该机位默认的国内登机门
private String digt; //该机位默认的国际登机门
private String fstandCode; //父停机位号
private BigDecimal iconLength; //资源图标长度(单位:像素)
private BigDecimal iconWidth; //资源图标宽度(单位:像素)
private String lstandCode;
private BigDecimal maxPermit; //该停机位可容纳的最大旅客数/最大翼展
private BigDecimal maxflightnum; //最大可停靠航班数
private BigDecimal operate;
private String pierCode; //指廊代码
private BigDecimal posX; //坐标位置的X值
private BigDecimal posY; //坐标位置的Y值
private String rstandCode;
private String satc; //该停机位可以停放的最大机型种类
private String standAreaCode; //停机位区域代码
private BigDecimal standLayouted; //资源已布局标志:1-已布局 0-未布局
private BigDecimal standLength; //停机位长度(单位:米)
private String standName; //停机位名称
private BigDecimal standOrder; //停机位顺序号
private BigDecimal standStatus; //停机位状态(0-可用、1-在用、2-锁定、3-禁用、4-预分...)
//停机位类别可取值:bridge-靠桥机位、remote-远机位、near-近机位、night-过夜机位、specific-专机位...
private String standType;
private BigDecimal standWidth; //停机位宽度
private String stml; //航站楼代码
private String terminalAreaCode; //航站楼区域代码
public String getStandCode() {
return this.standCode;
}
public void setStandCode(String standCode) {
this.standCode = standCode;
}
public BigDecimal getCurrentFlightId() {
return this.currentFlightId;
}
public void setCurrentFlightId(BigDecimal currentFlightId) {
this.currentFlightId = currentFlightId;
}
public String getDdgt() {
return this.ddgt;
}
public void setDdgt(String ddgt) {
this.ddgt = ddgt;
}
public String getDigt() {
return this.digt;
}
public void setDigt(String digt) {
this.digt = digt;
}
public String getFstandCode() {
return this.fstandCode;
}
public void setFstandCode(String fstandCode) {
this.fstandCode = fstandCode;
}
public BigDecimal getIconLength() {
return this.iconLength;
}
public void setIconLength(BigDecimal iconLength) {
this.iconLength = iconLength;
}
public BigDecimal getIconWidth() {
return this.iconWidth;
}
public void setIconWidth(BigDecimal iconWidth) {
this.iconWidth = iconWidth;
}
public String getLstandCode() {
return this.lstandCode;
}
public void setLstandCode(String lstandCode) {
this.lstandCode = lstandCode;
}
public BigDecimal getMaxPermit() {
return this.maxPermit;
}
public void setMaxPermit(BigDecimal maxPermit) {
this.maxPermit = maxPermit;
}
public BigDecimal getMaxflightnum() {
return this.maxflightnum;
}
public void setMaxflightnum(BigDecimal maxflightnum) {
this.maxflightnum = maxflightnum;
}
public BigDecimal getOperate() {
return this.operate;
}
public void setOperate(BigDecimal operate) {
this.operate = operate;
}
public String getPierCode() {
return this.pierCode;
}
public void setPierCode(String pierCode) {
this.pierCode = pierCode;
}
public BigDecimal getPosX() {
return this.posX;
}
public void setPosX(BigDecimal posX) {
this.posX = posX;
}
public BigDecimal getPosY() {
return this.posY;
}
public void setPosY(BigDecimal posY) {
this.posY = posY;
}
public String getRstandCode() {
return this.rstandCode;
}
public void setRstandCode(String rstandCode) {
this.rstandCode = rstandCode;
}
public String getSatc() {
return this.satc;
}
public void setSatc(String satc) {
this.satc = satc;
}
public String getStandAreaCode() {
return this.standAreaCode;
}
public void setStandAreaCode(String standAreaCode) {
this.standAreaCode = standAreaCode;
}
public BigDecimal getStandLayouted() {
return this.standLayouted;
}
public void setStandLayouted(BigDecimal standLayouted) {
this.standLayouted = standLayouted;
}
public BigDecimal getStandLength() {
return this.standLength;
}
public void setStandLength(BigDecimal standLength) {
this.standLength = standLength;
}
public String getStandName() {
return this.standName;
}
public void setStandName(String standName) {
this.standName = standName;
}
public BigDecimal getStandOrder() {
return this.standOrder;
}
public void setStandOrder(BigDecimal standOrder) {
this.standOrder = standOrder;
}
public BigDecimal getStandStatus() {
return this.standStatus;
}
public void setStandStatus(BigDecimal standStatus) {
this.standStatus = standStatus;
}
public String getStandType() {
return this.standType;
}
public void setStandType(String standType) {
this.standType = standType;
}
public BigDecimal getStandWidth() {
return this.standWidth;
}
public void setStandWidth(BigDecimal standWidth) {
this.standWidth = standWidth;
}
public String getStml() {
return this.stml;
}
public void setStml(String stml) {
this.stml = stml;
}
public String getTerminalAreaCode() {
return this.terminalAreaCode;
}
public void setTerminalAreaCode(String terminalAreaCode) {
this.terminalAreaCode = terminalAreaCode;
}
}
@@ -0,0 +1,12 @@
package com.gzzn.omms.adminapi.dto.basicdata.convert;
import org.mapstruct.Mapper;
import com.gzzn.omms.adminapi.domain.secondary.entity.baiscdata.OrmsStand;
import com.gzzn.omms.adminapi.dto.basicdata.OrmsStandDto;
@Mapper(componentModel="spring")
public interface OrmsStandConvert {
public OrmsStandDto ormsStandToOrmsStandDto(OrmsStand ormsStand);
}