package com.zcxk.charge.api.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.zcxk.charge.api.dto.MonitorDataDto;
import com.zcxk.core.common.pojo.ProgramItem;
import com.zcxk.core.utils.converter.Double3Serializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * @description
 * @author  yjy
 * @data 2020-12-3
 */
@ApiModel("在线监测列表数据")
@Data
public class OnlineDataVo {

    private static final long serialVersionUID = -3866939316262264972L;

    @ApiModelProperty("所属场景id")
    private Long sceneId;

    @ApiModelProperty("所属场景")
    private String sceneName;

    @ApiModelProperty("场景地址")
    private String address;

    @JsonSerialize(using = Double3Serializer.class)
    @ApiModelProperty("今日供水量、今日出水量")
    private Double yieldWaterUsage;

    @JsonSerialize(using = Double3Serializer.class)
    @ApiModelProperty("今日取水量、今日进水量")
    private Double intakeWaterUsage;

    @JsonSerialize(using = Double3Serializer.class)
    @ApiModelProperty("今日耗电量")
    private Double powerUsage;

    @JsonSerialize(using = Double3Serializer.class)
    @ApiModelProperty("今日耗药量")
    private Double drugUsage;

    @ApiModelProperty("瞬时流量")
    private MonitorDataVo instantFlow;

    @ApiModelProperty("供水PH、出水PH")
    private MonitorDataVo yieldPh;

    @ApiModelProperty("供水浊度、出水浊度")
    private MonitorDataVo yieldTurbidity;

    @ApiModelProperty("取水PH、进水PH")
    private MonitorDataVo intakePh;

    @ApiModelProperty("取水浊度、进水浊度")
    private MonitorDataVo intakeTurbidity;

    @ApiModelProperty("水位")
    private MonitorDataVo waterLevel;

    @ApiModelProperty("压力、出口压力")
    private MonitorDataVo pressure;

    @ApiModelProperty("余氯")
    private MonitorDataVo residualChlorine;

    @ApiModelProperty("水泵状态")
    private List<MonitorDataVo> pumpStatus;

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

    @ApiModelProperty(value = "场景ids" ,hidden = true )
    @JsonIgnore
    private List<Long> sceneIds;

    @ApiModelProperty(value = "租户标识",hidden = true)
    @JsonIgnore
    private String tenantId;

    @ApiModelProperty(value ="权限",hidden = true)
    @JsonIgnore
    private List<ProgramItem> programItems;

    @ApiModelProperty(value="用户权限类型",hidden = true)
    @JsonIgnore
    private Integer permissonType;

    /** 用户类型 */
    @ApiModelProperty(value = "用户类型(-9999 超管 -999普通用户 2普通用户)",hidden = true)
    @JsonIgnore
    private String userType;

    @ApiModelProperty(value ="一级场景类型名称")
    private String sceneTypeName;

    @ApiModelProperty("累计流量")
    private MonitorDataVo totalFlow;

    @ApiModelProperty("电导率")
    private MonitorDataVo conductivity;

    @ApiModelProperty(value = "设备ids" ,hidden = true )
    @JsonIgnore
    private List<Long> deviceIds;

    @ApiModelProperty(value = "管网标记查询 1压力列表 2流量列表 3水质列表 4今日累计流量 5瞬时流量",hidden = true)
    @JsonIgnore
    private Integer type;

    @ApiModelProperty("设备id")
    private Long deviceId;

    @ApiModelProperty("设备编号")
    private String deviceCode;

    @ApiModelProperty("设备名称")
    private String deviceName;

    @ApiModelProperty("设备状态 1报警 0正常 2离线")
    private Integer deviceState;

    @ApiModelProperty(value ="0或空无离线、1有离线",hidden = true)
    @JsonIgnore
    private Integer flag;

    @ApiModelProperty("场景状态 1报警 0正常 2离线")
    private Integer sceneState;

    @ApiModelProperty(value ="公司id",hidden = true)
    @JsonIgnore
    private Integer companyOrgId;

    @ApiModelProperty("进口压力")
    private MonitorDataVo importPressure;
}
