新增值机柜台Dto、Convert接口实现
This commit is contained in:
+20
-3
@@ -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.OrmsCheckindeskDao;
|
||||
import com.gzzn.omms.adminapi.domain.secondary.entity.baiscdata.OrmsCheckindesk;
|
||||
import com.gzzn.omms.adminapi.dto.ResponseDto;
|
||||
import com.gzzn.omms.adminapi.dto.basicdata.OrmsCheckindestDto;
|
||||
import com.gzzn.omms.adminapi.dto.basicdata.convert.OrmsCheckindestConvert;
|
||||
|
||||
/**
|
||||
* 值机柜台
|
||||
@@ -22,14 +27,26 @@ public class OrmsCheckindeskController {
|
||||
*/
|
||||
@Autowired
|
||||
private OrmsCheckindeskDao ormsCheckindeskDao;
|
||||
|
||||
/**
|
||||
* 值机柜台Dto接口
|
||||
*/
|
||||
@Autowired
|
||||
private OrmsCheckindestConvert OrmsCheckindeskConvert;
|
||||
/**
|
||||
* 获取所有值机柜台数据
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value="获取值机柜台列表",tags="基础数据")
|
||||
@GetMapping(value="/basicdata/ormsCheckindesks")
|
||||
public ResponseDto getOrmsCheckindesk() {
|
||||
public ResponseDto<List<OrmsCheckindestDto>> getOrmsCheckindesk() {
|
||||
List<OrmsCheckindesk> ormsCheckindeskList = (List<OrmsCheckindesk>) ormsCheckindeskDao.findAll();
|
||||
return ResponseDto.success(ormsCheckindeskList);
|
||||
|
||||
//转换dto
|
||||
List<OrmsCheckindestDto> ormsCheckindeskListDto = ormsCheckindeskList.stream().map(x -> {
|
||||
OrmsCheckindestDto dto = OrmsCheckindeskConvert.ormsCheckindeskToOrmsCheckindestDto(x);
|
||||
return dto;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
return ResponseDto.success(ormsCheckindeskListDto);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
package com.gzzn.omms.adminapi.dto.basicdata;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class OrmsCheckindestDto {
|
||||
|
||||
private String checkindeskCode; //值机柜台代码
|
||||
|
||||
private String ccat; //值机柜台种类
|
||||
|
||||
private String checkinGroupCode; //值机岛代码
|
||||
|
||||
private String checkindeskName; //值机柜台名称
|
||||
|
||||
private String checkindeskStatus; //E-可用/D-不可用
|
||||
|
||||
private String chutCode; //传送转盘code
|
||||
|
||||
private String ctra; //是否中转值机柜台
|
||||
|
||||
private String nextcheckindeskCode;
|
||||
|
||||
private BigDecimal operate; //操作标识:1-使用、0-删除标识
|
||||
|
||||
private String terminalAreaCode; //航站楼区域代码
|
||||
|
||||
public String getCheckindeskCode() {
|
||||
return this.checkindeskCode;
|
||||
}
|
||||
|
||||
public void setCheckindeskCode(String checkindeskCode) {
|
||||
this.checkindeskCode = checkindeskCode;
|
||||
}
|
||||
|
||||
public String getCcat() {
|
||||
return this.ccat;
|
||||
}
|
||||
|
||||
public void setCcat(String ccat) {
|
||||
this.ccat = ccat;
|
||||
}
|
||||
|
||||
public String getCheckinGroupCode() {
|
||||
return this.checkinGroupCode;
|
||||
}
|
||||
|
||||
public void setCheckinGroupCode(String checkinGroupCode) {
|
||||
this.checkinGroupCode = checkinGroupCode;
|
||||
}
|
||||
|
||||
public String getCheckindeskName() {
|
||||
return this.checkindeskName;
|
||||
}
|
||||
|
||||
public void setCheckindeskName(String checkindeskName) {
|
||||
this.checkindeskName = checkindeskName;
|
||||
}
|
||||
|
||||
public String getCheckindeskStatus() {
|
||||
return this.checkindeskStatus;
|
||||
}
|
||||
|
||||
public void setCheckindeskStatus(String checkindeskStatus) {
|
||||
this.checkindeskStatus = checkindeskStatus;
|
||||
}
|
||||
|
||||
public String getChutCode() {
|
||||
return this.chutCode;
|
||||
}
|
||||
|
||||
public void setChutCode(String chutCode) {
|
||||
this.chutCode = chutCode;
|
||||
}
|
||||
|
||||
public String getCtra() {
|
||||
return this.ctra;
|
||||
}
|
||||
|
||||
public void setCtra(String ctra) {
|
||||
this.ctra = ctra;
|
||||
}
|
||||
|
||||
public String getNextcheckindeskCode() {
|
||||
return this.nextcheckindeskCode;
|
||||
}
|
||||
|
||||
public void setNextcheckindeskCode(String nextcheckindeskCode) {
|
||||
this.nextcheckindeskCode = nextcheckindeskCode;
|
||||
}
|
||||
|
||||
public BigDecimal getOperate() {
|
||||
return this.operate;
|
||||
}
|
||||
|
||||
public void setOperate(BigDecimal operate) {
|
||||
this.operate = operate;
|
||||
}
|
||||
|
||||
public String getTerminalAreaCode() {
|
||||
return this.terminalAreaCode;
|
||||
}
|
||||
|
||||
public void setTerminalAreaCode(String terminalAreaCode) {
|
||||
this.terminalAreaCode = terminalAreaCode;
|
||||
}
|
||||
}
|
||||
+12
@@ -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.OrmsCheckindesk;
|
||||
import com.gzzn.omms.adminapi.dto.basicdata.OrmsCheckindestDto;
|
||||
|
||||
@Mapper(componentModel="spring")
|
||||
public interface OrmsCheckindestConvert {
|
||||
|
||||
public OrmsCheckindestDto ormsCheckindeskToOrmsCheckindestDto(OrmsCheckindesk ormsCheckindesk);
|
||||
}
|
||||
Reference in New Issue
Block a user