package com.tofly.feesapi.bjgl.entity;

import cn.hutool.core.builder.EqualsBuilder;
import com.baomidou.mybatisplus.annotation.*;

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

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.tofly.feesapi.common.constant.FmztEnum;
import com.tofly.feesapi.common.util.FieldDesc;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

@Data
@TableName("YH_CBKXX")
@ApiModel(value = "YhCbkxx对象", description = "用户水表信息")
public class YhCbkxx implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("ID号，唯一")
    @TableId(type = IdType.INPUT)
    @FieldDesc("ID号")
    private String cbkid;

    @ApiModelProperty("用户编号")
    @FieldDesc("用户编号")
    private String yhbh;

    @ApiModelProperty("抄表卡号")
    @FieldDesc("抄表卡号")
    private String cbkh;

    @ApiModelProperty("水表类别(bm_sblb)")
    @FieldDesc("水表类别")
    private String sblb;

    @ApiModelProperty("水表生产厂家(bm_sbsccj)")
    @FieldDesc("水表生产厂家")
    private String sbsccj;

    @ApiModelProperty("水表出厂日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonIgnore
    @FieldDesc("水表出厂日期")
    private Date sbccrq;

    @ApiModelProperty("水表型号(bm_sbxh)")
    @FieldDesc("水表型号")
    private String sbxh;

    @ApiModelProperty("水表口径(sys_child_code,pcid='12')")
    @FieldDesc("水表口径")
    private String sbkj;

    @ApiModelProperty("水表编号")
    @FieldDesc("水表编号")
    private String sbbh;

    @ApiModelProperty("水表量程(sys_child_code,pcid='13')")
    @FieldDesc("水表量程")
    private String sblc;

    @ApiModelProperty("表计位置(sys_child_code,pcid='15')")
    @FieldDesc("表计位置")
    private String bjwz;

    @ApiModelProperty("精度等级(sys_child_code,pcid='14')")
    @FieldDesc("精度等级")
    private String jddj;

    @ApiModelProperty("抄表频率")
    @FieldDesc("抄表频率")
    private String cbpl;

    @ApiModelProperty("水表起数（底数）")
    @FieldDesc("水表起数")
    private int sbqs = 0;

    @ApiModelProperty("抄表序号")
    @FieldDesc("抄表序号")
    private int cbxh;

    @ApiModelProperty("一表多价标志")
    @FieldDesc("一表多价标志")
    private String ybdjbz;

    @ApiModelProperty("水价编码")
    @FieldDesc("水价编码")
    private String sjbm;

    @ApiModelProperty("水量比例")
    @FieldDesc("水量比例")
    private BigDecimal slbl;

    @ApiModelProperty("水价编码1")
    @FieldDesc("水价编码1")
    private String sjbm1;

    @ApiModelProperty("水量比例1")
    @FieldDesc("水量比例1")
    private BigDecimal slbl1;

    @ApiModelProperty("水价编码2")
    @FieldDesc("水价编码2")
    private String sjbm2;

    @ApiModelProperty("水量比例2")
    @FieldDesc("水量比例2")
    private BigDecimal slbl2;

    @ApiModelProperty("水价编码3")
    @FieldDesc("水价编码3")
    private String sjbm3;

    @ApiModelProperty("水量比例3")
    @FieldDesc("水量比例3")
    private BigDecimal slbl3;

    @ApiModelProperty("污水费标志")
    @FieldDesc("污水费标志")
    private String wsfbz;

    @ApiModelProperty("总分表ID（yh_cbkxx.cbkid）")
    @FieldDesc("总分表ID")
    private String fbid;

    @ApiModelProperty("备注")
    @FieldDesc("备注")
    private String bz;

    @ApiModelProperty("计费状态（1正常，2停用）")
    @FieldDesc("计费状态")
    private String jfzt;

    @ApiModelProperty("开卡标志（bm_kkzt）")
    @FieldDesc("开卡标志")
    private String kkbz;

    @ApiModelProperty("开卡日期")
    @FieldDesc("开卡日期")
    private Date kkrq;

    @ApiModelProperty("IC卡ID")
    @FieldDesc("IC卡ID")
    private String ickid;

    @ApiModelProperty("写卡次数")
    @FieldDesc("写卡次数")
    private Short xkcs;

    @ApiModelProperty("补卡次数")
    @FieldDesc("补卡次数")
    private Short bkcs;

    @ApiModelProperty("总购水量")
    @FieldDesc("总购水量")
    private Long zgsl;

    @ApiModelProperty("总购水金额（金额表）")
    @FieldDesc("总购水金额")
    private BigDecimal zgsje;

    @ApiModelProperty("本年累计水量")
    @FieldDesc("本年累计水量")
    private BigDecimal bnljsl;

    @ApiModelProperty("本年累计金额")
    @FieldDesc("本年累计金额")
    private BigDecimal bnljje;

    @ApiModelProperty("操作人员编码")
    @FieldDesc("操作人员编码")
    private String czrybm;

    @ApiModelProperty("操作人员姓名")
    @FieldDesc("操作人员姓名")
    private String czryxm;

    @ApiModelProperty("操作时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @FieldDesc("操作时间")
    private Date czsj;

    @ApiModelProperty("最新抄表日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @FieldDesc("最新抄表日期")
    private Date zxcbrq;

    @ApiModelProperty("所属阀门(sys_child_code,pcid='23')")
    @FieldDesc("所属阀门")
    private String ssfm;

    @FieldDesc("IC卡启用号")
    private Short ickqyh;

    @ApiModelProperty("定检日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @FieldDesc("定检日期")
    private Date djrq;

    @ApiModelProperty("水表止读")
    @FieldDesc("水表止读")
    private Long sbzd;

    @ApiModelProperty("修改人员编码")
    @FieldDesc("修改人员编码")
    private String xgrybm;

    @ApiModelProperty("修改日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @FieldDesc("修改日期")
    private Date xgrq;

    @ApiModelProperty("超定量")
    @FieldDesc("超定量")
    private Long cdl;

    @ApiModelProperty("两高一剩标志:0 否，1 是")
    @FieldDesc("两高一剩标志")
    private String lgysbz;

    @ApiModelProperty("安装人员")
    @FieldDesc("安装人员")
    private String azry;

    @ApiModelProperty("安装时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @FieldDesc("安装时间")
    private Date azrq;

    @ApiModelProperty("铅封号(管线号)")
    @FieldDesc("铅封号")
    private String gxh;

    @ApiModelProperty("垃圾费收取方式:0按户收取，1 按用量收取")
    @FieldDesc("垃圾费收取方式")
    private String ljffs;

    @ApiModelProperty("垃圾费金额")
    @FieldDesc("垃圾费金额")
    private BigDecimal ljfje;

    @ApiModelProperty("垃圾费标志")
    @FieldDesc("垃圾费标志")
    private String ljfbz;

    @ApiModelProperty("IC 卡no")
    @FieldDesc("IC卡号")
    private String ickno;

    @ApiModelProperty("累计水量")
    @FieldDesc("累计水量")
    private BigDecimal ljsl = BigDecimal.ZERO;

    @ApiModelProperty("智能表剩余金额")
    @FieldDesc("智能表剩余金额")
    private BigDecimal syje = BigDecimal.ZERO;

    @ApiModelProperty("阀门状态(0关阀 1处理中 2开阀)")
    @FieldDesc("阀门状态")
    private FmztEnum fmzt;

    @ApiModelProperty("用水类型")
    @FieldDesc("用水类型")
    private String yslx;

    @ApiModelProperty("水表用途(1户表，2临时表，3总表,4考核表，5子表，6母表，7总母表)")
    @FieldDesc("水表用途")
    private String sbyt;

    @ApiModelProperty("水表安装方式：0为立式，1为卧式")
    @FieldDesc("水表安装方式")
    private String sbazfs;

    @ApiModelProperty("水资源费标志")
    @FieldDesc("水资源费标志")
    private String szyfbz;

    @ApiModelProperty("水表状态")
    @FieldDesc("水表状态")
    private String sbzt;

    @ApiModelProperty("消防通表号")
    @FieldDesc("消防通表号")
    private String xftbh;

    @ApiModelProperty("附加费")
    @FieldDesc("附加费")
    private BigDecimal fjf;

    @ApiModelProperty("消防栓费")
    @FieldDesc("消防栓费")
    private BigDecimal xfsf;

    @ApiModelProperty("二次加压费")
    @FieldDesc("二次加压费")
    private String ecjybz;

    @Override
    public boolean equals(Object o) {
        return EqualsBuilder.reflectionEquals(this, o,
                "sbccrq", "kkrq", "czsj", "zxcbrq", "djrq", "xgrq", "azrq");
    }
}
