大屏接口

dev
litao 3 years ago
parent dffc0470df
commit 2d8c615210
  1. 20
      lab-service-api/lab-iot-api/src/main/java/org/springblade/iot/entry/Sensor.java
  2. 70
      lab-service-api/lab-iot-api/src/main/java/org/springblade/iot/entry/SensorAlert.java
  3. 69
      lab-service-api/lab-iot-api/src/main/java/org/springblade/iot/entry/SensorHistory.java

@ -17,6 +17,7 @@
package org.springblade.iot.entry;
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 io.swagger.annotations.ApiModel;
@ -24,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;
import org.springframework.data.annotation.Id;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
@ -40,21 +42,39 @@ import java.time.LocalDateTime;
@ApiModel(value = "Sensor对象", description = "数采配置")
public class Sensor extends BaseEntity {
@TableId
private Long id;
@ApiModelProperty(value = "传感器名称")
private String name;
@ApiModelProperty(value = "plc设备的ip")
private String ip;
@ApiModelProperty(value = "房间号")
private String roomNumber;
@ApiModelProperty(value = "预警值")
private String warningValue;
@ApiModelProperty(value = "信息名称(如:302更衣室压差)")
private String signalName;
private String type;
@ApiModelProperty(value = "数据类型(REAL->float)")
private String dataType;
@ApiModelProperty(value = "寄存器地址")
private String registerAddress;
@ApiModelProperty(value = "开始索引")
private Integer startIndex;
@ApiModelProperty(value = "数据长度")
private Integer dataLength;
@TableField(exist = false)
@ApiModelProperty(value = "单前的实时数据")
private String currData;

@ -0,0 +1,70 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package org.springblade.iot.entry;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;
/**
* 数采配置实报警体类
*
* @author swj
* @since 2022年8月17日16:29:15
*/
@Data
@TableName("t_sensor_alert")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Sensor报警对象", description = "数采配置")
public class SensorAlert extends BaseEntity {
@ApiModelProperty(value = "传感器名称")
private String name;
@ApiModelProperty(value = "plc设备的ip")
private String ip;
@ApiModelProperty(value = "房间号")
private String roomNumber;
@ApiModelProperty(value = "信息名称(如:302更衣室压差)")
private String signalName;
@ApiModelProperty(value = "报警类型")
private String type;
@ApiModelProperty(value = "数据类型(REAL->float)")
private String dataType;
@ApiModelProperty(value = "寄存器地址")
private String registerAddress;
@ApiModelProperty(value = "开始索引")
private Integer startIndex;
@ApiModelProperty(value = "数据长度")
private Integer dataLength;
@ApiModelProperty(value = "是否已读")
private Integer isRead;
private static final long serialVersionUID = 1L;
}

@ -0,0 +1,69 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package org.springblade.iot.entry;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;
/**
* 数采配置实体类
*
* @author swj
* @since 2022年8月17日16:29:15
*/
@Data
@TableName("t_sensor_history")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Sensor历史对象", description = "数采配置历史")
public class SensorHistory extends BaseEntity {
@ApiModelProperty(value = "传感器名称")
private String name;
@ApiModelProperty(value = "plc设备的ip")
private String ip;
@ApiModelProperty(value = "房间号")
private String roomNumber;
@ApiModelProperty(value = "信息名称(如:302更衣室压差)")
private String signalName;
private String type;
@ApiModelProperty(value = "数据类型(REAL->float)")
private String dataType;
@ApiModelProperty(value = "寄存器地址")
private String registerAddress;
@ApiModelProperty(value = "开始索引")
private Integer startIndex;
@ApiModelProperty(value = "数据长度")
private Integer dataLength;
@ApiModelProperty(value = "单前的实时数据")
private String currData;
private static final long serialVersionUID = 1L;
}
Loading…
Cancel
Save