墒情设备实时数据
This commit is contained in:
parent
32479b58a2
commit
9cb2f9cd13
@ -0,0 +1,262 @@
|
|||||||
|
package com.fastbee.deviceData.domain;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
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_moisture
|
||||||
|
*
|
||||||
|
* @author kerwincui
|
||||||
|
* @date 2024-11-14
|
||||||
|
*/
|
||||||
|
@ApiModel(value = "DeviceRealtimedataMoisture",description = "墒情设备实时数据 iot_device_realtimedata_moisture")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class DeviceRealtimedataMoisture extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 设备id */
|
||||||
|
@Excel(name = "设备id")
|
||||||
|
@ApiModelProperty("设备id")
|
||||||
|
private Long deviceId;
|
||||||
|
|
||||||
|
/** 1#环境温度 */
|
||||||
|
@Excel(name = "1#环境温度")
|
||||||
|
@ApiModelProperty("1#环境温度")
|
||||||
|
private BigDecimal airTemp;
|
||||||
|
|
||||||
|
/** 1#设备温度 */
|
||||||
|
@Excel(name = "1#设备温度")
|
||||||
|
@ApiModelProperty("1#设备温度")
|
||||||
|
private BigDecimal mppTemp;
|
||||||
|
|
||||||
|
/** 1#电池电量 */
|
||||||
|
@Excel(name = "1#电池电量")
|
||||||
|
@ApiModelProperty("1#电池电量")
|
||||||
|
private Long batteryCap;
|
||||||
|
|
||||||
|
/** 1#电池电压 */
|
||||||
|
@Excel(name = "1#电池电压")
|
||||||
|
@ApiModelProperty("1#电池电压")
|
||||||
|
private BigDecimal batteryVolt;
|
||||||
|
|
||||||
|
/** 1#电池电流 */
|
||||||
|
@Excel(name = "1#电池电流")
|
||||||
|
@ApiModelProperty("1#电池电流")
|
||||||
|
private BigDecimal batteryCur;
|
||||||
|
|
||||||
|
/** 1#电池功率 */
|
||||||
|
@Excel(name = "1#电池功率")
|
||||||
|
@ApiModelProperty("1#电池功率")
|
||||||
|
private BigDecimal batteryPower;
|
||||||
|
|
||||||
|
/** 1#负载电压 */
|
||||||
|
@Excel(name = "1#负载电压")
|
||||||
|
@ApiModelProperty("1#负载电压")
|
||||||
|
private BigDecimal loadVolt;
|
||||||
|
|
||||||
|
/** 1#负载电流 */
|
||||||
|
@Excel(name = "1#负载电流")
|
||||||
|
@ApiModelProperty("1#负载电流")
|
||||||
|
private BigDecimal loadCur;
|
||||||
|
|
||||||
|
/** 1#负载功率 */
|
||||||
|
@Excel(name = "1#负载功率")
|
||||||
|
@ApiModelProperty("1#负载功率")
|
||||||
|
private BigDecimal loadPower;
|
||||||
|
|
||||||
|
/** 1#光伏电压 */
|
||||||
|
@Excel(name = "1#光伏电压")
|
||||||
|
@ApiModelProperty("1#光伏电压")
|
||||||
|
private BigDecimal photVolt;
|
||||||
|
|
||||||
|
/** 1#光伏电流 */
|
||||||
|
@Excel(name = "1#光伏电流")
|
||||||
|
@ApiModelProperty("1#光伏电流")
|
||||||
|
private BigDecimal photCur;
|
||||||
|
|
||||||
|
/** 1#光伏功率 */
|
||||||
|
@Excel(name = "1#光伏功率")
|
||||||
|
@ApiModelProperty("1#光伏功率")
|
||||||
|
private BigDecimal photPower;
|
||||||
|
|
||||||
|
/** 1#当日累计充电量 */
|
||||||
|
@Excel(name = "1#当日累计充电量")
|
||||||
|
@ApiModelProperty("1#当日累计充电量")
|
||||||
|
private BigDecimal cumChargeDay;
|
||||||
|
|
||||||
|
/** 1#当月累计充电量 */
|
||||||
|
@Excel(name = "1#当月累计充电量")
|
||||||
|
@ApiModelProperty("1#当月累计充电量")
|
||||||
|
private BigDecimal cumChargeMon;
|
||||||
|
|
||||||
|
/** 1#当年累积充电量 */
|
||||||
|
@Excel(name = "1#当年累积充电量")
|
||||||
|
@ApiModelProperty("1#当年累积充电量")
|
||||||
|
private BigDecimal cumChargeYear;
|
||||||
|
|
||||||
|
/** 1#总累计充电量 */
|
||||||
|
@Excel(name = "1#总累计充电量")
|
||||||
|
@ApiModelProperty("1#总累计充电量")
|
||||||
|
private BigDecimal cumChargeAll;
|
||||||
|
|
||||||
|
/** 1#当日累计用电量 */
|
||||||
|
@Excel(name = "1#当日累计用电量")
|
||||||
|
@ApiModelProperty("1#当日累计用电量")
|
||||||
|
private BigDecimal cumEleDay;
|
||||||
|
|
||||||
|
/** 1#当月累积用电量 */
|
||||||
|
@Excel(name = "1#当月累积用电量")
|
||||||
|
@ApiModelProperty("1#当月累积用电量")
|
||||||
|
private BigDecimal cumEleMon;
|
||||||
|
|
||||||
|
/** 1#当年累计用电量 */
|
||||||
|
@Excel(name = "1#当年累计用电量")
|
||||||
|
@ApiModelProperty("1#当年累计用电量")
|
||||||
|
private BigDecimal cumEleYear;
|
||||||
|
|
||||||
|
/** 1#总累积用电量 */
|
||||||
|
@Excel(name = "1#总累积用电量")
|
||||||
|
@ApiModelProperty("1#总累积用电量")
|
||||||
|
private BigDecimal cumEleAll;
|
||||||
|
|
||||||
|
/** 1#手动控制模式 */
|
||||||
|
@Excel(name = "1#手动控制模式")
|
||||||
|
@ApiModelProperty("1#手动控制模式")
|
||||||
|
private Long shoudong;
|
||||||
|
|
||||||
|
/** 1#远程通断电 */
|
||||||
|
@Excel(name = "1#远程通断电")
|
||||||
|
@ApiModelProperty("1#远程通断电")
|
||||||
|
private Long control;
|
||||||
|
|
||||||
|
/** 2#环境温度 */
|
||||||
|
@Excel(name = "2#环境温度")
|
||||||
|
@ApiModelProperty("2#环境温度")
|
||||||
|
private BigDecimal airTemp2;
|
||||||
|
|
||||||
|
/** 2#设备温度 */
|
||||||
|
@Excel(name = "2#设备温度")
|
||||||
|
@ApiModelProperty("2#设备温度")
|
||||||
|
private BigDecimal mppTemp2;
|
||||||
|
|
||||||
|
/** 2#电池电量 */
|
||||||
|
@Excel(name = "2#电池电量")
|
||||||
|
@ApiModelProperty("2#电池电量")
|
||||||
|
private Long batteryCap2;
|
||||||
|
|
||||||
|
/** 2#电池电压 */
|
||||||
|
@Excel(name = "2#电池电压")
|
||||||
|
@ApiModelProperty("2#电池电压")
|
||||||
|
private BigDecimal batteryVolt2;
|
||||||
|
|
||||||
|
/** 2#电池电流 */
|
||||||
|
@Excel(name = "2#电池电流")
|
||||||
|
@ApiModelProperty("2#电池电流")
|
||||||
|
private BigDecimal batteryCur2;
|
||||||
|
|
||||||
|
/** 2#电池功率 */
|
||||||
|
@Excel(name = "2#电池功率")
|
||||||
|
@ApiModelProperty("2#电池功率")
|
||||||
|
private BigDecimal batteryPower2;
|
||||||
|
|
||||||
|
/** 2#负载电压 */
|
||||||
|
@Excel(name = "2#负载电压")
|
||||||
|
@ApiModelProperty("2#负载电压")
|
||||||
|
private BigDecimal loadVolt2;
|
||||||
|
|
||||||
|
/** 2#负载电流 */
|
||||||
|
@Excel(name = "2#负载电流")
|
||||||
|
@ApiModelProperty("2#负载电流")
|
||||||
|
private BigDecimal loadCur2;
|
||||||
|
|
||||||
|
/** 2#负载功率 */
|
||||||
|
@Excel(name = "2#负载功率")
|
||||||
|
@ApiModelProperty("2#负载功率")
|
||||||
|
private BigDecimal loadPower2;
|
||||||
|
|
||||||
|
/** 2#光伏电压 */
|
||||||
|
@Excel(name = "2#光伏电压")
|
||||||
|
@ApiModelProperty("2#光伏电压")
|
||||||
|
private BigDecimal photVolt2;
|
||||||
|
|
||||||
|
/** 2#光伏电流 */
|
||||||
|
@Excel(name = "2#光伏电流")
|
||||||
|
@ApiModelProperty("2#光伏电流")
|
||||||
|
private BigDecimal photCur2;
|
||||||
|
|
||||||
|
/** 2#光伏功率 */
|
||||||
|
@Excel(name = "2#光伏功率")
|
||||||
|
@ApiModelProperty("2#光伏功率")
|
||||||
|
private BigDecimal photPower2;
|
||||||
|
|
||||||
|
/** 2#当日累计充电量 */
|
||||||
|
@Excel(name = "2#当日累计充电量")
|
||||||
|
@ApiModelProperty("2#当日累计充电量")
|
||||||
|
private BigDecimal cumChargeDay2;
|
||||||
|
|
||||||
|
/** 2#当月累计充电量 */
|
||||||
|
@Excel(name = "2#当月累计充电量")
|
||||||
|
@ApiModelProperty("2#当月累计充电量")
|
||||||
|
private BigDecimal cumChargeMon2;
|
||||||
|
|
||||||
|
/** 2#当年累积充电量 */
|
||||||
|
@Excel(name = "2#当年累积充电量")
|
||||||
|
@ApiModelProperty("2#当年累积充电量")
|
||||||
|
private BigDecimal cumChargeYear2;
|
||||||
|
|
||||||
|
/** 2#总累计充电量 */
|
||||||
|
@Excel(name = "2#总累计充电量")
|
||||||
|
@ApiModelProperty("2#总累计充电量")
|
||||||
|
private BigDecimal cumChargeAll2;
|
||||||
|
|
||||||
|
/** 2#当日累计用电量 */
|
||||||
|
@Excel(name = "2#当日累计用电量")
|
||||||
|
@ApiModelProperty("2#当日累计用电量")
|
||||||
|
private BigDecimal cumEleDay2;
|
||||||
|
|
||||||
|
/** 2#当年累计用电量 */
|
||||||
|
@Excel(name = "2#当年累计用电量")
|
||||||
|
@ApiModelProperty("2#当年累计用电量")
|
||||||
|
private BigDecimal cumEleYear2;
|
||||||
|
|
||||||
|
/** 2#总累积用电量 */
|
||||||
|
@Excel(name = "2#总累积用电量")
|
||||||
|
@ApiModelProperty("2#总累积用电量")
|
||||||
|
private BigDecimal cumEleAll2;
|
||||||
|
|
||||||
|
/** 2#手动控制模式 */
|
||||||
|
@Excel(name = "2#手动控制模式")
|
||||||
|
@ApiModelProperty("2#手动控制模式")
|
||||||
|
private Long shoudong2;
|
||||||
|
|
||||||
|
/** 2#远程通断电 */
|
||||||
|
@Excel(name = "2#远程通断电")
|
||||||
|
@ApiModelProperty("2#远程通断电")
|
||||||
|
private Long control2;
|
||||||
|
|
||||||
|
/** 2#当月累计用电量 */
|
||||||
|
@Excel(name = "2#当月累计用电量")
|
||||||
|
@ApiModelProperty("2#当月累计用电量")
|
||||||
|
private BigDecimal cumEleMon2;
|
||||||
|
|
||||||
|
/** 实时时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "实时时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
@ApiModelProperty("实时时间")
|
||||||
|
private Date realTime;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,63 @@
|
|||||||
|
package com.fastbee.deviceData.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.fastbee.deviceData.domain.DeviceRealtimedataMoisture;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 墒情设备实时数据Mapper接口
|
||||||
|
*
|
||||||
|
* @author kerwincui
|
||||||
|
* @date 2024-11-14
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface DeviceRealtimedataMoistureMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询墒情设备实时数据
|
||||||
|
*
|
||||||
|
* @param id 墒情设备实时数据主键
|
||||||
|
* @return 墒情设备实时数据
|
||||||
|
*/
|
||||||
|
public DeviceRealtimedataMoisture selectDeviceRealtimedataMoistureById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询墒情设备实时数据列表
|
||||||
|
*
|
||||||
|
* @param deviceRealtimedataMoisture 墒情设备实时数据
|
||||||
|
* @return 墒情设备实时数据集合
|
||||||
|
*/
|
||||||
|
public List<DeviceRealtimedataMoisture> selectDeviceRealtimedataMoistureList(DeviceRealtimedataMoisture deviceRealtimedataMoisture);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增墒情设备实时数据
|
||||||
|
*
|
||||||
|
* @param deviceRealtimedataMoisture 墒情设备实时数据
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertDeviceRealtimedataMoisture(DeviceRealtimedataMoisture deviceRealtimedataMoisture);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改墒情设备实时数据
|
||||||
|
*
|
||||||
|
* @param deviceRealtimedataMoisture 墒情设备实时数据
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateDeviceRealtimedataMoisture(DeviceRealtimedataMoisture deviceRealtimedataMoisture);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除墒情设备实时数据
|
||||||
|
*
|
||||||
|
* @param id 墒情设备实时数据主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteDeviceRealtimedataMoistureById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除墒情设备实时数据
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteDeviceRealtimedataMoistureByIds(Long[] ids);
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.fastbee.deviceData.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.fastbee.deviceData.domain.DeviceRealtimedataMoisture;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 墒情设备实时数据Service接口
|
||||||
|
*
|
||||||
|
* @author kerwincui
|
||||||
|
* @date 2024-11-14
|
||||||
|
*/
|
||||||
|
public interface IDeviceRealtimedataMoistureService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询墒情设备实时数据
|
||||||
|
*
|
||||||
|
* @param id 墒情设备实时数据主键
|
||||||
|
* @return 墒情设备实时数据
|
||||||
|
*/
|
||||||
|
public DeviceRealtimedataMoisture selectDeviceRealtimedataMoistureById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询墒情设备实时数据列表
|
||||||
|
*
|
||||||
|
* @param deviceRealtimedataMoisture 墒情设备实时数据
|
||||||
|
* @return 墒情设备实时数据集合
|
||||||
|
*/
|
||||||
|
public List<DeviceRealtimedataMoisture> selectDeviceRealtimedataMoistureList(DeviceRealtimedataMoisture deviceRealtimedataMoisture);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增墒情设备实时数据
|
||||||
|
*
|
||||||
|
* @param deviceRealtimedataMoisture 墒情设备实时数据
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertDeviceRealtimedataMoisture(DeviceRealtimedataMoisture deviceRealtimedataMoisture);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改墒情设备实时数据
|
||||||
|
*
|
||||||
|
* @param deviceRealtimedataMoisture 墒情设备实时数据
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateDeviceRealtimedataMoisture(DeviceRealtimedataMoisture deviceRealtimedataMoisture);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除墒情设备实时数据
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的墒情设备实时数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteDeviceRealtimedataMoistureByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除墒情设备实时数据信息
|
||||||
|
*
|
||||||
|
* @param id 墒情设备实时数据主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteDeviceRealtimedataMoistureById(Long id);
|
||||||
|
}
|
@ -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.DeviceRealtimedataMoistureMapper;
|
||||||
|
import com.fastbee.deviceData.domain.DeviceRealtimedataMoisture;
|
||||||
|
import com.fastbee.deviceData.service.IDeviceRealtimedataMoistureService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 墒情设备实时数据Service业务层处理
|
||||||
|
*
|
||||||
|
* @author kerwincui
|
||||||
|
* @date 2024-11-14
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class DeviceRealtimedataMoistureServiceImpl implements IDeviceRealtimedataMoistureService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private DeviceRealtimedataMoistureMapper deviceRealtimedataMoistureMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询墒情设备实时数据
|
||||||
|
*
|
||||||
|
* @param id 墒情设备实时数据主键
|
||||||
|
* @return 墒情设备实时数据
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public DeviceRealtimedataMoisture selectDeviceRealtimedataMoistureById(Long id)
|
||||||
|
{
|
||||||
|
return deviceRealtimedataMoistureMapper.selectDeviceRealtimedataMoistureById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询墒情设备实时数据列表
|
||||||
|
*
|
||||||
|
* @param deviceRealtimedataMoisture 墒情设备实时数据
|
||||||
|
* @return 墒情设备实时数据
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<DeviceRealtimedataMoisture> selectDeviceRealtimedataMoistureList(DeviceRealtimedataMoisture deviceRealtimedataMoisture)
|
||||||
|
{
|
||||||
|
return deviceRealtimedataMoistureMapper.selectDeviceRealtimedataMoistureList(deviceRealtimedataMoisture);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增墒情设备实时数据
|
||||||
|
*
|
||||||
|
* @param deviceRealtimedataMoisture 墒情设备实时数据
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertDeviceRealtimedataMoisture(DeviceRealtimedataMoisture deviceRealtimedataMoisture)
|
||||||
|
{
|
||||||
|
deviceRealtimedataMoisture.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return deviceRealtimedataMoistureMapper.insertDeviceRealtimedataMoisture(deviceRealtimedataMoisture);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改墒情设备实时数据
|
||||||
|
*
|
||||||
|
* @param deviceRealtimedataMoisture 墒情设备实时数据
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateDeviceRealtimedataMoisture(DeviceRealtimedataMoisture deviceRealtimedataMoisture)
|
||||||
|
{
|
||||||
|
return deviceRealtimedataMoistureMapper.updateDeviceRealtimedataMoisture(deviceRealtimedataMoisture);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除墒情设备实时数据
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的墒情设备实时数据主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteDeviceRealtimedataMoistureByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return deviceRealtimedataMoistureMapper.deleteDeviceRealtimedataMoistureByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除墒情设备实时数据信息
|
||||||
|
*
|
||||||
|
* @param id 墒情设备实时数据主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteDeviceRealtimedataMoistureById(Long id)
|
||||||
|
{
|
||||||
|
return deviceRealtimedataMoistureMapper.deleteDeviceRealtimedataMoistureById(id);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,285 @@
|
|||||||
|
<?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.DeviceRealtimedataMoistureMapper">
|
||||||
|
|
||||||
|
<resultMap type="DeviceRealtimedataMoisture" id="DeviceRealtimedataMoistureResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="deviceId" column="device_id" />
|
||||||
|
<result property="airTemp" column="air_temp" />
|
||||||
|
<result property="mppTemp" column="mpp_temp" />
|
||||||
|
<result property="batteryCap" column="battery_cap" />
|
||||||
|
<result property="batteryVolt" column="battery_volt" />
|
||||||
|
<result property="batteryCur" column="battery_cur" />
|
||||||
|
<result property="batteryPower" column="battery_power" />
|
||||||
|
<result property="loadVolt" column="load_volt" />
|
||||||
|
<result property="loadCur" column="load_cur" />
|
||||||
|
<result property="loadPower" column="load_power" />
|
||||||
|
<result property="photVolt" column="phot_volt" />
|
||||||
|
<result property="photCur" column="phot_cur" />
|
||||||
|
<result property="photPower" column="phot_power" />
|
||||||
|
<result property="cumChargeDay" column="cum_charge_day" />
|
||||||
|
<result property="cumChargeMon" column="cum_charge_mon" />
|
||||||
|
<result property="cumChargeYear" column="cum_charge_year" />
|
||||||
|
<result property="cumChargeAll" column="cum_charge_all" />
|
||||||
|
<result property="cumEleDay" column="cum_ele_day" />
|
||||||
|
<result property="cumEleMon" column="cum_ele_mon" />
|
||||||
|
<result property="cumEleYear" column="cum_ele_year" />
|
||||||
|
<result property="cumEleAll" column="cum_ele_all" />
|
||||||
|
<result property="shoudong" column="shoudong" />
|
||||||
|
<result property="control" column="control" />
|
||||||
|
<result property="airTemp2" column="air_temp_2" />
|
||||||
|
<result property="mppTemp2" column="mpp_temp_2" />
|
||||||
|
<result property="batteryCap2" column="battery_cap_2" />
|
||||||
|
<result property="batteryVolt2" column="battery_volt_2" />
|
||||||
|
<result property="batteryCur2" column="battery_cur_2" />
|
||||||
|
<result property="batteryPower2" column="battery_power_2" />
|
||||||
|
<result property="loadVolt2" column="load_volt_2" />
|
||||||
|
<result property="loadCur2" column="load_cur_2" />
|
||||||
|
<result property="loadPower2" column="load_power_2" />
|
||||||
|
<result property="photVolt2" column="phot_volt_2" />
|
||||||
|
<result property="photCur2" column="phot_cur_2" />
|
||||||
|
<result property="photPower2" column="phot_power_2" />
|
||||||
|
<result property="cumChargeDay2" column="cum_charge_day_2" />
|
||||||
|
<result property="cumChargeMon2" column="cum_charge_mon_2" />
|
||||||
|
<result property="cumChargeYear2" column="cum_charge_year_2" />
|
||||||
|
<result property="cumChargeAll2" column="cum_charge_all_2" />
|
||||||
|
<result property="cumEleDay2" column="cum_ele_day_2" />
|
||||||
|
<result property="cumEleYear2" column="cum_ele_year_2" />
|
||||||
|
<result property="cumEleAll2" column="cum_ele_all_2" />
|
||||||
|
<result property="shoudong2" column="shoudong_2" />
|
||||||
|
<result property="control2" column="control_2" />
|
||||||
|
<result property="cumEleMon2" column="cum_ele_mon_2" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="realTime" column="real_time" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectDeviceRealtimedataMoistureVo">
|
||||||
|
select id, device_id, air_temp, mpp_temp, battery_cap, battery_volt, battery_cur, battery_power, load_volt, load_cur, load_power, phot_volt, phot_cur, phot_power, cum_charge_day, cum_charge_mon, cum_charge_year, cum_charge_all, cum_ele_day, cum_ele_mon, cum_ele_year, cum_ele_all, shoudong, control, air_temp_2, mpp_temp_2, battery_cap_2, battery_volt_2, battery_cur_2, battery_power_2, load_volt_2, load_cur_2, load_power_2, phot_volt_2, phot_cur_2, phot_power_2, cum_charge_day_2, cum_charge_mon_2, cum_charge_year_2, cum_charge_all_2, cum_ele_day_2, cum_ele_year_2, cum_ele_all_2, shoudong_2, control_2, cum_ele_mon_2, create_time, real_time from iot_device_realtimedata_moisture
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectDeviceRealtimedataMoistureList" parameterType="DeviceRealtimedataMoisture" resultMap="DeviceRealtimedataMoistureResult">
|
||||||
|
<include refid="selectDeviceRealtimedataMoistureVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="deviceId != null "> and device_id = #{deviceId}</if>
|
||||||
|
<if test="airTemp != null "> and air_temp = #{airTemp}</if>
|
||||||
|
<if test="mppTemp != null "> and mpp_temp = #{mppTemp}</if>
|
||||||
|
<if test="batteryCap != null "> and battery_cap = #{batteryCap}</if>
|
||||||
|
<if test="batteryVolt != null "> and battery_volt = #{batteryVolt}</if>
|
||||||
|
<if test="batteryCur != null "> and battery_cur = #{batteryCur}</if>
|
||||||
|
<if test="batteryPower != null "> and battery_power = #{batteryPower}</if>
|
||||||
|
<if test="loadVolt != null "> and load_volt = #{loadVolt}</if>
|
||||||
|
<if test="loadCur != null "> and load_cur = #{loadCur}</if>
|
||||||
|
<if test="loadPower != null "> and load_power = #{loadPower}</if>
|
||||||
|
<if test="photVolt != null "> and phot_volt = #{photVolt}</if>
|
||||||
|
<if test="photCur != null "> and phot_cur = #{photCur}</if>
|
||||||
|
<if test="photPower != null "> and phot_power = #{photPower}</if>
|
||||||
|
<if test="cumChargeDay != null "> and cum_charge_day = #{cumChargeDay}</if>
|
||||||
|
<if test="cumChargeMon != null "> and cum_charge_mon = #{cumChargeMon}</if>
|
||||||
|
<if test="cumChargeYear != null "> and cum_charge_year = #{cumChargeYear}</if>
|
||||||
|
<if test="cumChargeAll != null "> and cum_charge_all = #{cumChargeAll}</if>
|
||||||
|
<if test="cumEleDay != null "> and cum_ele_day = #{cumEleDay}</if>
|
||||||
|
<if test="cumEleMon != null "> and cum_ele_mon = #{cumEleMon}</if>
|
||||||
|
<if test="cumEleYear != null "> and cum_ele_year = #{cumEleYear}</if>
|
||||||
|
<if test="cumEleAll != null "> and cum_ele_all = #{cumEleAll}</if>
|
||||||
|
<if test="shoudong != null "> and shoudong = #{shoudong}</if>
|
||||||
|
<if test="control != null "> and control = #{control}</if>
|
||||||
|
<if test="airTemp2 != null "> and air_temp_2 = #{airTemp2}</if>
|
||||||
|
<if test="mppTemp2 != null "> and mpp_temp_2 = #{mppTemp2}</if>
|
||||||
|
<if test="batteryCap2 != null "> and battery_cap_2 = #{batteryCap2}</if>
|
||||||
|
<if test="batteryVolt2 != null "> and battery_volt_2 = #{batteryVolt2}</if>
|
||||||
|
<if test="batteryCur2 != null "> and battery_cur_2 = #{batteryCur2}</if>
|
||||||
|
<if test="batteryPower2 != null "> and battery_power_2 = #{batteryPower2}</if>
|
||||||
|
<if test="loadVolt2 != null "> and load_volt_2 = #{loadVolt2}</if>
|
||||||
|
<if test="loadCur2 != null "> and load_cur_2 = #{loadCur2}</if>
|
||||||
|
<if test="loadPower2 != null "> and load_power_2 = #{loadPower2}</if>
|
||||||
|
<if test="photVolt2 != null "> and phot_volt_2 = #{photVolt2}</if>
|
||||||
|
<if test="photCur2 != null "> and phot_cur_2 = #{photCur2}</if>
|
||||||
|
<if test="photPower2 != null "> and phot_power_2 = #{photPower2}</if>
|
||||||
|
<if test="cumChargeDay2 != null "> and cum_charge_day_2 = #{cumChargeDay2}</if>
|
||||||
|
<if test="cumChargeMon2 != null "> and cum_charge_mon_2 = #{cumChargeMon2}</if>
|
||||||
|
<if test="cumChargeYear2 != null "> and cum_charge_year_2 = #{cumChargeYear2}</if>
|
||||||
|
<if test="cumChargeAll2 != null "> and cum_charge_all_2 = #{cumChargeAll2}</if>
|
||||||
|
<if test="cumEleDay2 != null "> and cum_ele_day_2 = #{cumEleDay2}</if>
|
||||||
|
<if test="cumEleYear2 != null "> and cum_ele_year_2 = #{cumEleYear2}</if>
|
||||||
|
<if test="cumEleAll2 != null "> and cum_ele_all_2 = #{cumEleAll2}</if>
|
||||||
|
<if test="shoudong2 != null "> and shoudong_2 = #{shoudong2}</if>
|
||||||
|
<if test="control2 != null "> and control_2 = #{control2}</if>
|
||||||
|
<if test="cumEleMon2 != null "> and cum_ele_mon_2 = #{cumEleMon2}</if>
|
||||||
|
<if test="realTime != null "> and real_time = #{realTime}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectDeviceRealtimedataMoistureById" parameterType="Long" resultMap="DeviceRealtimedataMoistureResult">
|
||||||
|
<include refid="selectDeviceRealtimedataMoistureVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertDeviceRealtimedataMoisture" parameterType="DeviceRealtimedataMoisture" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into iot_device_realtimedata_moisture
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="deviceId != null">device_id,</if>
|
||||||
|
<if test="airTemp != null">air_temp,</if>
|
||||||
|
<if test="mppTemp != null">mpp_temp,</if>
|
||||||
|
<if test="batteryCap != null">battery_cap,</if>
|
||||||
|
<if test="batteryVolt != null">battery_volt,</if>
|
||||||
|
<if test="batteryCur != null">battery_cur,</if>
|
||||||
|
<if test="batteryPower != null">battery_power,</if>
|
||||||
|
<if test="loadVolt != null">load_volt,</if>
|
||||||
|
<if test="loadCur != null">load_cur,</if>
|
||||||
|
<if test="loadPower != null">load_power,</if>
|
||||||
|
<if test="photVolt != null">phot_volt,</if>
|
||||||
|
<if test="photCur != null">phot_cur,</if>
|
||||||
|
<if test="photPower != null">phot_power,</if>
|
||||||
|
<if test="cumChargeDay != null">cum_charge_day,</if>
|
||||||
|
<if test="cumChargeMon != null">cum_charge_mon,</if>
|
||||||
|
<if test="cumChargeYear != null">cum_charge_year,</if>
|
||||||
|
<if test="cumChargeAll != null">cum_charge_all,</if>
|
||||||
|
<if test="cumEleDay != null">cum_ele_day,</if>
|
||||||
|
<if test="cumEleMon != null">cum_ele_mon,</if>
|
||||||
|
<if test="cumEleYear != null">cum_ele_year,</if>
|
||||||
|
<if test="cumEleAll != null">cum_ele_all,</if>
|
||||||
|
<if test="shoudong != null">shoudong,</if>
|
||||||
|
<if test="control != null">control,</if>
|
||||||
|
<if test="airTemp2 != null">air_temp_2,</if>
|
||||||
|
<if test="mppTemp2 != null">mpp_temp_2,</if>
|
||||||
|
<if test="batteryCap2 != null">battery_cap_2,</if>
|
||||||
|
<if test="batteryVolt2 != null">battery_volt_2,</if>
|
||||||
|
<if test="batteryCur2 != null">battery_cur_2,</if>
|
||||||
|
<if test="batteryPower2 != null">battery_power_2,</if>
|
||||||
|
<if test="loadVolt2 != null">load_volt_2,</if>
|
||||||
|
<if test="loadCur2 != null">load_cur_2,</if>
|
||||||
|
<if test="loadPower2 != null">load_power_2,</if>
|
||||||
|
<if test="photVolt2 != null">phot_volt_2,</if>
|
||||||
|
<if test="photCur2 != null">phot_cur_2,</if>
|
||||||
|
<if test="photPower2 != null">phot_power_2,</if>
|
||||||
|
<if test="cumChargeDay2 != null">cum_charge_day_2,</if>
|
||||||
|
<if test="cumChargeMon2 != null">cum_charge_mon_2,</if>
|
||||||
|
<if test="cumChargeYear2 != null">cum_charge_year_2,</if>
|
||||||
|
<if test="cumChargeAll2 != null">cum_charge_all_2,</if>
|
||||||
|
<if test="cumEleDay2 != null">cum_ele_day_2,</if>
|
||||||
|
<if test="cumEleYear2 != null">cum_ele_year_2,</if>
|
||||||
|
<if test="cumEleAll2 != null">cum_ele_all_2,</if>
|
||||||
|
<if test="shoudong2 != null">shoudong_2,</if>
|
||||||
|
<if test="control2 != null">control_2,</if>
|
||||||
|
<if test="cumEleMon2 != null">cum_ele_mon_2,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="realTime != null">real_time,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="deviceId != null">#{deviceId},</if>
|
||||||
|
<if test="airTemp != null">#{airTemp},</if>
|
||||||
|
<if test="mppTemp != null">#{mppTemp},</if>
|
||||||
|
<if test="batteryCap != null">#{batteryCap},</if>
|
||||||
|
<if test="batteryVolt != null">#{batteryVolt},</if>
|
||||||
|
<if test="batteryCur != null">#{batteryCur},</if>
|
||||||
|
<if test="batteryPower != null">#{batteryPower},</if>
|
||||||
|
<if test="loadVolt != null">#{loadVolt},</if>
|
||||||
|
<if test="loadCur != null">#{loadCur},</if>
|
||||||
|
<if test="loadPower != null">#{loadPower},</if>
|
||||||
|
<if test="photVolt != null">#{photVolt},</if>
|
||||||
|
<if test="photCur != null">#{photCur},</if>
|
||||||
|
<if test="photPower != null">#{photPower},</if>
|
||||||
|
<if test="cumChargeDay != null">#{cumChargeDay},</if>
|
||||||
|
<if test="cumChargeMon != null">#{cumChargeMon},</if>
|
||||||
|
<if test="cumChargeYear != null">#{cumChargeYear},</if>
|
||||||
|
<if test="cumChargeAll != null">#{cumChargeAll},</if>
|
||||||
|
<if test="cumEleDay != null">#{cumEleDay},</if>
|
||||||
|
<if test="cumEleMon != null">#{cumEleMon},</if>
|
||||||
|
<if test="cumEleYear != null">#{cumEleYear},</if>
|
||||||
|
<if test="cumEleAll != null">#{cumEleAll},</if>
|
||||||
|
<if test="shoudong != null">#{shoudong},</if>
|
||||||
|
<if test="control != null">#{control},</if>
|
||||||
|
<if test="airTemp2 != null">#{airTemp2},</if>
|
||||||
|
<if test="mppTemp2 != null">#{mppTemp2},</if>
|
||||||
|
<if test="batteryCap2 != null">#{batteryCap2},</if>
|
||||||
|
<if test="batteryVolt2 != null">#{batteryVolt2},</if>
|
||||||
|
<if test="batteryCur2 != null">#{batteryCur2},</if>
|
||||||
|
<if test="batteryPower2 != null">#{batteryPower2},</if>
|
||||||
|
<if test="loadVolt2 != null">#{loadVolt2},</if>
|
||||||
|
<if test="loadCur2 != null">#{loadCur2},</if>
|
||||||
|
<if test="loadPower2 != null">#{loadPower2},</if>
|
||||||
|
<if test="photVolt2 != null">#{photVolt2},</if>
|
||||||
|
<if test="photCur2 != null">#{photCur2},</if>
|
||||||
|
<if test="photPower2 != null">#{photPower2},</if>
|
||||||
|
<if test="cumChargeDay2 != null">#{cumChargeDay2},</if>
|
||||||
|
<if test="cumChargeMon2 != null">#{cumChargeMon2},</if>
|
||||||
|
<if test="cumChargeYear2 != null">#{cumChargeYear2},</if>
|
||||||
|
<if test="cumChargeAll2 != null">#{cumChargeAll2},</if>
|
||||||
|
<if test="cumEleDay2 != null">#{cumEleDay2},</if>
|
||||||
|
<if test="cumEleYear2 != null">#{cumEleYear2},</if>
|
||||||
|
<if test="cumEleAll2 != null">#{cumEleAll2},</if>
|
||||||
|
<if test="shoudong2 != null">#{shoudong2},</if>
|
||||||
|
<if test="control2 != null">#{control2},</if>
|
||||||
|
<if test="cumEleMon2 != null">#{cumEleMon2},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="realTime != null">#{realTime},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateDeviceRealtimedataMoisture" parameterType="DeviceRealtimedataMoisture">
|
||||||
|
update iot_device_realtimedata_moisture
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="deviceId != null">device_id = #{deviceId},</if>
|
||||||
|
<if test="airTemp != null">air_temp = #{airTemp},</if>
|
||||||
|
<if test="mppTemp != null">mpp_temp = #{mppTemp},</if>
|
||||||
|
<if test="batteryCap != null">battery_cap = #{batteryCap},</if>
|
||||||
|
<if test="batteryVolt != null">battery_volt = #{batteryVolt},</if>
|
||||||
|
<if test="batteryCur != null">battery_cur = #{batteryCur},</if>
|
||||||
|
<if test="batteryPower != null">battery_power = #{batteryPower},</if>
|
||||||
|
<if test="loadVolt != null">load_volt = #{loadVolt},</if>
|
||||||
|
<if test="loadCur != null">load_cur = #{loadCur},</if>
|
||||||
|
<if test="loadPower != null">load_power = #{loadPower},</if>
|
||||||
|
<if test="photVolt != null">phot_volt = #{photVolt},</if>
|
||||||
|
<if test="photCur != null">phot_cur = #{photCur},</if>
|
||||||
|
<if test="photPower != null">phot_power = #{photPower},</if>
|
||||||
|
<if test="cumChargeDay != null">cum_charge_day = #{cumChargeDay},</if>
|
||||||
|
<if test="cumChargeMon != null">cum_charge_mon = #{cumChargeMon},</if>
|
||||||
|
<if test="cumChargeYear != null">cum_charge_year = #{cumChargeYear},</if>
|
||||||
|
<if test="cumChargeAll != null">cum_charge_all = #{cumChargeAll},</if>
|
||||||
|
<if test="cumEleDay != null">cum_ele_day = #{cumEleDay},</if>
|
||||||
|
<if test="cumEleMon != null">cum_ele_mon = #{cumEleMon},</if>
|
||||||
|
<if test="cumEleYear != null">cum_ele_year = #{cumEleYear},</if>
|
||||||
|
<if test="cumEleAll != null">cum_ele_all = #{cumEleAll},</if>
|
||||||
|
<if test="shoudong != null">shoudong = #{shoudong},</if>
|
||||||
|
<if test="control != null">control = #{control},</if>
|
||||||
|
<if test="airTemp2 != null">air_temp_2 = #{airTemp2},</if>
|
||||||
|
<if test="mppTemp2 != null">mpp_temp_2 = #{mppTemp2},</if>
|
||||||
|
<if test="batteryCap2 != null">battery_cap_2 = #{batteryCap2},</if>
|
||||||
|
<if test="batteryVolt2 != null">battery_volt_2 = #{batteryVolt2},</if>
|
||||||
|
<if test="batteryCur2 != null">battery_cur_2 = #{batteryCur2},</if>
|
||||||
|
<if test="batteryPower2 != null">battery_power_2 = #{batteryPower2},</if>
|
||||||
|
<if test="loadVolt2 != null">load_volt_2 = #{loadVolt2},</if>
|
||||||
|
<if test="loadCur2 != null">load_cur_2 = #{loadCur2},</if>
|
||||||
|
<if test="loadPower2 != null">load_power_2 = #{loadPower2},</if>
|
||||||
|
<if test="photVolt2 != null">phot_volt_2 = #{photVolt2},</if>
|
||||||
|
<if test="photCur2 != null">phot_cur_2 = #{photCur2},</if>
|
||||||
|
<if test="photPower2 != null">phot_power_2 = #{photPower2},</if>
|
||||||
|
<if test="cumChargeDay2 != null">cum_charge_day_2 = #{cumChargeDay2},</if>
|
||||||
|
<if test="cumChargeMon2 != null">cum_charge_mon_2 = #{cumChargeMon2},</if>
|
||||||
|
<if test="cumChargeYear2 != null">cum_charge_year_2 = #{cumChargeYear2},</if>
|
||||||
|
<if test="cumChargeAll2 != null">cum_charge_all_2 = #{cumChargeAll2},</if>
|
||||||
|
<if test="cumEleDay2 != null">cum_ele_day_2 = #{cumEleDay2},</if>
|
||||||
|
<if test="cumEleYear2 != null">cum_ele_year_2 = #{cumEleYear2},</if>
|
||||||
|
<if test="cumEleAll2 != null">cum_ele_all_2 = #{cumEleAll2},</if>
|
||||||
|
<if test="shoudong2 != null">shoudong_2 = #{shoudong2},</if>
|
||||||
|
<if test="control2 != null">control_2 = #{control2},</if>
|
||||||
|
<if test="cumEleMon2 != null">cum_ele_mon_2 = #{cumEleMon2},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="realTime != null">real_time = #{realTime},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteDeviceRealtimedataMoistureById" parameterType="Long">
|
||||||
|
delete from iot_device_realtimedata_moisture where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteDeviceRealtimedataMoistureByIds" parameterType="String">
|
||||||
|
delete from iot_device_realtimedata_moisture where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
Loading…
x
Reference in New Issue
Block a user