package com.gci.boot.modules.gis.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.gci.boot.annotation.Query.SelectQuery;
import com.gci.boot.common.dict.annotation.Dict;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 燃油油耗异常记录
 * @author 24642
 */
@Getter
@Setter
public class RefuelAlarm {
    @Dict(dictTable = "tb_projects", dicText = "project_name", dicCode = "id")
    @Excel(name = "所属项目",dict = "tb_projects,project_name,id",width = 9)
    @JsonPropertyDescription("所属项目")
    private String projectId;

    @SelectQuery()
    @Excel(name = "车牌号")
    @JsonPropertyDescription("车牌号")
    private String plateNumber;

    @Dict(dicCode = "vehicle_type")
    @SelectQuery(Type = SelectQuery.SelectType.EQ)
    @Excel(name = "车辆种类",dict = "vehicle_type")
    @JsonPropertyDescription("车辆种类")
    private String vehicleType;

    @Excel(name = "车辆型号")
    @JsonPropertyDescription("车辆型号")
    private String vehicleModel;

    @SelectQuery()
    @Excel(name = "车架号")
    @JsonPropertyDescription("车架号")
    private String frameNumber;

    @SelectQuery(Type = SelectQuery.SelectType.GE)
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @Excel(name = "开始时间",format = "yyyy-MM-dd HH:mm:ss")
    @JsonPropertyDescription("开始时间")
    private Date startTime;

    @SelectQuery(Type = SelectQuery.SelectType.LE)
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @Excel(name = "结束时间",format = "yyyy-MM-dd HH:mm:ss")
    @JsonPropertyDescription("结束时间")
    private Date endTime;

    @Excel(name = "百公里油耗（升/百公里）")
    @JsonPropertyDescription("百公里油耗（升/百公里）")
    private BigDecimal fuelConsumption;

    @Excel(name = "是否异常",dict = "yes_no")
    @Dict(dicCode = "yes_no")
    @JsonPropertyDescription("是否异常")
    private Integer alarm;
}
