package com.gci.boot.modules.monitor.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.gci.boot.common.dict.annotation.Dict;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

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

@Data
public class OverallMonitorVO {

    private String id;

    @Dict(dicCode = "id",dictTable = "tb_projects",dicText = "project_name")
    @ApiModelProperty("所属项目")
    private String projectId;

    @ApiModelProperty("车牌号")
    private String plateNumber;

    @ApiModelProperty("gps采集时间")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date gpsTime;

    @Dict(dicCode = "online_status")
    @ApiModelProperty("设备是否在线 0-离线 1-在线")
    private Integer isOnline;

    @Dict(dicCode = "acc_status")
    @ApiModelProperty("acc状态 0-熄火 1-点火")
    private Integer acc;

    @Dict(dicCode = "charge_status")
    @ApiModelProperty("充电状态  1-停车充电、2-行驶充电、3-未充电  4-充电完成、-99-无效、-100-异常")
    private Integer chargeStatus;

    @ApiModelProperty("剩余电量比例 %")
    private Integer stateOfCharge;

    @ApiModelProperty("速度 单位km/h")
    private String speed;

    @ApiModelProperty("累计里程 单位km")
    private BigDecimal totalMileage;

    @ApiModelProperty("纬度")
    private BigDecimal lat;

    @ApiModelProperty("经度")
    private BigDecimal lon;

    @ApiModelProperty("高德纬度")
    private BigDecimal gdLat;

    @ApiModelProperty("高德经度")
    private BigDecimal gdLon;

    @ApiModelProperty("故障报警 0-正常 1-异常")
    private Integer faultAlarm;

    @ApiModelProperty("围栏告警 0-正常 1-异常")
    private Integer fenceAlarm;

    @ApiModelProperty("超速告警 0-正常 1-异常")
    private Integer speedingAlarm;

    @ApiModelProperty("主动安全告警-0-正常 1-异常")
    private Integer safetyAlarm;

    @ApiModelProperty("方向角")
    private String dir;
    /**
     * 告警状态，四个告警有一告警就为1，都不告警为0
     */
    private Integer alarmStatus;


    @Dict(dicCode = "vehicle_brand")
    @ApiModelProperty("车辆品牌")
    private String vehicleBrand;
    @ApiModelProperty("车辆型号")
    private String vehicleModel;
    @ApiModelProperty("车辆种类")
    @Dict(dicCode = "vehicle_type")
    private String vehicleType;
    @ApiModelProperty("方向")
    private String direction;
    /**
     * 是否作业 0-否 1-是
     */
    @Dict(dicCode = "yes_no")
    private Integer isWork;
}
