/*
 * Author: wangjian
 * 生成entity
 */
package com.tofly.watermeter.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

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


/**
 * 水表移交管理表
 *
 * @author wangjieliu
 * @date Fri Mar 19 00:00:00 CST 2021
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "TF_YWPN_BWSBYJGL_W", resultMap = "bwsbyjglMap")
@KeySequence("TF_YWPN_BWSBYJGL_W")
@ApiModel
public class Bwsbyjgl extends Model<Bwsbyjgl> {
    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @TableId(value = "ID", type = IdType.INPUT)
    @ApiModelProperty(value = "ID")
    private Long id;
    /**
     * 移交流水编号
     */
    @ApiModelProperty(value = "移交流水编号")
    private String bwLsbh;
    /**
     * 水表厂家
     */
    @ApiModelProperty(value = "水表厂家")
    private Long bwSbcj;
    /**
     * 水表类型
     */
    @ApiModelProperty(value = "水表类型")
    private Long bwSblx;
    /**
     * 水表口径
     */
    @ApiModelProperty(value = "水表口径")
    private Long bwSbkj;
    /**
     * 移交类型(0新表移交,1故障表移交,2周检表移交)
     */
    @ApiModelProperty(value = "移交类型(新表移交,故障表移交,周检表移交)")
    private Long bwYjlx;
    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String yjlxName;
    /**
     * 表号起号
     */
    @ApiModelProperty(value = "表号起号")
    private Long bwBhqh;
    /**
     * 表号止号
     */
    @ApiModelProperty(value = "表号止号")
    private Long bwBhzh;
    /**
     * 移交数量
     */
    @ApiModelProperty(value = "移交数量")
    private Long bwYjsl;
    /**
     * 水表止度
     */
    @ApiModelProperty(value = "水表止度")
    private BigDecimal bwSbzd;
    /**
     * 移交原因
     */
    @ApiModelProperty(value = "移交原因")
    private String bwYjyy;
    /**
     * 接收部门
     */
    @ApiModelProperty(value = "接收部门")
    private Long bwJsbm;
    /**
     * 接收人员
     */
    @ApiModelProperty(value = "接收人员")
    private Long bwJsry;
    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String jsryName;

    /**
     * 移交日期
     */
    @ApiModelProperty(value = "移交日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date bwYjrq;

    @ApiModelProperty(value = "移交人员")
    private Long bwYjry;

    @ApiModelProperty(value = "移交部门")
    private Long bwYjbm;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String bwYjryName;
    /**
     * 创建人员
     */
    @ApiModelProperty(value = "创建人员")
    @TableField(value = "CREATE_USER", fill = FieldFill.INSERT)
    private Long createUser;
    @ApiModelProperty(hidden = true)
    private String createUserName;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "CREATE_DATE", fill = FieldFill.INSERT)
    private Date createDate;
    /**
     * 新表移交入库标识
     */
    @ApiModelProperty(value = "新表移交入库标识，1：成功入库；2：没有入库；前端不能传")
    private String bwRkbs;
    @ApiModelProperty(value = "是否需要检查 0：需要 ，1：已检查 ， 2：不需要")
    private String checkFlag;
    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String bwBz;
    @ApiModelProperty(value = "水表前缀")
    private String sbqz;
    @ApiModelProperty(value = "水表编号（旧）")
    private String sbzsbh;
    @ApiModelProperty(value = "用户名")
    private String userName;
    @ApiModelProperty(value = "用户地址")
    private String address;

    /**
     * 水表编号新
     */
    @ApiModelProperty(value = "水表编号（新）")
    private String sbbh;
    /**
     * 水表厂家
     */
    @ApiModelProperty(value = "水表厂家(新)")
    private Long sbcj;
    /**
     * 水表类型
     */
    @ApiModelProperty(value = "水表类型(新)")
    private Long sblx;
    /**
     * 水表口径
     */
    @ApiModelProperty(value = "水表口径(新)")
    private Long sbkj;

    @ApiModelProperty(value = "移交选项：1：正常移交；2：无表号移交；3：表号重复移交")
    private String yjxx;
    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String yjxxName;
    @ApiModelProperty(value = "移交说明：无表号和表号重复情况必填")
    private String yjsm;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String sbcjName;
    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String sblxName;
    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String sbkjName;
    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String cjName;
    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String lxName;
    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String kjName;
    @ApiModelProperty("合同内容")
    private String contractNote;

    public void init() {
        if (this.getBwYjyy() == null) {
            this.setBwYjyy("");
        }
        if (this.getUserName() == null) {
            this.setUserName("");
        }
        if (this.getAddress() == null) {
            this.setAddress("");
        }
    }

}
