新增登机门Dto、Convert接口实现
This commit is contained in:
@@ -1,12 +1,19 @@
|
||||
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;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.gzzn.omms.adminapi.domain.secondary.dao.basicdata.OrmsGateDao;
|
||||
import com.gzzn.omms.adminapi.domain.secondary.entity.baiscdata.OrmsGate;
|
||||
import com.gzzn.omms.adminapi.dto.ResponseDto;
|
||||
import com.gzzn.omms.adminapi.dto.basicdata.OrmsGateDto;
|
||||
import com.gzzn.omms.adminapi.dto.basicdata.convert.OrmsGateConvert;
|
||||
|
||||
/**
|
||||
* 登机门
|
||||
@@ -20,14 +27,26 @@ public class OrmsGateController {
|
||||
*/
|
||||
@Autowired
|
||||
private OrmsGateDao ormsGateDao;
|
||||
|
||||
/**
|
||||
* 登机门Dto接口
|
||||
*/
|
||||
@Autowired
|
||||
private OrmsGateConvert ormsGateConvert;
|
||||
/**
|
||||
* 获取所有登机门数据
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value="获取登机门列表",tags="基础数据")
|
||||
@GetMapping(value="/basicdata/ormsGates")
|
||||
public ResponseDto getOrmsGate() {
|
||||
public ResponseDto<List<OrmsGateDto>> getOrmsGate() {
|
||||
List<OrmsGate> ormsGatelist = (List<OrmsGate>) ormsGateDao.findAll();
|
||||
return ResponseDto.success(ormsGatelist);
|
||||
|
||||
//转换dto
|
||||
List<OrmsGateDto> ormsGateListDto = ormsGatelist.stream().map(x -> {
|
||||
OrmsGateDto dto = ormsGateConvert.ormsChutToOrmsChutDto(x);
|
||||
return dto;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
return ResponseDto.success(ormsGateListDto);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,156 @@
|
||||
package com.gzzn.omms.adminapi.dto.basicdata;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class OrmsGateDto {
|
||||
|
||||
private String gateCode; //登机门代码
|
||||
|
||||
private BigDecimal actionOrder;//资源使用序号
|
||||
|
||||
private String gateCategory;//I = International/国际;D = Domestic/国内
|
||||
|
||||
private String gateName; //登机门名称
|
||||
|
||||
private BigDecimal gateStatus; //登机门状态(可用、在用、锁定、禁用、预分...)
|
||||
|
||||
private String gateType;//'0'-到港门,'1'-离港门,'2'-混合
|
||||
|
||||
private String gtml;//航站楼代码
|
||||
|
||||
private BigDecimal iconLength;//资源图标长度(单位:像素)
|
||||
|
||||
private BigDecimal iconWidth;//资源图标宽度(单位:像素)
|
||||
|
||||
private BigDecimal operate;
|
||||
|
||||
private String pierCode;//指廊代码
|
||||
|
||||
private BigDecimal posX;//坐标位置的X值
|
||||
|
||||
private BigDecimal posY;//坐标位置的Y值
|
||||
|
||||
private BigDecimal standLayouted;//资源已布局标志 1-已布局 0-未布局
|
||||
|
||||
private String terminalAreaCode;//航站楼区域代码
|
||||
|
||||
public String getGateCode() {
|
||||
return this.gateCode;
|
||||
}
|
||||
|
||||
public void setGateCode(String gateCode) {
|
||||
this.gateCode = gateCode;
|
||||
}
|
||||
|
||||
public BigDecimal getActionOrder() {
|
||||
return this.actionOrder;
|
||||
}
|
||||
|
||||
public void setActionOrder(BigDecimal actionOrder) {
|
||||
this.actionOrder = actionOrder;
|
||||
}
|
||||
|
||||
public String getGateCategory() {
|
||||
return this.gateCategory;
|
||||
}
|
||||
|
||||
public void setGateCategory(String gateCategory) {
|
||||
this.gateCategory = gateCategory;
|
||||
}
|
||||
|
||||
public String getGateName() {
|
||||
return this.gateName;
|
||||
}
|
||||
|
||||
public void setGateName(String gateName) {
|
||||
this.gateName = gateName;
|
||||
}
|
||||
|
||||
public BigDecimal getGateStatus() {
|
||||
return this.gateStatus;
|
||||
}
|
||||
|
||||
public void setGateStatus(BigDecimal gateStatus) {
|
||||
this.gateStatus = gateStatus;
|
||||
}
|
||||
|
||||
public String getGateType() {
|
||||
return this.gateType;
|
||||
}
|
||||
|
||||
public void setGateType(String gateType) {
|
||||
this.gateType = gateType;
|
||||
}
|
||||
|
||||
public String getGtml() {
|
||||
return this.gtml;
|
||||
}
|
||||
|
||||
public void setGtml(String gtml) {
|
||||
this.gtml = gtml;
|
||||
}
|
||||
|
||||
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 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 BigDecimal getStandLayouted() {
|
||||
return this.standLayouted;
|
||||
}
|
||||
|
||||
public void setStandLayouted(BigDecimal standLayouted) {
|
||||
this.standLayouted = standLayouted;
|
||||
}
|
||||
|
||||
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.OrmsGate;
|
||||
import com.gzzn.omms.adminapi.dto.basicdata.OrmsGateDto;
|
||||
|
||||
@Mapper(componentModel="spring")
|
||||
public interface OrmsGateConvert {
|
||||
|
||||
public OrmsGateDto ormsChutToOrmsChutDto(OrmsGate ormsGate);
|
||||
}
|
||||
Reference in New Issue
Block a user