增加变形位移监测数据表和接口

master
李一帆 2022-12-14 01:33:38 +08:00
parent 3e3e662333
commit 195029761d
9 changed files with 385 additions and 1 deletions

View File

@ -0,0 +1,31 @@
package com.whdc.zhdbaqapi.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.whdc.zhdbaqapi.mapper.DeviceGNSSDataMapper;
import com.whdc.zhdbaqapi.model.dto.FindPageDto;
import com.whdc.zhdbaqapi.model.entity.DeviceGNSSData;
import com.whdc.zhdbaqapi.model.entity.DeviceInfo;
import com.whdc.zhdbaqapi.utils.ResultJson;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Api(tags = "GNSS设备信息 - Controller")
@RestController
@RequestMapping("/v1/deviceGNSSData")
@Slf4j
public class DeviceGNSSDataController {
@Autowired
private DeviceGNSSDataMapper deviceGNSSDataMapper;
@ApiOperation(value = "分页查询")
@PostMapping(value = "/page")
public ResultJson<IPage<DeviceGNSSData>> page(@RequestBody FindPageDto findDto) {
return ResultJson.ok(deviceGNSSDataMapper.page(findDto.getPage()));
}
}

View File

@ -0,0 +1,30 @@
package com.whdc.zhdbaqapi.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.whdc.zhdbaqapi.mapper.DeviceRobotDataMapper;
import com.whdc.zhdbaqapi.model.dto.FindPageDto;
import com.whdc.zhdbaqapi.model.entity.DeviceGNSSData;
import com.whdc.zhdbaqapi.utils.ResultJson;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Api(tags = "GNSS设备信息 - Controller")
@RestController
@RequestMapping("/v1/deviceRobotData")
@Slf4j
public class DeviceRobotDataController {
@Autowired
private DeviceRobotDataMapper deviceRobotDataMapper;
@ApiOperation(value = "分页查询")
@PostMapping(value = "/page")
public ResultJson<IPage<DeviceGNSSData>> page(@RequestBody FindPageDto findDto) {
return ResultJson.ok(deviceRobotDataMapper.page(findDto.getPage()));
}
}

View File

@ -0,0 +1,14 @@
package com.whdc.zhdbaqapi.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.whdc.zhdbaqapi.model.entity.DeviceGNSS;
import com.whdc.zhdbaqapi.model.entity.DeviceGNSSData;
import com.whdc.zhdbaqapi.model.entity.SysUser;
import org.apache.ibatis.annotations.Param;
public interface DeviceGNSSDataMapper extends BaseMapper<DeviceGNSSData> {
IPage<DeviceGNSSData> page(@Param("page") IPage<SysUser> page);
}

View File

@ -0,0 +1,14 @@
package com.whdc.zhdbaqapi.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.whdc.zhdbaqapi.model.entity.DeviceGNSSData;
import com.whdc.zhdbaqapi.model.entity.DeviceRobotData;
import com.whdc.zhdbaqapi.model.entity.SysUser;
import org.apache.ibatis.annotations.Param;
public interface DeviceRobotDataMapper extends BaseMapper<DeviceRobotData> {
IPage<DeviceRobotData> page(@Param("page") IPage<SysUser> page);
}

View File

