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

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

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

/**
 * <p>
 * 车辆实时信息表
 * </p>
 *
 * @author 2464
 * @since 2023-09-01
 */
@Getter
@Setter
@TableName("tb_gis_runningbus")
@ApiModel(value = "TbGisRunningbus对象", description = "车辆实时信息表")
public class TbGisRunningbus implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

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

    @ApiModelProperty("定位终端标识")
    private String gpsNo;

    @ApiModelProperty("主动安全设备标识")
    private String adasNo;

    @ApiModelProperty("车辆状态  1-启动  2-熄火 3-其它  -99-无效 -100：异常")
    private Integer status;

    @ApiModelProperty("vin码")
    private String vinCode;

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

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

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

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

    private BigDecimal gdLon;

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

    @ApiModelProperty("方向角")
    private String dir;

    @ApiModelProperty("高程")
    private Integer altitude;

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

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

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

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

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

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

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

    @ApiModelProperty("运行模式 1-纯电 2-混动 3-燃油 -99-无效、-100-异常")
    private Integer operatingMode;

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

    @ApiModelProperty("总电压 单位V")
    private BigDecimal totalVoltage;

    @ApiModelProperty("总电流 单位A")
    private BigDecimal totalCurrent;

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

    @ApiModelProperty("1-工作 2-断开")
    private Integer dcStatus;

    @ApiModelProperty("挡位")
    private String gearPosition;

    @ApiModelProperty("主动安全故障标识")
    private String warnNo;

    @ApiModelProperty("所属机构")
    private String sysOrgCode;

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

    @ApiModelProperty("整车数据")
    private String vehicleJson;

    @ApiModelProperty("发动机数据")
    private String engineJson;

    @ApiModelProperty("报警数据")
    private String alarmDataJson;

    @ApiModelProperty("驱动机数据")
    private String electricMotorJson;

    @ApiModelProperty("极值数据")
    private String extremeDataJson;

    @ApiModelProperty("位置数据")
    private String locationJson;

    /**
     * 是否作业 0-否 1-是
     */
    @Dict(dicCode = "yes_no")
    private Integer isWork;

}
