虫情设备实时数据
This commit is contained in:
@ -32,6 +32,10 @@
|
||||
<groupId>com.fastbee</groupId>
|
||||
<artifactId>fastbee-common</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
@ -1,4 +1,4 @@
|
||||
package com.fastbee.device.api.renke.constant;
|
||||
package com.fastbee.deviceData.api.renke.constant;
|
||||
|
||||
/**
|
||||
* 建大仁科设备类型常量
|
@ -1,4 +1,4 @@
|
||||
package com.fastbee.device.api.renke.service;
|
||||
package com.fastbee.deviceData.api.renke.service;
|
||||
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpResponse;
|
@ -1,4 +1,4 @@
|
||||
package com.fastbee.device.api.renke.service;
|
||||
package com.fastbee.deviceData.api.renke.service;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.fastbee.device.api.renke.service;
|
||||
package com.fastbee.deviceData.api.renke.service;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.fastbee.device.api.yingshiyun.service;
|
||||
package com.fastbee.deviceData.api.yingshiyun.service;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
@ -0,0 +1,90 @@
|
||||
package com.fastbee.deviceData.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 气象设备实时数据对象 iot_device_realtimedata_meteorology
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-11-08
|
||||
*/
|
||||
@ApiModel(value = "DeviceRealtimedataMeteorology",description = "气象设备实时数据 iot_device_realtimedata_meteorology")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("iot_device_realtimedata_meteorology")
|
||||
public class DeviceRealtimedataMeteorology extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 节点编号 */
|
||||
private Long nodeId;
|
||||
|
||||
/** 节点名称 */
|
||||
@Excel(name = "节点名称")
|
||||
@ApiModelProperty("节点名称")
|
||||
private String nodeName;
|
||||
|
||||
/** 节点类型 -- 节点类型 --1:模拟量1使能模拟量2使能 --2:模拟量1使能模拟量2禁用 --3:模拟量1禁用模拟量2使能 --4:浮点型设备--5:开关量型设备 --6:32位有符号整形 --7:32位无符号整形--8:遥调设备 */
|
||||
@Excel(name = "节点类型 -- 节点类型 --1:模拟量1使能模拟量2使能 --2:模拟量1使能模拟量2禁用 --3:模拟量1禁用模拟量2使能 --4:浮点型设备--5:开关量型设备 --6:32位有符号整形 --7:32位无符号整形--8:遥调设备")
|
||||
@ApiModelProperty("节点类型 -- 节点类型 --1:模拟量1使能模拟量2使能 --2:模拟量1使能模拟量2禁用 --3:模拟量1禁用模拟量2使能 --4:浮点型设备--5:开关量型设备 --6:32位有符号整形 --7:32位无符号整形--8:遥调设备")
|
||||
private Long nodeType;
|
||||
|
||||
/** 模拟量1名称 */
|
||||
@Excel(name = "模拟量1名称")
|
||||
@ApiModelProperty("模拟量1名称")
|
||||
private String temName;
|
||||
|
||||
/** 模拟量1单位 */
|
||||
@Excel(name = "模拟量1单位")
|
||||
@ApiModelProperty("模拟量1单位")
|
||||
private String temUnit;
|
||||
|
||||
/** 模拟量1原值 */
|
||||
@Excel(name = "模拟量1原值")
|
||||
@ApiModelProperty("模拟量1原值")
|
||||
private Long temValue;
|
||||
|
||||
/** 模拟量1显示值 */
|
||||
@Excel(name = "模拟量1显示值")
|
||||
@ApiModelProperty("模拟量1显示值")
|
||||
private String temValueStr;
|
||||
|
||||
/** 报警等级, -- 报警等级 --0:正常--1:超上限报警 --2:超下限报警 --3:开关闭合报警 --4:开关断开报警 --5:遥调报警 */
|
||||
@Excel(name = "报警等级, -- 报警等级 --0:正常--1:超上限报警 --2:超下限报警 --3:开关闭合报警 --4:开关断开报警 --5:遥调报警")
|
||||
@ApiModelProperty("报警等级, -- 报警等级 --0:正常--1:超上限报警 --2:超下限报警 --3:开关闭合报警 --4:开关断开报警 --5:遥调报警")
|
||||
private Long temAlarmStatus;
|
||||
|
||||
/** 模拟量2名称 */
|
||||
@Excel(name = "模拟量2名称")
|
||||
@ApiModelProperty("模拟量2名称")
|
||||
private String humName;
|
||||
|
||||
/** 模拟量2单位 */
|
||||
@Excel(name = "模拟量2单位")
|
||||
@ApiModelProperty("模拟量2单位")
|
||||
private String humUnit;
|
||||
|
||||
/** 模拟量2原值 */
|
||||
@Excel(name = "模拟量2原值")
|
||||
@ApiModelProperty("模拟量2原值")
|
||||
private Long humValue;
|
||||
|
||||
/** 模拟量2显示值 */
|
||||
@Excel(name = "模拟量2显示值")
|
||||
@ApiModelProperty("模拟量2显示值")
|
||||
private String humValueStr;
|
||||
|
||||
/** 报警等级 , --0:正常 --1:超上限报警 --2:超下限报警 */
|
||||
@Excel(name = "报警等级 , --0:正常 --1:超上限报警 --2:超下限报警")
|
||||
@ApiModelProperty("报警等级 , --0:正常 --1:超上限报警 --2:超下限报警")
|
||||
private Long humAlarmStatus;
|
||||
|
||||
}
|
@ -1,5 +1,7 @@
|
||||
package com.fastbee.device.domain;
|
||||
package com.fastbee.deviceData.domain;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@ -16,6 +18,7 @@ import com.fastbee.common.core.domain.BaseEntity;
|
||||
@ApiModel(value = "DeviceRealtimedataWorms",description = "虫情设备实时数据 iot_device_realtimedata_worms")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("iot_device_realtimedata_worms")
|
||||
public class DeviceRealtimedataWorms extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ -112,5 +115,8 @@ private static final long serialVersionUID = 1L;
|
||||
@Excel(name = "设备状态", readConverterExp = "o=nline/offline")
|
||||
@ApiModelProperty("设备状态")
|
||||
private String status;
|
||||
|
||||
/** 创建时间(online/offline) */
|
||||
@Excel(name = "创建时间")
|
||||
@ApiModelProperty("设备状态")
|
||||
private DateTime createTime;
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package com.fastbee.deviceData.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.fastbee.deviceData.domain.DeviceRealtimedataMeteorology;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 气象设备实时数据Mapper接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-11-08
|
||||
*/
|
||||
@Mapper
|
||||
public interface DeviceRealtimedataMeteorologyMapper extends BaseMapper<DeviceRealtimedataMeteorology>
|
||||
{
|
||||
/**
|
||||
* 查询气象设备实时数据
|
||||
*
|
||||
* @param nodeId 气象设备实时数据主键
|
||||
* @return 气象设备实时数据
|
||||
*/
|
||||
public DeviceRealtimedataMeteorology selectDeviceRealtimedataMeteorologyByNodeId(Long nodeId);
|
||||
|
||||
/**
|
||||
* 查询气象设备实时数据列表
|
||||
*
|
||||
* @param deviceRealtimedataMeteorology 气象设备实时数据
|
||||
* @return 气象设备实时数据集合
|
||||
*/
|
||||
public List<DeviceRealtimedataMeteorology> selectDeviceRealtimedataMeteorologyList(DeviceRealtimedataMeteorology deviceRealtimedataMeteorology);
|
||||
|
||||
/**
|
||||
* 新增气象设备实时数据
|
||||
*
|
||||
* @param deviceRealtimedataMeteorology 气象设备实时数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDeviceRealtimedataMeteorology(DeviceRealtimedataMeteorology deviceRealtimedataMeteorology);
|
||||
|
||||
/**
|
||||
* 修改气象设备实时数据
|
||||
*
|
||||
* @param deviceRealtimedataMeteorology 气象设备实时数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDeviceRealtimedataMeteorology(DeviceRealtimedataMeteorology deviceRealtimedataMeteorology);
|
||||
|
||||
/**
|
||||
* 删除气象设备实时数据
|
||||
*
|
||||
* @param nodeId 气象设备实时数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeviceRealtimedataMeteorologyByNodeId(Long nodeId);
|
||||
|
||||
/**
|
||||
* 批量删除气象设备实时数据
|
||||
*
|
||||
* @param nodeIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeviceRealtimedataMeteorologyByNodeIds(Long[] nodeIds);
|
||||
}
|
@ -1,7 +1,10 @@
|
||||
package com.fastbee.device.mapper;
|
||||
package com.fastbee.deviceData.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.device.domain.DeviceRealtimedataWorms;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.fastbee.deviceData.domain.DeviceRealtimedataWorms;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 虫情设备实时数据Mapper接口
|
||||
@ -9,7 +12,8 @@ import com.fastbee.device.domain.DeviceRealtimedataWorms;
|
||||
* @author kerwincui
|
||||
* @date 2024-11-07
|
||||
*/
|
||||
public interface DeviceRealtimedataWormsMapper
|
||||
@Mapper
|
||||
public interface DeviceRealtimedataWormsMapper extends BaseMapper<DeviceRealtimedataWorms>
|
||||
{
|
||||
/**
|
||||
* 查询虫情设备实时数据
|
@ -0,0 +1,61 @@
|
||||
package com.fastbee.deviceData.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.deviceData.domain.DeviceRealtimedataMeteorology;
|
||||
|
||||
/**
|
||||
* 气象设备实时数据Service接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-11-08
|
||||
*/
|
||||
public interface IDeviceRealtimedataMeteorologyService
|
||||
{
|
||||
/**
|
||||
* 查询气象设备实时数据
|
||||
*
|
||||
* @param nodeId 气象设备实时数据主键
|
||||
* @return 气象设备实时数据
|
||||
*/
|
||||
public DeviceRealtimedataMeteorology selectDeviceRealtimedataMeteorologyByNodeId(Long nodeId);
|
||||
|
||||
/**
|
||||
* 查询气象设备实时数据列表
|
||||
*
|
||||
* @param deviceRealtimedataMeteorology 气象设备实时数据
|
||||
* @return 气象设备实时数据集合
|
||||
*/
|
||||
public List<DeviceRealtimedataMeteorology> selectDeviceRealtimedataMeteorologyList(DeviceRealtimedataMeteorology deviceRealtimedataMeteorology);
|
||||
|
||||
/**
|
||||
* 新增气象设备实时数据
|
||||
*
|
||||
* @param deviceRealtimedataMeteorology 气象设备实时数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDeviceRealtimedataMeteorology(DeviceRealtimedataMeteorology deviceRealtimedataMeteorology);
|
||||
|
||||
/**
|
||||
* 修改气象设备实时数据
|
||||
*
|
||||
* @param deviceRealtimedataMeteorology 气象设备实时数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDeviceRealtimedataMeteorology(DeviceRealtimedataMeteorology deviceRealtimedataMeteorology);
|
||||
|
||||
/**
|
||||
* 批量删除气象设备实时数据
|
||||
*
|
||||
* @param nodeIds 需要删除的气象设备实时数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeviceRealtimedataMeteorologyByNodeIds(Long[] nodeIds);
|
||||
|
||||
/**
|
||||
* 删除气象设备实时数据信息
|
||||
*
|
||||
* @param nodeId 气象设备实时数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeviceRealtimedataMeteorologyByNodeId(Long nodeId);
|
||||
}
|
@ -1,7 +1,8 @@
|
||||
package com.fastbee.device.service;
|
||||
package com.fastbee.deviceData.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.device.domain.DeviceRealtimedataWorms;
|
||||
import com.fastbee.deviceData.domain.DeviceRealtimedataWorms;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 虫情设备实时数据Service接口
|
||||
@ -9,6 +10,7 @@ import com.fastbee.device.domain.DeviceRealtimedataWorms;
|
||||
* @author kerwincui
|
||||
* @date 2024-11-07
|
||||
*/
|
||||
@Mapper
|
||||
public interface IDeviceRealtimedataWormsService
|
||||
{
|
||||
/**
|
@ -0,0 +1,95 @@
|
||||
package com.fastbee.deviceData.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.fastbee.deviceData.mapper.DeviceRealtimedataMeteorologyMapper;
|
||||
import com.fastbee.deviceData.domain.DeviceRealtimedataMeteorology;
|
||||
import com.fastbee.deviceData.service.IDeviceRealtimedataMeteorologyService;
|
||||
|
||||
/**
|
||||
* 气象设备实时数据Service业务层处理
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-11-08
|
||||
*/
|
||||
@Service
|
||||
public class DeviceRealtimedataMeteorologyServiceImpl implements IDeviceRealtimedataMeteorologyService
|
||||
{
|
||||
@Autowired
|
||||
private DeviceRealtimedataMeteorologyMapper deviceRealtimedataMeteorologyMapper;
|
||||
|
||||
/**
|
||||
* 查询气象设备实时数据
|
||||
*
|
||||
* @param nodeId 气象设备实时数据主键
|
||||
* @return 气象设备实时数据
|
||||
*/
|
||||
@Override
|
||||
public DeviceRealtimedataMeteorology selectDeviceRealtimedataMeteorologyByNodeId(Long nodeId)
|
||||
{
|
||||
return deviceRealtimedataMeteorologyMapper.selectDeviceRealtimedataMeteorologyByNodeId(nodeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询气象设备实时数据列表
|
||||
*
|
||||
* @param deviceRealtimedataMeteorology 气象设备实时数据
|
||||
* @return 气象设备实时数据
|
||||
*/
|
||||
@Override
|
||||
public List<DeviceRealtimedataMeteorology> selectDeviceRealtimedataMeteorologyList(DeviceRealtimedataMeteorology deviceRealtimedataMeteorology)
|
||||
{
|
||||
return deviceRealtimedataMeteorologyMapper.selectDeviceRealtimedataMeteorologyList(deviceRealtimedataMeteorology);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增气象设备实时数据
|
||||
*
|
||||
* @param deviceRealtimedataMeteorology 气象设备实时数据
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDeviceRealtimedataMeteorology(DeviceRealtimedataMeteorology deviceRealtimedataMeteorology)
|
||||
{
|
||||
deviceRealtimedataMeteorology.setCreateTime(DateUtils.getNowDate());
|
||||
return deviceRealtimedataMeteorologyMapper.insert(deviceRealtimedataMeteorology);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改气象设备实时数据
|
||||
*
|
||||
* @param deviceRealtimedataMeteorology 气象设备实时数据
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDeviceRealtimedataMeteorology(DeviceRealtimedataMeteorology deviceRealtimedataMeteorology)
|
||||
{
|
||||
return deviceRealtimedataMeteorologyMapper.updateDeviceRealtimedataMeteorology(deviceRealtimedataMeteorology);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除气象设备实时数据
|
||||
*
|
||||
* @param nodeIds 需要删除的气象设备实时数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDeviceRealtimedataMeteorologyByNodeIds(Long[] nodeIds)
|
||||
{
|
||||
return deviceRealtimedataMeteorologyMapper.deleteDeviceRealtimedataMeteorologyByNodeIds(nodeIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除气象设备实时数据信息
|
||||
*
|
||||
* @param nodeId 气象设备实时数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDeviceRealtimedataMeteorologyByNodeId(Long nodeId)
|
||||
{
|
||||
return deviceRealtimedataMeteorologyMapper.deleteDeviceRealtimedataMeteorologyByNodeId(nodeId);
|
||||
}
|
||||
}
|
@ -1,11 +1,11 @@
|
||||
package com.fastbee.device.service.impl;
|
||||
package com.fastbee.deviceData.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.fastbee.device.mapper.DeviceRealtimedataWormsMapper;
|
||||
import com.fastbee.device.domain.DeviceRealtimedataWorms;
|
||||
import com.fastbee.device.service.IDeviceRealtimedataWormsService;
|
||||
import com.fastbee.deviceData.mapper.DeviceRealtimedataWormsMapper;
|
||||
import com.fastbee.deviceData.domain.DeviceRealtimedataWorms;
|
||||
import com.fastbee.deviceData.service.IDeviceRealtimedataWormsService;
|
||||
|
||||
/**
|
||||
* 虫情设备实时数据Service业务层处理
|
||||
@ -52,7 +52,7 @@ public class DeviceRealtimedataWormsServiceImpl implements IDeviceRealtimedataWo
|
||||
@Override
|
||||
public int insertDeviceRealtimedataWorms(DeviceRealtimedataWorms deviceRealtimedataWorms)
|
||||
{
|
||||
return deviceRealtimedataWormsMapper.insertDeviceRealtimedataWorms(deviceRealtimedataWorms);
|
||||
return deviceRealtimedataWormsMapper.insert(deviceRealtimedataWorms);
|
||||
}
|
||||
|
||||
/**
|
@ -0,0 +1,117 @@
|
||||
<?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.fastbee.deviceData.mapper.DeviceRealtimedataMeteorologyMapper">
|
||||
|
||||
<resultMap type="DeviceRealtimedataMeteorology" id="DeviceRealtimedataMeteorologyResult">
|
||||
<result property="nodeId" column="node_id" />
|
||||
<result property="nodeName" column="node_name" />
|
||||
<result property="nodeType" column="node_type" />
|
||||
<result property="temName" column="tem_name" />
|
||||
<result property="temUnit" column="tem_unit" />
|
||||
<result property="temValue" column="tem_value" />
|
||||
<result property="temValueStr" column="tem_value_str" />
|
||||
<result property="temAlarmStatus" column="tem_alarm_status" />
|
||||
<result property="humName" column="hum_name" />
|
||||
<result property="humUnit" column="hum_unit" />
|
||||
<result property="humValue" column="hum_value" />
|
||||
<result property="humValueStr" column="hum_value_str" />
|
||||
<result property="humAlarmStatus" column="hum_alarm_status" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDeviceRealtimedataMeteorologyVo">
|
||||
select node_id, node_name, node_type, tem_name, tem_unit, tem_value, tem_value_str, tem_alarm_status, hum_name, hum_unit, hum_value, hum_value_str, hum_alarm_status, create_time from iot_device_realtimedata_meteorology
|
||||
</sql>
|
||||
|
||||
<select id="selectDeviceRealtimedataMeteorologyList" parameterType="DeviceRealtimedataMeteorology" resultMap="DeviceRealtimedataMeteorologyResult">
|
||||
<include refid="selectDeviceRealtimedataMeteorologyVo"/>
|
||||
<where>
|
||||
<if test="nodeName != null and nodeName != ''"> and node_name like concat('%', #{nodeName}, '%')</if>
|
||||
<if test="nodeType != null "> and node_type = #{nodeType}</if>
|
||||
<if test="temName != null and temName != ''"> and tem_name like concat('%', #{temName}, '%')</if>
|
||||
<if test="temUnit != null and temUnit != ''"> and tem_unit = #{temUnit}</if>
|
||||
<if test="temValue != null "> and tem_value = #{temValue}</if>
|
||||
<if test="temValueStr != null and temValueStr != ''"> and tem_value_str = #{temValueStr}</if>
|
||||
<if test="temAlarmStatus != null "> and tem_alarm_status = #{temAlarmStatus}</if>
|
||||
<if test="humName != null and humName != ''"> and hum_name like concat('%', #{humName}, '%')</if>
|
||||
<if test="humUnit != null and humUnit != ''"> and hum_unit = #{humUnit}</if>
|
||||
<if test="humValue != null "> and hum_value = #{humValue}</if>
|
||||
<if test="humValueStr != null and humValueStr != ''"> and hum_value_str = #{humValueStr}</if>
|
||||
<if test="humAlarmStatus != null "> and hum_alarm_status = #{humAlarmStatus}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDeviceRealtimedataMeteorologyByNodeId" parameterType="Long" resultMap="DeviceRealtimedataMeteorologyResult">
|
||||
<include refid="selectDeviceRealtimedataMeteorologyVo"/>
|
||||
where node_id = #{nodeId}
|
||||
</select>
|
||||
|
||||
<insert id="insertDeviceRealtimedataMeteorology" parameterType="DeviceRealtimedataMeteorology">
|
||||
insert into iot_device_realtimedata_meteorology
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="nodeId != null">node_id,</if>
|
||||
<if test="nodeName != null">node_name,</if>
|
||||
<if test="nodeType != null">node_type,</if>
|
||||
<if test="temName != null">tem_name,</if>
|
||||
<if test="temUnit != null">tem_unit,</if>
|
||||
<if test="temValue != null">tem_value,</if>
|
||||
<if test="temValueStr != null">tem_value_str,</if>
|
||||
<if test="temAlarmStatus != null">tem_alarm_status,</if>
|
||||
<if test="humName != null">hum_name,</if>
|
||||
<if test="humUnit != null">hum_unit,</if>
|
||||
<if test="humValue != null">hum_value,</if>
|
||||
<if test="humValueStr != null">hum_value_str,</if>
|
||||
<if test="humAlarmStatus != null">hum_alarm_status,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="nodeId != null">#{nodeId},</if>
|
||||
<if test="nodeName != null">#{nodeName},</if>
|
||||
<if test="nodeType != null">#{nodeType},</if>
|
||||
<if test="temName != null">#{temName},</if>
|
||||
<if test="temUnit != null">#{temUnit},</if>
|
||||
<if test="temValue != null">#{temValue},</if>
|
||||
<if test="temValueStr != null">#{temValueStr},</if>
|
||||
<if test="temAlarmStatus != null">#{temAlarmStatus},</if>
|
||||
<if test="humName != null">#{humName},</if>
|
||||
<if test="humUnit != null">#{humUnit},</if>
|
||||
<if test="humValue != null">#{humValue},</if>
|
||||
<if test="humValueStr != null">#{humValueStr},</if>
|
||||
<if test="humAlarmStatus != null">#{humAlarmStatus},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDeviceRealtimedataMeteorology" parameterType="DeviceRealtimedataMeteorology">
|
||||
update iot_device_realtimedata_meteorology
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="nodeName != null">node_name = #{nodeName},</if>
|
||||
<if test="nodeType != null">node_type = #{nodeType},</if>
|
||||
<if test="temName != null">tem_name = #{temName},</if>
|
||||
<if test="temUnit != null">tem_unit = #{temUnit},</if>
|
||||
<if test="temValue != null">tem_value = #{temValue},</if>
|
||||
<if test="temValueStr != null">tem_value_str = #{temValueStr},</if>
|
||||
<if test="temAlarmStatus != null">tem_alarm_status = #{temAlarmStatus},</if>
|
||||
<if test="humName != null">hum_name = #{humName},</if>
|
||||
<if test="humUnit != null">hum_unit = #{humUnit},</if>
|
||||
<if test="humValue != null">hum_value = #{humValue},</if>
|
||||
<if test="humValueStr != null">hum_value_str = #{humValueStr},</if>
|
||||
<if test="humAlarmStatus != null">hum_alarm_status = #{humAlarmStatus},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where node_id = #{nodeId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDeviceRealtimedataMeteorologyByNodeId" parameterType="Long">
|
||||
delete from iot_device_realtimedata_meteorology where node_id = #{nodeId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDeviceRealtimedataMeteorologyByNodeIds" parameterType="String">
|
||||
delete from iot_device_realtimedata_meteorology where node_id in
|
||||
<foreach item="nodeId" collection="array" open="(" separator="," close=")">
|
||||
#{nodeId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Reference in New Issue
Block a user