feat(energy-record): 新增能源消耗记录的时间范围查询和设备信息关联功能
- 在 EmsEnergyRecordBo 中添加 recordStartDate、recordEndDate 用于时间范围筛选 - 添加 meterCode、energyName、model、manufacturer、meterStatus 等模糊查询字段 - 集成 DateTimeFormat 注解支持日期格式化 - 在 EmsEnergyRecordMapper 中新增 selectVoPagePlus 方法实现关联查询 - 通过 XML 配置实现能源记录与计量表、能源类型的左连接查询 - 在 EmsEnergyRecordServiceImpl 中重构查询逻辑支持多表关联和时间段筛选 - 在 EmsEnergyRecordVo 中扩展表计和能源相关展示字段
This commit is contained in:
@@ -8,6 +8,7 @@ import javax.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* 能源消耗记录业务对象 ems_energy_record
|
||||
@@ -45,6 +46,19 @@ public class EmsEnergyRecordBo extends BaseEntity {
|
||||
*/
|
||||
private Date recordDate;
|
||||
|
||||
/**
|
||||
* 统计日期开始时间(yyyy-MM-dd,不含时分秒)
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date recordStartDate;
|
||||
|
||||
/**
|
||||
* 统计日期结束时间(yyyy-MM-dd,不含时分秒)
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date recordEndDate;
|
||||
/**
|
||||
* 记录人ID
|
||||
*/
|
||||
@@ -55,5 +69,29 @@ public class EmsEnergyRecordBo extends BaseEntity {
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 表计编号(模糊查询)
|
||||
*/
|
||||
private String meterCode;
|
||||
|
||||
/**
|
||||
* 能源名称(模糊查询)
|
||||
*/
|
||||
private String energyName;
|
||||
|
||||
/**
|
||||
* 设备型号(模糊查询)
|
||||
*/
|
||||
private String model;
|
||||
|
||||
/**
|
||||
* 制造商(模糊查询)
|
||||
*/
|
||||
private String manufacturer;
|
||||
|
||||
/**
|
||||
* 设备状态:0=在用,1=停用,2=维护
|
||||
*/
|
||||
private Integer meterStatus;
|
||||
|
||||
}
|
||||
|
||||
@@ -67,5 +67,46 @@ public class EmsEnergyRecordVo {
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 表计编号
|
||||
*/
|
||||
private String meterCode;
|
||||
|
||||
/**
|
||||
* 设备型号
|
||||
*/
|
||||
private String meterModel;
|
||||
|
||||
/**
|
||||
* 制造商
|
||||
*/
|
||||
private String meterManufacturer;
|
||||
|
||||
/**
|
||||
* 设备状态:0=在用,1=停用,2=维护
|
||||
*/
|
||||
private Integer meterStatus;
|
||||
|
||||
|
||||
/**
|
||||
* 能源名称
|
||||
*/
|
||||
private String energyName;
|
||||
|
||||
|
||||
/**
|
||||
* 能源单位
|
||||
*/
|
||||
private String energyUnit;
|
||||
|
||||
/**
|
||||
* 能源编号
|
||||
*/
|
||||
private String energyCode;
|
||||
|
||||
/**
|
||||
* 能源描述
|
||||
*/
|
||||
private String energyDescription;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user