@ -60,7 +60,7 @@ public class DeviceGNSS implements Serializable {
*/ */
@ApiParam(value = "开始解算时间") @ApiParam(value = "开始解算时间")
@ApiModelProperty(value = "开始解算时间", dataType = "java.util.Date") @ApiModelProperty(value = "开始解算时间", dataType = "java.util.Date")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@Excel(name = "开始解算时间") @Excel(name = "开始解算时间")
@TableField("START_TIME") @TableField("START_TIME")
private Date startTime; private Date startTime;

View File

@ -0,0 +1,175 @@
package com.whdc.zhdbaqapi.model.entity;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotEmpty;
import java.math.BigDecimal;
import java.util.Date;
@Data
@TableName("DSM_GNSS_SURF_DEVICE_DATA_HIST")
@Accessors(chain = true) // chain = true 实现链式调用
@ApiModel(value = "DSM_GNSS_SURF_DEVICE_DATA_HIST 对象", description = "GNSS设备监测数据")
@JsonInclude(JsonInclude.Include.ALWAYS) // 表示序列化非null属性
public class DeviceGNSSData {
/**
* id
*/
@ApiParam(value = "主键id")
@ApiModelProperty(value = "主键id", dataType = "java.lang.Integer")
@TableId(value = "ID", type = IdType.AUTO)
private Integer id;
/**
* ID
*/
@ApiParam(value = "表面位移测点ID")
@ApiModelProperty(value = "表面位移测点ID", dataType = "java.lang.Integer")
@Excel(name = "表面位移测点ID")
@NotEmpty(message = "表面位移测点ID")
@TableField("DEVICE_ID")
private Integer deviceId;
/**
* ID
*/
@ApiParam(value = "表面位移监测类型ID")
@ApiModelProperty(value = "表面位移监测类型ID", dataType = "java.lang.Integer")
@Excel(name = "表面位移监测类型ID")
@NotEmpty(message = "表面位移监测类型ID")
@TableField("DEVICE_DATA_TYPE_ID")
private Integer DeviceDataTypeId;
/**
* X
*/
@ApiParam(value = "表面位移测点X方向值")
@ApiModelProperty(value = "表面位移测点X方向值", dataType = "java.math.BigDecimal")
@Excel(name = "表面位移测点X方向值")
@TableField("V1")
private BigDecimal v1;
/**
* Y
*/
@ApiParam(value = "表面位移测点Y方向值")
@ApiModelProperty(value = "表面位移测点Y方向值", dataType = "java.math.BigDecimal")
@Excel(name = "表面位移测点Y方向值")
@TableField("V2")
private BigDecimal v2;
/**
* H
*/
@ApiParam(value = "表面位移测点H方向值")
@ApiModelProperty(value = "表面位移测点H方向值", dataType = "java.math.BigDecimal")
@Excel(name = "表面位移测点H方向值")
@TableField("V3")
private BigDecimal v3;
/**
* 1
*/
@ApiParam(value = "预留1")
@ApiModelProperty(value = "预留1", dataType = "java.math.BigDecimal")
@Excel(name = "预留1")
@TableField("V4")
private BigDecimal v4;
/**
* 2
*/
@ApiParam(value = "预留2")
@ApiModelProperty(value = "预留2", dataType = "java.math.BigDecimal")
@Excel(name = "预留2")
@TableField("V5")
private BigDecimal v5;
/**
* ID
*/
@ApiParam(value = "创建人ID")
@ApiModelProperty(value = "创建人ID", dataType = "java.lang.Integer")
@Excel(name = "创建人ID")
@NotEmpty(message = "创建人ID")
@TableField("CREATE_USER_ID")
private Integer createUserId;
/**
*
*/
@ApiParam(value = "创建时间")
@ApiModelProperty(value = "创建时间", dataType = "java.util.Date")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@Excel(name = "创建时间")
@TableField("CREATE_TIME")
private Date createTime;
/**
* ID
*/
@ApiParam(value = "修改人ID")
@ApiModelProperty(value = "修改人ID", dataType = "java.lang.Integer")
@Excel(name = "修改人ID")
@NotEmpty(message = "修改人ID")
@TableField("MODIFY_USER_ID")
private Integer modifyUserId;
/**
*
*/
@ApiParam(value = "修改时间")
@ApiModelProperty(value = "修改时间", dataType = "java.util.Date")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@Excel(name = "修改时间")
@TableField("MODIFY_TIME")
private Date modifyTime;
/**
*
*/
@ApiParam(value = "测点采集时间")
@ApiModelProperty(value = "测点采集时间", dataType = "java.util.Date")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@Excel(name = "测点采集时间")
@TableField("DAC_TIME")
private Date dacTime;
/**
* DV1
*/
@ApiParam(value = "DV1")
@ApiModelProperty(value = "DV1", dataType = "java.math.BigDecimal")
@Excel(name = "DV1")
@TableField("DV1")
private BigDecimal dv1;
/**
* DV2
*/
@ApiParam(value = "DV2")
@ApiModelProperty(value = "DV2", dataType = "java.math.BigDecimal")
@Excel(name = "DV2")
@TableField("DV2")
private BigDecimal dv2;
/**
* DV3
*/
@ApiParam(value = "DV3")
@ApiModelProperty(value = "DV3", dataType = "java.math.BigDecimal")
@Excel(name = "DV3")
@TableField("DV3")
private BigDecimal dv3;
}

View File

@ -0,0 +1,100 @@
package com.whdc.zhdbaqapi.model.entity;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotEmpty;
import java.math.BigDecimal;
import java.util.Date;
@Data
@TableName("DSM_COORDINATES")
@Accessors(chain = true) // chain = true 实现链式调用
@ApiModel(value = "DSM_COORDINATES 对象", description = "GNSS设备监测数据")
@JsonInclude(JsonInclude.Include.ALWAYS) // 表示序列化非null属性
public class DeviceRobotData {
/**
* id
*/
@ApiParam(value = "主键id")
@ApiModelProperty(value = "主键id", dataType = "java.lang.Integer")
@TableId(value = "ID", type = IdType.AUTO)
private Integer id;
/**
* POINTSID
*/
@ApiParam(value = "关联POINTS表的ID")
@ApiModelProperty(value = "关联POINTS表的ID", dataType = "java.lang.Integer")
@Excel(name = "关联POINTS表的ID")
@NotEmpty(message = "关联POINTS表的ID")
@TableField("POINT_ID")
private Integer pointId;
/**
* ID
*/
@ApiParam(value = "测点ID")
@ApiModelProperty(value = "测点ID", dataType = "java.lang.String", required = true)
@Excel(name = "测点ID")
@NotEmpty(message = "测点ID")
@TableField("TPS_SETUP_ID")
private String tpsSetupId;
/**
*
*/
@ApiParam(value = "初始值更新时间")
@ApiModelProperty(value = "初始值更新时间", dataType = "java.util.Date")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@Excel(name = "初始值更新时间")
@TableField("EPOCH")
private Date epoch;
/**
*
*/
@ApiParam(value = "东坐标")
@ApiModelProperty(value = "东坐标", dataType = "java.math.BigDecimal")
@Excel(name = "东坐标")
@TableField("EASTING")
private BigDecimal easting;
/**
*
*/
@ApiParam(value = "北坐标")
@ApiModelProperty(value = "北坐标", dataType = "java.math.BigDecimal")
@Excel(name = "北坐标")
@TableField("NORTHING")
private BigDecimal northing;
/**
*
*/
@ApiParam(value = "高程")
@ApiModelProperty(value = "高程", dataType = "java.math.BigDecimal")
@Excel(name = "高程")
@TableField("HEIGHT")
private BigDecimal height;
/**
* 1234
*/
@ApiParam(value = "坐标类型")
@ApiModelProperty(value = "坐标类型", dataType = "java.lang.Integer")
@Excel(name = "坐标类型")
@NotEmpty(message = "坐标类型")
@TableField("TYPE")
private Integer type;
}

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.whdc.zhdbaqapi.mapper.DeviceGNSSDataMapper">
<select id="page" resultType="com.whdc.zhdbaqapi.model.entity.DeviceGNSSData">
SELECT *
FROM "DAM_SAFE"."DSM_GNSS_SURF_DEVICE_DATA_HIST"
</select>
</mapper>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.whdc.zhdbaqapi.mapper.DeviceRobotDataMapper">
<select id="page" resultType="com.whdc.zhdbaqapi.model.entity.DeviceRobotData">
SELECT *
FROM "DAM_SAFE"."DSM_COORDINATES"
</select>
</mapper>