新增行李传送带Dto、Convert接口实现
This commit is contained in:
@@ -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.OrmsChutDao;
|
||||
import com.gzzn.omms.adminapi.domain.secondary.entity.baiscdata.OrmsChut;
|
||||
import com.gzzn.omms.adminapi.dto.ResponseDto;
|
||||
import com.gzzn.omms.adminapi.dto.basicdata.OrmsChutDto;
|
||||
import com.gzzn.omms.adminapi.dto.basicdata.convert.OrmsChutConvert;
|
||||
|
||||
/**
|
||||
* 行李传送带
|
||||
@@ -22,14 +27,26 @@ public class OrmsChutController {
|
||||
*/
|
||||
@Autowired
|
||||
private OrmsChutDao ormsChutDao;
|
||||
|
||||
/**
|
||||
* 行李传送带Dto接口
|
||||
*/
|
||||
@Autowired
|
||||
private OrmsChutConvert ormsChutConvert;
|
||||
/**
|
||||
* 获取所有行李传送带数据
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value="获取行李传送带列表",tags="基础数据")
|
||||
@GetMapping(value="/basicdata/ormsChuts")
|
||||
public ResponseDto getOrmsChut() {
|
||||
public ResponseDto<List<OrmsChutDto>> getOrmsChut() {
|
||||
List<OrmsChut> ormsChutList = (List<OrmsChut>) ormsChutDao.findAll();
|
||||
return ResponseDto.success(ormsChutList);
|
||||
|
||||
//转换dto
|
||||
List<OrmsChutDto> ormsChutListDto = ormsChutList.stream().map(x -> {
|
||||
OrmsChutDto dto = ormsChutConvert.ormsChutToOrmsChutDto(x);
|
||||
return dto;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
return ResponseDto.success(ormsChutListDto);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.gzzn.omms.adminapi.dto.basicdata;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class OrmsChutDto {
|
||||
|
||||
private String chutCode; //传送转盘code
|
||||
|
||||
private String bcat; //传送转盘种类
|
||||
|
||||
private String btml; //航站楼代码
|
||||
|
||||
private BigDecimal chutLength; //传送转盘高度
|
||||
|
||||
private String chutName; //传送转盘name
|
||||
|
||||
private String chutStatus; //E-可用/D-不可用
|
||||
|
||||
private BigDecimal operate; //操作标识 1-使用 0-删除标识
|
||||
|
||||
public String getChutCode() {
|
||||
return this.chutCode;
|
||||
}
|
||||
|
||||
public void setChutCode(String chutCode) {
|
||||
this.chutCode = chutCode;
|
||||
}
|
||||
|
||||
public String getBcat() {
|
||||
return this.bcat;
|
||||
}
|
||||
|
||||
public void setBcat(String bcat) {
|
||||
this.bcat = bcat;
|
||||
}
|
||||
|
||||
public String getBtml() {
|
||||
return this.btml;
|
||||
}
|
||||
|
||||
public void setBtml(String btml) {
|
||||
this.btml = btml;
|
||||
}
|
||||
|
||||
public BigDecimal getChutLength() {
|
||||
return this.chutLength;
|
||||
}
|
||||
|
||||
public void setChutLength(BigDecimal chutLength) {
|
||||
this.chutLength = chutLength;
|
||||
}
|
||||
|
||||
public String getChutName() {
|
||||
return this.chutName;
|
||||
}
|
||||
|
||||
public void setChutName(String chutName) {
|
||||
this.chutName = chutName;
|
||||
}
|
||||
|
||||
public String getChutStatus() {
|
||||
return this.chutStatus;
|
||||
}
|
||||
|
||||
public void setChutStatus(String chutStatus) {
|
||||
this.chutStatus = chutStatus;
|
||||
}
|
||||
|
||||
public BigDecimal getOperate() {
|
||||
return this.operate;
|
||||
}
|
||||
|
||||
public void setOperate(BigDecimal operate) {
|
||||
this.operate = operate;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.gzzn.omms.adminapi.dto.basicdata.convert;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import com.gzzn.omms.adminapi.domain.secondary.entity.baiscdata.OrmsChut;
|
||||
import com.gzzn.omms.adminapi.dto.basicdata.OrmsChutDto;
|
||||
|
||||
@Mapper(componentModel="spring")
|
||||
public interface OrmsChutConvert {
|
||||
|
||||
public OrmsChutDto ormsChutToOrmsChutDto(OrmsChut ormsChut);
|
||||
}
|
||||
Reference in New Issue
Block a user