mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 15:55:18 +08:00
优化
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
package cn.lihongjie.coal.meterLog.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
import cn.lihongjie.coal.common.DictCode;
|
||||
import cn.lihongjie.coal.meter.dto.MeterDto;
|
||||
import cn.lihongjie.coal.pojoProcessor.DictTranslate;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -29,6 +31,6 @@ public class MeterLogDto extends OrgCommonDto {
|
||||
@Comment("归档状态")
|
||||
private String archiveStatus = "0";
|
||||
|
||||
|
||||
@DictTranslate(dictKey = DictCode.ARCHIVESTATUS)
|
||||
private String archiveStatusName;
|
||||
}
|
||||
|
||||
@@ -28,14 +28,7 @@ public class MeterLogEntity extends OrgCommonEntity {
|
||||
@ColumnDefault("'0'")
|
||||
private String archiveStatus = "0";
|
||||
|
||||
@Formula(
|
||||
"(select i.name\n"
|
||||
+ "from t_dictionary d,\n"
|
||||
+ " t_dictionary_item i\n"
|
||||
+ "where d.id = i.dictionary_id\n"
|
||||
+ " and d.code = 'archiveStatus'\n"
|
||||
+ " and i.code = archive_status)")
|
||||
private String archiveStatusName;
|
||||
|
||||
|
||||
|
||||
@Formula("( lag(value, 1, (select tm.init_value from t_meter tm where tm.id = meter_id)) over (partition by meter_id order by time asc ) )")
|
||||
|
||||
Reference in New Issue
Block a user