whycxzp
2021-04-01 56ea53d43e85be165da7dc27766e240711a09499
更新 设备资源申请接口
1个文件已修改
2个文件已添加
240 ■■■■■ 已修改文件
src/main/java/com/whyc/controller/DeviceResourceApplyController.java 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/pojo/DeviceResourceApply.java 120 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/pojo/ElectricState.java 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/controller/DeviceResourceApplyController.java
New file
@@ -0,0 +1,56 @@
package com.whyc.controller;
import com.whyc.dto.Response;
import com.whyc.pojo.DeviceResourceApply;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
/**
 * 设备资源申请
 */
@RestController
@RequestMapping("deviceResourceApply")
@Api(tags = "设备资源")
public class DeviceResourceApplyController {
    @GetMapping("all")
    @ApiOperation(value = "查询所有设备状态分页-筛选")
    public Response getAllDeviceStatus(){
        return null;
    }
    @GetMapping
    @ApiOperation(value = "查询设备状态-根据设备id")
    public Response getDeviceStatus(@RequestParam Integer deviceId){
        return null;
    }
    @PostMapping
    @ApiOperation(value = "提交申请")
    public Response apply(@RequestBody DeviceResourceApply resourceApply){
        return null;
    }
    @GetMapping("applyPage")
    @ApiOperation(value = "查询申请列表分页-筛选")
    //TODO 封装筛选条件到DTO
    public Response getApplyPage(@RequestParam Integer pageNum,@RequestParam Integer pageSize){
        return null;
    }
    @PutMapping("approve")
    @ApiOperation(value = "审核")
    public Response approve(@RequestBody DeviceResourceApply resourceApply){
        return null;
    }
    @GetMapping("applyInfo")
    @ApiOperation(value = "查询单个申请状态-根据设备id")
    public Response applyInfo(@RequestBody DeviceResourceApply resourceApply){
        return null;
    }
}
src/main/java/com/whyc/pojo/DeviceResourceApply.java
New file
@@ -0,0 +1,120 @@
package com.whyc.pojo;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.ibatis.type.Alias;
import java.util.Date;
/**
 * 设备资源申请
 */
@Alias("DeviceResourceApply")
@TableName(schema = "db_experiment",value = "tb_device_resource_apply")
@ApiModel
public class DeviceResourceApply {
    @ApiModelProperty("代理主键")
    private Integer  id   ;
    @ApiModelProperty("设备id")
    private Integer  deviceId ;
    @ApiModelProperty("申请资源接入线路")
    private String   accessLine    ;
    @ApiModelProperty("申请资源分配电压")
    private Integer  assignedVol   ;
    @ApiModelProperty("申请接入时间段")
    private String   applyAccessPeriod ;
    @ApiModelProperty("申请时间")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "Asia/Shanghai")
    private Date  applyTime;
    @ApiModelProperty("申请人")
    private String   applyOwner    ;
    @ApiModelProperty("申请状态:0-过期,1-审核中,2-审核通过,3-未审核通过")
    private String   status    ;
    @ApiModelProperty("审核时间")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "Asia/Shanghai")
    private Date approveTime   ;
    @ApiModelProperty("审核人")
    private String   approveOwner  ;
    public Integer getId() {
        return id;
    }
    public void setId(Integer id) {
        this.id = id;
    }
    public Integer getDeviceId() {
        return deviceId;
    }
    public void setDeviceId(Integer deviceId) {
        this.deviceId = deviceId;
    }
    public String getAccessLine() {
        return accessLine;
    }
    public void setAccessLine(String accessLine) {
        this.accessLine = accessLine;
    }
    public Integer getAssignedVol() {
        return assignedVol;
    }
    public void setAssignedVol(Integer assignedVol) {
        this.assignedVol = assignedVol;
    }
    public String getApplyAccessPeriod() {
        return applyAccessPeriod;
    }
    public void setApplyAccessPeriod(String applyAccessPeriod) {
        this.applyAccessPeriod = applyAccessPeriod;
    }
    public Date getApplyTime() {
        return applyTime;
    }
    public void setApplyTime(Date applyTime) {
        this.applyTime = applyTime;
    }
    public String getApplyOwner() {
        return applyOwner;
    }
    public void setApplyOwner(String applyOwner) {
        this.applyOwner = applyOwner;
    }
    public String getStatus() {
        return status;
    }
    public void setStatus(String status) {
        this.status = status;
    }
    public Date getApproveTime() {
        return approveTime;
    }
    public void setApproveTime(Date approveTime) {
        this.approveTime = approveTime;
    }
    public String getApproveOwner() {
        return approveOwner;
    }
    public void setApproveOwner(String approveOwner) {
        this.approveOwner = approveOwner;
    }
}
src/main/java/com/whyc/pojo/ElectricState.java
@@ -3,6 +3,8 @@
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.ibatis.type.Alias;
import java.util.Date;
@@ -12,6 +14,7 @@
 */
@Alias("ElectricState")
@TableName(schema = "db_experiment",value = "tb_electric_state")
@ApiModel("1号,2号大功率整流电源")
public class ElectricState {
    Long          num                         ; //主键
@@ -36,6 +39,19 @@
    @TableField("alldccurr")
    Float         allDCCurr                    ; //总直流电流
    Integer       connFlag                    ; //串/并联状态
    @ApiModelProperty("运行状态:0-停止,1-运行")
    private Integer runningStatus;
    @ApiModelProperty("负荷状态:0-未知,1-正常,2-负荷,3-满负")
    private Integer loadStatus;
    @ApiModelProperty("额定电压")
    private Float volStd;
    @ApiModelProperty("最大电压")
    private Float maxVol;
    @ApiModelProperty("负荷电压")
    private Float loadVol;
    @ApiModelProperty("可分配电压")
    private Float assignableVol;
    String   note;
    public Long getNum() {
@@ -181,4 +197,52 @@
    public void setNote(String note) {
        this.note = note;
    }
    public Integer getRunningStatus() {
        return runningStatus;
    }
    public void setRunningStatus(Integer runningStatus) {
        this.runningStatus = runningStatus;
    }
    public Integer getLoadStatus() {
        return loadStatus;
    }
    public void setLoadStatus(Integer loadStatus) {
        this.loadStatus = loadStatus;
    }
    public Float getVolStd() {
        return volStd;
    }
    public void setVolStd(Float volStd) {
        this.volStd = volStd;
    }
    public Float getMaxVol() {
        return maxVol;
    }
    public void setMaxVol(Float maxVol) {
        this.maxVol = maxVol;
    }
    public Float getLoadVol() {
        return loadVol;
    }
    public void setLoadVol(Float loadVol) {
        this.loadVol = loadVol;
    }
    public Float getAssignableVol() {
        return assignableVol;
    }
    public void setAssignableVol(Float assignableVol) {
        this.assignableVol = assignableVol;
    }
}