diff --git a/src/main/java/com/whdc/zhdbaqapi/controller/DeviceGNSSDataController.java b/src/main/java/com/whdc/zhdbaqapi/controller/DeviceGNSSDataController.java new file mode 100644 index 0000000..1b940ac --- /dev/null +++ b/src/main/java/com/whdc/zhdbaqapi/controller/DeviceGNSSDataController.java @@ -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> page(@RequestBody FindPageDto findDto) { + return ResultJson.ok(deviceGNSSDataMapper.page(findDto.getPage())); + } +} diff --git a/src/main/java/com/whdc/zhdbaqapi/controller/DeviceRobotDataController.java b/src/main/java/com/whdc/zhdbaqapi/controller/DeviceRobotDataController.java new file mode 100644 index 0000000..7bd5d2a --- /dev/null +++ b/src/main/java/com/whdc/zhdbaqapi/controller/DeviceRobotDataController.java @@ -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> page(@RequestBody FindPageDto findDto) { + return ResultJson.ok(deviceRobotDataMapper.page(findDto.getPage())); + } +} diff --git a/src/main/java/com/whdc/zhdbaqapi/mapper/DeviceGNSSDataMapper.java b/src/main/java/com/whdc/zhdbaqapi/mapper/DeviceGNSSDataMapper.java new file mode 100644 index 0000000..07a70dc --- /dev/null +++ b/src/main/java/com/whdc/zhdbaqapi/mapper/DeviceGNSSDataMapper.java @@ -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 { + + IPage page(@Param("page") IPage page); + +} diff --git a/src/main/java/com/whdc/zhdbaqapi/mapper/DeviceRobotDataMapper.java b/src/main/java/com/whdc/zhdbaqapi/mapper/DeviceRobotDataMapper.java new file mode 100644 index 0000000..31f6ebf --- /dev/null +++ b/src/main/java/com/whdc/zhdbaqapi/mapper/DeviceRobotDataMapper.java @@ -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 { + + IPage page(@Param("page") IPage page); + +} diff --git a/src/main/java/com/whdc/zhdbaqapi/model/entity/DeviceGNSS.java b/src/main/java/com/whdc/zhdbaqapi/model/entity/DeviceGNSS.java index a85de62..e002afc 100644 --- a/src/main/java/com/whdc/zhdbaqapi/model/entity/DeviceGNSS.java +++ b/src/main/java/com/whdc/zhdbaqapi/model/entity/DeviceGNSS.java @@ -60,7 +60,7 @@ public class DeviceGNSS implements Serializable { */ @ApiParam(value = "开始解算时间") @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 = "开始解算时间") @TableField("START_TIME") private Date startTime; diff --git a/src/main/java/com/whdc/zhdbaqapi/model/entity/DeviceGNSSData.java b/src/main/java/com/whdc/zhdbaqapi/model/entity/DeviceGNSSData.java new file mode 100644 index 0000000..ee96625 --- /dev/null +++ b/src/main/java/com/whdc/zhdbaqapi/model/entity/DeviceGNSSData.java @@ -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; +} diff --git a/src/main/java/com/whdc/zhdbaqapi/model/entity/DeviceRobotData.java b/src/main/java/com/whdc/zhdbaqapi/model/entity/DeviceRobotData.java new file mode 100644 index 0000000..f0cf9cd --- /dev/null +++ b/src/main/java/com/whdc/zhdbaqapi/model/entity/DeviceRobotData.java @@ -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; + + /** + * 关联POINTS表的ID + */ + @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; + + /** + * 坐标类型(1初始值,2参考值,3当前值,4扫描值) + */ + @ApiParam(value = "坐标类型") + @ApiModelProperty(value = "坐标类型", dataType = "java.lang.Integer") + @Excel(name = "坐标类型") + @NotEmpty(message = "坐标类型") + @TableField("TYPE") + private Integer type; +} diff --git a/src/main/resources/mapper/DeviceGNSSDataMapper.xml b/src/main/resources/mapper/DeviceGNSSDataMapper.xml new file mode 100644 index 0000000..670cdf6 --- /dev/null +++ b/src/main/resources/mapper/DeviceGNSSDataMapper.xml @@ -0,0 +1,10 @@ + + + + + + + diff --git a/src/main/resources/mapper/DeviceRobotDataMapper.xml b/src/main/resources/mapper/DeviceRobotDataMapper.xml new file mode 100644 index 0000000..fa58f08 --- /dev/null +++ b/src/main/resources/mapper/DeviceRobotDataMapper.xml @@ -0,0 +1,10 @@ + + + + + + +