package com.zcxk.charge.api.dto.generalview;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.zcxk.core.utils.jsonSerializer.BigDecimalJsonSerializer;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * @description 供水
 * @author   wangli
 * @data 2020/12/31 14:05
 */
@Data
@Api("数据统计")
public class DeviceWaterSupply implements Serializable {
    private static final long serialVersionUID = 3472349298203388378L;

    @ApiModelProperty("序号")
    private Integer orderNo;
    @ApiModelProperty("年")
    private Integer year;
    @ApiModelProperty("月")
    private Integer month;
    @ApiModelProperty("日")
    private Integer day;
    @ApiModelProperty("量")
    @JsonSerialize(using = BigDecimalJsonSerializer.class)
    private BigDecimal amount = BigDecimal.ZERO;
    @ApiModelProperty("应收额")
    @JsonSerialize(using = BigDecimalJsonSerializer.class)
    private BigDecimal receivableAmount = BigDecimal.ZERO;
    @ApiModelProperty("实收额")
    @JsonSerialize(using = BigDecimalJsonSerializer.class)
    private BigDecimal receivedAmount = BigDecimal.ZERO;
    @ApiModelProperty("普通客户用量")
    @JsonSerialize(using = BigDecimalJsonSerializer.class)
    private BigDecimal generalUserAmount = BigDecimal.ZERO;
    @ApiModelProperty("大客户用量")
    @JsonSerialize(using = BigDecimalJsonSerializer.class)
    private BigDecimal bigUserAmount = BigDecimal.ZERO;
    @ApiModelProperty("回收率")
    @JsonSerialize(using = BigDecimalJsonSerializer.class)
    private BigDecimal recoveryRate = BigDecimal.ZERO;
    @ApiModelProperty("日期")
    private LocalDate date;
    @ApiModelProperty("日期格式化")
    private String dateLabel;


    public void amountConvert( BigDecimal multipleData){
        this.amount =this.amount.divide(multipleData);
    }

}
