package cn.com.victorysoft.business.indicator.entity;
import cn.com.victorysoft.business.sys.param.UnitMonthParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

@ApiModel("单位月度指标")
@Data
public class UnitMonth extends SectionRateSummary {

    @ApiModelProperty("单位代码")
    private String unitcode;

    @ApiModelProperty("单位名称")
    private String unitname;

    @ApiModelProperty("年月")
    private String month;

    @ApiModelProperty("正常井数")
    private Integer workTotalWell;

    @ApiModelProperty("分注井数")
    private Integer separateWell;

    @ApiModelProperty("开井率")
    private BigDecimal openWellRate;

    @ApiModelProperty("分注率")
    private BigDecimal separateRate;

    @ApiModelProperty("细分率")
    private BigDecimal thinSeparateRate;

    @ApiModelProperty("一类井开井率")
    private BigDecimal openWellRate1;

    @ApiModelProperty("一类井分注率")
    private BigDecimal separateRate1;

    @ApiModelProperty("一类井层段合格率")
    private BigDecimal normalRate1;

    @ApiModelProperty("欠注层数")
    private Integer lessSection;

    @ApiModelProperty("注水泵效率")
    private BigDecimal waterPumpEff;

    @ApiModelProperty("设备耗电量")
    private BigDecimal devicePower;

    @ApiModelProperty("井口水质达标率")
    private BigDecimal waterQualityRate;

    @ApiModelProperty("测调完成率")
    private BigDecimal adjustRate;

    @ApiModelProperty("洗井有效率")
    private BigDecimal flushRate;

    @ApiModelProperty("水质达标率（含油）")
    private BigDecimal oilQuality;

    @ApiModelProperty("水质达标率（悬浮固体物）")
    private BigDecimal suspensionQuality;

    @ApiModelProperty("水质达标率（平均粒径中值）")
    private BigDecimal particleQuality;

    @ApiModelProperty("单耗")
    private BigDecimal singlePower;

    @ApiModelProperty("计划开井率")
    private BigDecimal planOpenWellRate;

    @ApiModelProperty("计划分注率")
    private BigDecimal planSeparateRate;

    @ApiModelProperty("计划层段合格率")
    private BigDecimal planNormalRate;

    @ApiModelProperty("统计时间")
    private Date summaryDate;

    private Double formatDouble(Double d, int scale) {
        if (d == null) return d;
        BigDecimal decimal = new BigDecimal(d);
        return decimal.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
    }

    private static final long serialVersionUID = 1L;
}
