新增航班状态接口实现及描述
This commit is contained in:
+48
@@ -0,0 +1,48 @@
|
||||
package com.gzzn.omms.adminapi.controller.basicdata;
|
||||
|
||||
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.SysFlightStatusDao;
|
||||
import com.gzzn.omms.adminapi.domain.secondary.entity.baiscdata.SysFlightStatus;
|
||||
import com.gzzn.omms.adminapi.dto.ResponseDto;
|
||||
import com.gzzn.omms.adminapi.dto.basicdata.SysFlightStatusDto;
|
||||
import com.gzzn.omms.adminapi.dto.basicdata.convert.SysFlightStatusConvert;
|
||||
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* 航班外部状态代码
|
||||
* @author Administrator
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
public class SysFlightStatusController {
|
||||
|
||||
@Autowired
|
||||
private SysFlightStatusConvert sysFlightStatusConvert;
|
||||
|
||||
@Autowired
|
||||
private SysFlightStatusDao sysFlightStatusDao;
|
||||
|
||||
/**
|
||||
* 获取所有航班外部状态代码
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value="获取航班外部状态代码列表",tags="基础数据")
|
||||
@GetMapping(value="/basicdata/sysFlightStatus")
|
||||
public ResponseDto<List<SysFlightStatusDto>> getSysFlightStatus() {
|
||||
List<SysFlightStatus> sysFlightStatus = (List<SysFlightStatus>) sysFlightStatusDao.findAll();
|
||||
|
||||
//转换dto
|
||||
List<SysFlightStatusDto> dtoList = sysFlightStatus.stream().map(
|
||||
x -> sysFlightStatusConvert.SysFlightStatusToSysFlightStatusDto(x)
|
||||
).collect(Collectors.toList());
|
||||
|
||||
return ResponseDto.success(dtoList);
|
||||
}
|
||||
}
|
||||
@@ -58,6 +58,11 @@ public class UISettingsController {
|
||||
@RequestParam(required=false) String groupCode)
|
||||
{
|
||||
String uid = iUserService.getCurrentUserId();
|
||||
System.out.println(uid);
|
||||
|
||||
String uname= iUserService.getCurrentUserName();
|
||||
System.out.println(uname);
|
||||
|
||||
List<Uisettings> uisettingsList = new ArrayList<Uisettings>();
|
||||
if (envCode!=null && envCode!="") {
|
||||
//envCode条件
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package com.gzzn.omms.adminapi.domain.secondary.dao.basicdata;
|
||||
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
|
||||
import com.gzzn.omms.adminapi.domain.secondary.entity.baiscdata.SysFlightStatus;
|
||||
|
||||
public interface SysFlightStatusDao extends CrudRepository<SysFlightStatus, String> {
|
||||
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.gzzn.omms.adminapi.domain.secondary.entity.baiscdata;
|
||||
|
||||
import java.io.Serializable;
|
||||
import javax.persistence.*;
|
||||
|
||||
|
||||
/**
|
||||
* The persistent class for the SYS_FLIGHT_STATUS database table.
|
||||
* 航班外部状态代码表
|
||||
*/
|
||||
@Entity
|
||||
@Table(name="SYS_FLIGHT_STATUS")
|
||||
@NamedQuery(name="SysFlightStatus.findAll", query="SELECT s FROM SysFlightStatus s")
|
||||
public class SysFlightStatus implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
private String sttc;//航班状态代码
|
||||
|
||||
private String abns;//航班状态描述
|
||||
|
||||
private String stdc;//航班状态中文描述
|
||||
|
||||
private String sttd;//这个状态是否为异常状态 Y-是一个异常状态 N-不是一个异常状态
|
||||
|
||||
public SysFlightStatus() {
|
||||
}
|
||||
|
||||
public String getSttc() {
|
||||
return this.sttc;
|
||||
}
|
||||
|
||||
public void setSttc(String sttc) {
|
||||
this.sttc = sttc;
|
||||
}
|
||||
|
||||
public String getAbns() {
|
||||
return this.abns;
|
||||
}
|
||||
|
||||
public void setAbns(String abns) {
|
||||
this.abns = abns;
|
||||
}
|
||||
|
||||
public String getStdc() {
|
||||
return this.stdc;
|
||||
}
|
||||
|
||||
public void setStdc(String stdc) {
|
||||
this.stdc = stdc;
|
||||
}
|
||||
|
||||
public String getSttd() {
|
||||
return this.sttd;
|
||||
}
|
||||
|
||||
public void setSttd(String sttd) {
|
||||
this.sttd = sttd;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.gzzn.omms.adminapi.dto.basicdata;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* 航班外部状态代码Dto
|
||||
*/
|
||||
@ApiModel(value="航班外部状态代码Dto",description="航班外部状态代码基础数据")
|
||||
public class SysFlightStatusDto implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value="航班状态代码",example="EARR")
|
||||
private String sttc;//
|
||||
|
||||
@ApiModelProperty(value="航班状态描述",example="Estimated Arrive")
|
||||
private String abns;//
|
||||
|
||||
@ApiModelProperty(value="航班状态中文描述",example="预计到达")
|
||||
private String stdc;//
|
||||
|
||||
@ApiModelProperty(value="是否异常状态",example="N")
|
||||
private String sttd;//这个状态是否为异常状态 Y-是一个异常状态 N-不是一个异常状态
|
||||
|
||||
public SysFlightStatusDto() {
|
||||
}
|
||||
|
||||
public String getSttc() {
|
||||
return this.sttc;
|
||||
}
|
||||
|
||||
public void setSttc(String sttc) {
|
||||
this.sttc = sttc;
|
||||
}
|
||||
|
||||
public String getAbns() {
|
||||
return this.abns;
|
||||
}
|
||||
|
||||
public void setAbns(String abns) {
|
||||
this.abns = abns;
|
||||
}
|
||||
|
||||
public String getStdc() {
|
||||
return this.stdc;
|
||||
}
|
||||
|
||||
public void setStdc(String stdc) {
|
||||
this.stdc = stdc;
|
||||
}
|
||||
|
||||
public String getSttd() {
|
||||
return this.sttd;
|
||||
}
|
||||
|
||||
public void setSttd(String sttd) {
|
||||
this.sttd = sttd;
|
||||
}
|
||||
|
||||
}
|
||||
+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.SysFlightStatus;
|
||||
import com.gzzn.omms.adminapi.dto.basicdata.SysFlightStatusDto;
|
||||
|
||||
@Mapper(componentModel="spring")
|
||||
public interface SysFlightStatusConvert {
|
||||
public SysFlightStatus SysFlightStatusDtoToSysFlightStatus(SysFlightStatusDto SysFlightStatusDto);
|
||||
public SysFlightStatusDto SysFlightStatusToSysFlightStatusDto(SysFlightStatus SysFlightStatusDto);
|
||||
}
|
||||
Reference in New Issue
Block a user