0
0

设备充放电记录

This commit is contained in:
2025-08-30 09:39:41 +08:00
parent d66fb7d2c2
commit c2ce9679c4
9 changed files with 690 additions and 0 deletions

View File

@ -0,0 +1,108 @@
package com.fuyuanshen.equipment.domain;
import com.fuyuanshen.common.tenant.core.TenantEntity;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serial;
/**
* 设备充放电记录对象 device_charge_discharge
*
* @author Lion Li
* @date 2025-08-30
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("device_charge_discharge")
public class DeviceChargeDischarge extends TenantEntity {
@Serial
private static final long serialVersionUID = 1L;
/**
* 记录唯一标识
*/
@TableId(value = "id")
private Long id;
/**
* 设备唯一标识
*/
private String deviceId;
/**
* 操作类型: 0 charge-充电, 1 discharge-放电
*/
private Long operationType;
/**
* 开始时间
*/
private Date startTime;
/**
* 结束时间
*/
private Date endTime;
/**
* 起始电量百分比(0-100)
*/
private Long initialSoc;
/**
* 结束电量百分比(0-100)
*/
private Long finalSoc;
/**
* 充放电量(kWh)
*/
private Long energyKwh;
/**
* 设备额定功率(kW)
*/
private Long powerRating;
/**
* 电压(V)
*/
private Long voltage;
/**
* 电流(A)
*/
private Long current;
/**
* 温度(℃)
*/
private Long temperature;
/**
* 当前状态
*/
private Long status;
/**
* 错误代码
*/
private String errorCode;
/**
* 记录创建时间
*/
private Date createdAt;
/**
* 记录更新时间
*/
private Date updatedAt;
}

View File

@ -0,0 +1,110 @@
package com.fuyuanshen.equipment.domain.bo;
import com.fuyuanshen.common.core.validate.AddGroup;
import com.fuyuanshen.common.core.validate.EditGroup;
import com.fuyuanshen.equipment.domain.DeviceChargeDischarge;
import com.fuyuanshen.common.mybatis.core.domain.BaseEntity;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
/**
* 设备充放电记录业务对象 device_charge_discharge
*
* @author Lion Li
* @date 2025-08-30
*/
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = DeviceChargeDischarge.class, reverseConvertGenerate = false)
public class DeviceChargeDischargeBo extends BaseEntity {
/**
* 记录唯一标识
*/
@NotNull(message = "记录唯一标识不能为空", groups = { EditGroup.class })
private Long id;
/**
* 设备唯一标识
*/
@NotBlank(message = "设备唯一标识不能为空", groups = { AddGroup.class, EditGroup.class })
private String deviceId;
/**
* 操作类型: 0 charge-充电, 1 discharge-放电
*/
@NotNull(message = "操作类型: 0 charge-充电, 1 discharge-放电不能为空", groups = { AddGroup.class, EditGroup.class })
private Long operationType;
/**
* 开始时间
*/
@NotNull(message = "开始时间不能为空", groups = { AddGroup.class, EditGroup.class })
private Date startTime;
/**
* 结束时间
*/
private Date endTime;
/**
* 起始电量百分比(0-100)
*/
private Long initialSoc;
/**
* 结束电量百分比(0-100)
*/
private Long finalSoc;
/**
* 充放电量(kWh)
*/
private Long energyKwh;
/**
* 设备额定功率(kW)
*/
private Long powerRating;
/**
* 电压(V)
*/
private Long voltage;
/**
* 电流(A)
*/
private Long current;
/**
* 温度(℃)
*/
private Long temperature;
/**
* 当前状态
*/
private Long status;
/**
* 错误代码
*/
private String errorCode;
/**
* 记录创建时间
*/
private Date createdAt;
/**
* 记录更新时间
*/
private Date updatedAt;
}

View File

@ -0,0 +1,130 @@
package com.fuyuanshen.equipment.domain.vo;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fuyuanshen.equipment.domain.DeviceChargeDischarge;
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import com.fuyuanshen.common.excel.annotation.ExcelDictFormat;
import com.fuyuanshen.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
/**
* 设备充放电记录视图对象 device_charge_discharge
*
* @author Lion Li
* @date 2025-08-30
*/
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = DeviceChargeDischarge.class)
public class DeviceChargeDischargeVo implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 记录唯一标识
*/
@ExcelProperty(value = "记录唯一标识")
private Long id;
/**
* 设备唯一标识
*/
@ExcelProperty(value = "设备唯一标识")
private String deviceId;
/**
* 操作类型: 0 charge-充电, 1 discharge-放电
*/
@ExcelProperty(value = "操作类型: 0 charge-充电, 1 discharge-放电")
private Long operationType;
/**
* 开始时间
*/
@ExcelProperty(value = "开始时间")
private Date startTime;
/**
* 结束时间
*/
@ExcelProperty(value = "结束时间")
private Date endTime;
/**
* 起始电量百分比(0-100)
*/
@ExcelProperty(value = "起始电量百分比(0-100)")
private Long initialSoc;
/**
* 结束电量百分比(0-100)
*/
@ExcelProperty(value = "结束电量百分比(0-100)")
private Long finalSoc;
/**
* 充放电量(kWh)
*/
@ExcelProperty(value = "充放电量(kWh)")
private Long energyKwh;
/**
* 设备额定功率(kW)
*/
@ExcelProperty(value = "设备额定功率(kW)")
private Long powerRating;
/**
* 电压(V)
*/
@ExcelProperty(value = "电压(V)")
private Long voltage;
/**
* 电流(A)
*/
@ExcelProperty(value = "电流(A)")
private Long current;
/**
* 温度(℃)
*/
@ExcelProperty(value = "温度(℃)")
private Long temperature;
/**
* 当前状态
*/
@ExcelProperty(value = "当前状态")
private Long status;
/**
* 错误代码
*/
@ExcelProperty(value = "错误代码")
private String errorCode;
/**
* 记录创建时间
*/
@ExcelProperty(value = "记录创建时间")
private Date createdAt;
/**
* 记录更新时间
*/
@ExcelProperty(value = "记录更新时间")
private Date updatedAt;
}