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.MonthSellwaterDto;
import com.zcxk.core.common.pojo.ProgramItem;
import com.zcxk.core.utils.converter.Double1Serializer;
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 2021-2-24
 */
@ApiModel("营收情况")
@Data
public class MonthRevenueVo {

    private static final long serialVersionUID = -3866939316262264972L;


    @ApiModelProperty(value = "主键")
    private Integer id;

    @ApiModelProperty(value = "租户标识")
    private String tenantId;

    @ApiModelProperty(value = "所属公司")
    private Integer companyOrgId;

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

    @ApiModelProperty(value = "总户数")
    private Integer userMeterCount;

    @ApiModelProperty(value = "新增用户数")
    private Integer userMeterAddCount;

    @ApiModelProperty(value = "抄表数")
    private Integer meterReadingCount;

    @ApiModelProperty(value = "抄表总水量")
    @JsonSerialize(using = Double3Serializer.class)
    private Double meterReadingUsage;

    @ApiModelProperty(value = "计费总水量")
    @JsonSerialize(using = Double3Serializer.class)
    private Double chargingUsage;

    @ApiModelProperty(value = "抄表完成率")
    private Double meterReadingFinishedRate;

    @ApiModelProperty(value = "抄表到户率")
    private Double meterReadingArrivalRate;

    @ApiModelProperty(value = "抄表错误率")
    private Double meterReadingErrorRate;

    @ApiModelProperty(value = "应收总金额")
    @JsonSerialize(using = Double3Serializer.class)
    private Double receivableTotalAmount;

    @ApiModelProperty(value = "实收总金额")
    @JsonSerialize(using = Double3Serializer.class)
    private Double receivedTotalAmount;

    @ApiModelProperty(value = "开票总金额")
    @JsonSerialize(using = Double3Serializer.class)
    private Double invoicedTotalAmount;

    @ApiModelProperty(value = "欠费总金额")
    @JsonSerialize(using = Double3Serializer.class)
    private Double arrearsTotalAmount;

    @ApiModelProperty(value = "普通客户应收金额")
    @JsonSerialize(using = Double3Serializer.class)
    private Double generalUserUsage;

    @ApiModelProperty(value = "大客户应收金额")
    @JsonSerialize(using = Double3Serializer.class)
    private Double bigUserUsage;

    @ApiModelProperty(value = "普通客户实收金额")
    @JsonSerialize(using = Double3Serializer.class)
    private Double generalUserUsageReceived;

    @ApiModelProperty(value = "大客户实收金额")
    @JsonSerialize(using = Double3Serializer.class)
    private Double bigUserUsageReceived;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "创建人")
    private String createBy;

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

    @ApiModelProperty(value = "更新人")
    private String updateBy;

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

    @ApiModelProperty(value = "所属公司名称")
    private String companyOrgName;

    @ApiModelProperty(value = "时间")
    private String collectDateString;

    @JsonSerialize(using = Double1Serializer.class)
    @ApiModelProperty(value = "普通客户用水占比")
    private Double generalUserPercent;

    @JsonSerialize(using = Double1Serializer.class)
    @ApiModelProperty(value = "大客户用水占比")
    private Double bigUserPercent;

    @JsonSerialize(using = Double1Serializer.class)
    @ApiModelProperty(value = "水费回收率")
    private Double waterFeeRecoveryRate;

    @ApiModelProperty(value="近几月",hidden = true)
    @JsonIgnore
    private Integer months;

    @ApiModelProperty(value="起始日期",hidden = true)
    private String startDate;

    @ApiModelProperty(value="截至日期",hidden = true)
    private String endDate;

    @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 List<MonthSellwaterVo> monthSellList;

}
