package cn.iocoder.yudao.module.mes.dal.dataobject.em.record; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import com.baomidou.mybatisplus.annotation.KeySequence; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.*; import java.math.BigDecimal; import java.time.LocalDate; /** * MES 能耗抄表记录 DO * * 记录保存时会把计量点的名称、车间/产线/设备信息冗余进来,作为历史快照, * 后续主数据改名不会影响历史报表。 * * @author 超级管理员 */ @TableName("mes_em_record") @KeySequence("mes_em_record_seq") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) @Builder @NoArgsConstructor @AllArgsConstructor public class MesEmRecordDO extends BaseDO { /** * 编号 */ @TableId private Long id; /** * 计量点编号 */ private Long meterId; /** * 计量点编码 */ private String meterCode; /** * 计量点名称 */ private String meterName; /** * 能源类型 * * 枚举 {@link cn.iocoder.yudao.module.mes.enums.em.MesEmEnergyTypeEnum} */ private Integer energyType; /** * 计量单位 */ private String unit; /** * 倍率 */ private BigDecimal ratio; /** * 折标煤系数(kgce/计量单位) */ private BigDecimal coalFactor; /** * 所属车间编号 */ private Long workshopId; /** * 所属车间名称 */ private String workshopName; /** * 所属产线编号 */ private Long lineId; /** * 所属产线名称 */ private String lineName; /** * 关联设备编号 */ private Long machineryId; /** * 关联设备名称 */ private String machineryName; /** * 抄表日期 */ private LocalDate recordDate; /** * 期初读数 */ private BigDecimal prevReading; /** * 期末读数 */ private BigDecimal reading; /** * 实际用量((期末读数 - 期初读数) × 倍率) */ private BigDecimal usageAmount; /** * 单价(元/计量单位) */ private BigDecimal price; /** * 费用(元) */ private BigDecimal cost; /** * 数据来源 * * 枚举 {@link cn.iocoder.yudao.module.mes.enums.em.MesEmRecordSourceEnum} */ private Integer source; /** * 备注 */ private String remark; }