package com.tofly.feesapi.bjgl.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.tofly.feesapi.common.constant.FmztEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

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

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.List;
import java.util.stream.Collectors;

@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "YH_CBKXX_LOG")
@KeySequence("YH_CBKXX_LOG")
@ApiModel
public class YhCbkxxLog extends Model<YhCbkxxLog> {
    private static final long serialVersionUID = 1L;

    @TableId(value = "log_Id", type = IdType.INPUT)
    @ApiModelProperty(value = "日志ID")
    private String logId;

    @ApiModelProperty(value = "日志流水编号")
    private String logLsh;

    @ApiModelProperty(value = "日志操作人员编码")
    private String logCzrybm;

    @ApiModelProperty(value = "日志操作人员姓名")
    private String logCzryxm;

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

    @ApiModelProperty(value = "操作类型：增加、修改、删除、作废")
    private String logCzlx;

    @ApiModelProperty(value = "处理类型：增加后、修改前、修改后、删除前、作废前、作废后")
    private String logCllx;

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

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

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

    @ApiModelProperty(value = "ID号，唯一")
    private String cbkid;

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

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

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

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

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

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

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

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

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

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

    @ApiModelProperty(value = "水表起数（底数）")
    private BigDecimal sbqs;

    @ApiModelProperty(value = "抄表序号")
    private BigDecimal cbxh;

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

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

    @ApiModelProperty(value = "水量比例")
    private Double slbl;

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

    @ApiModelProperty(value = "水量比例1")
    private Double slbl1;

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

    @ApiModelProperty(value = "水量比例2")
    private Double slbl2;

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

    @ApiModelProperty(value = "水量比例3")
    private Double slbl3;

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

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

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

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

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

    @ApiModelProperty(value = "开卡日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date kkrq;

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

    @ApiModelProperty(value = "写卡次数")
    private BigDecimal xkcs;

    @ApiModelProperty(value = "补卡次数")
    private BigDecimal bkcs;

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

    @ApiModelProperty(value = "总购水金额（金额表）")
    private Double zgsje;

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

    @ApiModelProperty(value = "本年累计金额")
    private Double bnljje;

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

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

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

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

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

    @ApiModelProperty(value = "$column.comments")
    private BigDecimal ickqyh;

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

    @ApiModelProperty(value = "水表止读")
    private BigDecimal sbzd;

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

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

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

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

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

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

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

    @ApiModelProperty(value = "垃圾费收取方式")
    private String ljffs;

    @ApiModelProperty(value = "垃圾费金额")
    private Double ljfje;

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

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

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

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

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

    @ApiModelProperty("用水类型")
    private String yslx;
    //@ApiModelProperty("水表用途(户表，临时表，考核表，泳池表，消防表)")
    @ApiModelProperty("水表用途(1户表，2临时表，3总表,4考核表，5子表，6母表，7总母表)")
    private String sbyt;
    @ApiModelProperty("水表安装方式：0为立式，1为卧式")
    private String sbazfs;

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

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

    @ApiModelProperty("原数据json")
    private String oldJson;

    @ApiModelProperty("操作后数据json")
    private String newJson;

    @ApiModelProperty("更新字段")
    @TableField(exist = false)
    private List<String> differentFields;
}
