package com.unis.base.server.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author huangxing
 * @version 1.0
 * @Title DCfxxsjyDO
 * @ProjectName 仓房信息实体类
 * @date 2019/07/22 17点26分
 */

@SuppressWarnings("serial")
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "D_CFXXSJY")
public class DCfxxsjyDO extends BaseEntity {

	/**
	 * 仓房编号
	 */
	@Column(name = "cfbh")
	private String cfbh;

	/**
	 * 仓房名称+货位名称
	 */
	@Column(name = "cfmc")
	private String cfmc;

	/**
	 * 货位名称
	 */
	private String cfmc01;

	/**
	 * 所属库点编号
	 */
	@Column(name = "kddm")
	private String kddm;

	/**
	 * 仓房类型
	 */
	@Column(name = "cflx")
	private String cflx;

	/**
	 * 仓房结构
	 */
	@Column(name = "cfjg")
	private String cfjg;

	/**
	 * 建筑类型
	 */
	@Column(name = "jzlx")
	private String jzlx;

	/**
	 * 仓房长度
	 */
	@Column(name = "cfcd")
	private Double cfcd;

	/**
	 * 仓房宽度
	 */
	@Column(name = "cfkd")
	private Double cfkd;

	/**
	 * 仓房高度
	 */
	@Column(name = "cfgd")
	private Double cfgd;

	/**
	 * 设计仓容
	 */
	@Column(name = "sjcr")
	private Double sjcr;

	/**
	 * 实际仓容
	 */
	@Column(name = "sjcr01")
	private Double sjcr01;

	/**
	 * 联系电话
	 */
	@Column(name = "lxdh")
	private String lxdh;

	/**
	 * 人员编号
	 */
	@Column(name = "rybh")
    private String rybh;

	/**
	 * 人员名称
	 */
	@Column(name = "ryxm")
    private String ryxm;

	/**
	 * 仓房墙体
	 */
	@Column(name = "cfqt")
    private String cfqt;

	/**
	 * 仓房檐高
	 */
	@Column(name = "cfyg")
    private Double cfyg;

	/**
	 * 仓房屋顶
	 */
	@Column(name = "cfwm")
    private String cfwm;

	/**
	 * 仓房地面 --- 修改后: 符合国粮局文档规范的 <仓房代码>
	 */
	@Column(name = "cfdm")
    private String cfdm;

	/**
	 * 房屋跨度
	 */
	@Column(name = "fwkd")
    private Long fwkd;

	/**
	 * 装粮线高度
	 */
	@Column(name = "zlxgd")
    private Double zlxgd;

	/**
	 * 筒仓直径
	 */
	@Column(name = "tczj")
    private Double tczj;

	/**
	 * 仓门数量
	 */
	@Column(name = "cmsl")
    private Integer cmsl;

	/**
	 * 仓门高度
	 */
	@Column(name = "cmgd")
    private Long cmgd;

	/**
	 * 仓门宽度
	 */
	@Column(name = "cmkd")
    private Long cmkd;

	/**
	 * 通风措施
	 */
	@Column(name = "tffs")
    private String tffs;

	/**
	 * 隔热措施
	 */
	@Column(name = "grfs")
    private String grfs;

	/**
	 * 控温措施
	 */
	@Column(name = "kwcs")
    private String kwcs;

	/**
	 * 精度
	 */
	@Column(name = "jd")
	private Double jd;

	/**
	 * 纬度
	 */
	@Column(name = "wd")
	private Double wd;

	/**
	 * 启用日期
	 */
	@Column(name = "qyrq")
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
	private Date qyrq;

	/**
	 * 仓房状态
	 */
	@Column(name = "cfzt")
	private String cfzt;

	/**
	 * 建设年代
	 */
	@Column(name = "jsnd")
	private String jsnd;

	/**
	 * 单仓装粮容积
	 */
	@Column(name = "dczlrj")
	private Double dczlrj;

	/**
	 * 库点名称
	 */
	@Column(name = "kdmc")
	private String kdmc;

	/**
	 * 仓房类型编号
	 */
	@Column(name = "CFLXBH")
	private String cflxbh;

	/**
	 * 0、低温仓、1、准低温仓、2、普通仓、3、保温仓（见备注）
	 * 对应国粮局 cflxdm 字段
	 */
	@Column(name = "DWC")
	private Integer dwc;

	/**
	 * 仓房用途
	 */
	@Column(name = "CFYT")
	private String cfyt;

	/**
	 * 其他用途
	 */
	@Column(name = "qtyt")
	private String qtyt;

	/**
	 * 仓房内长
	 */
	@Column(name = "CFNC")
	private Double cfnc;

	/**
	 * 仓房内宽
	 */
	@Column(name = "CFNK")
	private Double cfnk;

	/**
	 * 仓房内径
	 */
	@Column(name = "CFNJ")
	private Integer cfnj;

	/**
	 * 储存方式
	 */
	@Column(name = "CCFS")
	private String ccfs;

	/**
	 * 保温门    0、无。1、有
	 */
	@Column(name = "BWM")
	private Integer bwm;

	/**
	 * 保温窗
	 */
	@Column(name = "BWC")
	private Integer bwc;

	/**
	 * 双层保温窗0、无。1、有
	 */
	@Column(name = "SCBWC")
	private Integer scbwc;

	/**
	 * 外控内开窗0、无。1、有
	 */
	@Column(name = "WKNKC")
	private Integer wknkc;

	/**
	 * 仓内吊顶0、无。1、有
	 */
	@Column(name = "CNDD")
	private Integer cndd;

	/**
	 * 仓内保温吊顶0、无。1、有
	 */
	@Column(name = "CDBWDD")
	private Integer cdbwdd;

	/**
	 * 隔层排积热0、无。1、有
	 */
	@Column(name = "GCPJR")
	private Integer gcpjr;

	/**
	 * 仓顶外隔热层0、无。1、有
	 */
	@Column(name = "CDWGRC")
	private Integer cdwgrc;

	/**
	 * 保温墙体0、无。1、有
	 */
	@Column(name = "BWQT")
	private Integer bwqt;

	/**
	 * 保温涂料0、无。1、有
	 */
	@Column(name = "BWTL")
	private Integer bwtl;

	/**
	 * 制冷设备0、无。1、有
	 */
	@Column(name = "ZLSB")
	private Integer zlsb;

	/**
	 * 地笼通风0、无。1、有
	 */
	@Column(name = "DLTF")
	private Integer dltf;

	/**
	 * 轴流通风0、无。1、有
	 */
	@Column(name = "ZLTF")
	private Integer zltf;

	/**
	 * 电子测温0、无。1、有
	 */
	@Column(name = "DZCW")
	private Integer dzcw;

	/**
	 * 自动流粮口0、无。1、有
	 */
	@Column(name = "ZDLLK")
	private Integer zdllk;

	/**
	 * 环流熏蒸0、无。1、有
	 */
	@Column(name = "HLXZ")
	private Integer hlxz;

	/**
	 * 仓内环流0、无。1、有
	 */
	@Column(name = "CNHL")
	private Integer cnhl;

	@ApiModelProperty(value = "是否备案，0，未备案，1，待提交，2待审核，3已驳回，4，已备案", notes ="是否备案，0，未备案，1，待提交，2待审核，3已驳回，4，已备案", required = false)
	@Column(name = "SFBA")
	private Integer sfba;

	@ApiModelProperty(value = "仓房序号", notes ="仓房序号", required = false)
	@Column(name = "cfxh")
	private String cfxh;

	@ApiModelProperty(value = "廒间序号", notes ="廒间序号", required = false)
	@Column(name = "ajxh")
	private String ajxh;

	@ApiModelProperty(value = "货位序号", notes ="货位序号", required = false)
	@Column(name = "hwxh")
	private String hwxh;

	@ApiModelProperty(value = "建设时间", notes ="建设时间", required = false)
	@Column(name = "jssj")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private Date jssj;

	@ApiModelProperty(value = "交付使用日期/启用日期", notes ="交付使用日期/启用日期", required = false)
	@Column(name = "jfsyrq")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private Date jfsyrq;

	@ApiModelProperty(value = "防雨防潮性能", notes ="防雨防潮性能", required = false)
	@Column(name = "fyfcxn")
	private String fyfcxn;

	@ApiModelProperty(value = "密闭杀虫性能", notes ="密闭杀虫性能", required = false)
	@Column(name = "mbscxn")
	private String mbscxn;

	@ApiModelProperty(value = "隔热保冷性能", notes ="隔热保冷性能", required = false)
	@Column(name = "grblxn")
	private String grblxn;

	@ApiModelProperty(value = "能否散装储存，0：否，1：是", notes ="能否散装储存，0：否，1：是", required = false)
	@Column(name = "sfszcc")
	private Integer sfszcc;

	@ApiModelProperty(value = "有无粮情测控情况，0：无，1：有", notes ="有无粮情测控情况，0：无，1：有", required = false)
	@Column(name = "ywlqckqk")
	private Integer ywlqckqk;

	@ApiModelProperty(value = "仓房使用情况，1：空闲中，2：使用中，0：已停用", notes ="仓房使用情况，1：空闲中，2：使用中，0：已停用", required = false)
	@Column(name = "cfsyqk")
	private Integer cfsyqk;

	@ApiModelProperty(value = "墙体厚度（厘米）", notes ="墙体厚度（厘米）", required = false)
	@Column(name = "qthd")
	private Integer qthd;

	@ApiModelProperty(value = "仓门名称", notes ="仓门名称", required = false)
	@Column(name = "cmmc")
	private String cmmc;

	@ApiModelProperty(value = "墙体隔热，1：保温隔热涂料，2：墙体增厚", notes ="墙体隔热，1：保温隔热涂料，2：墙体增厚", required = false)
	@Column(name = "qtgr")
	private Integer qtgr;


	@Column(name = "lspzmc")
	private String lspzmc;

	@Column(name = "fcsl")
	private Integer fcsl;

	@ApiModelProperty(value = "入仓年月")
	@Transient
	private String rcny;

	@ApiModelProperty(value = "仓房外温")
	@Transient
	private Double cfww;

	@ApiModelProperty(value="仓房内温")
	@Transient
	private Double cfnw;

	@ApiModelProperty(value="仓房外湿")
	@Transient
	private Double cfws;

	@ApiModelProperty(value="仓房内湿")
	@Transient
	private Double cfns;

	@Column(name = "shrmc")
	private String shrmc;

	@Column(name = "shsj")
	@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
	private Date shsj;

	@Column(name = "shyj")
	private String shyj;

	@Transient
	private String[] zts;

	   /**
     * 所属企业信用代码
     */
    @ApiModelProperty(value="所属企业信用代码")
    @Column(name = "tyshxydm")
    private String tyshxydm;

	@ApiModelProperty(value = "窗户保温 1.单层 2 双层  3三层")
	private Integer chbw;

	@ApiModelProperty(value="轴流风机 0:无 1:有" )
	private Integer zlfj;

	@ApiModelProperty(value="能否环流熏蒸杀虫 0:否 1:能" )
	private Integer nfxlsc;

	@ApiModelProperty(value="仓内摄像头 0:无 1:有" )
	private Integer cnsxt;

	@ApiModelProperty(value="低温仓类型 1：低温仓 2准低温仓 3普通仓 4保温仓" )
	private Integer dwclx;

	@ApiModelProperty(value="有无机械通风设施 0:无 1:有" )
	private Integer ywjxtfss;

	@ApiModelProperty(value="此字段用于市级仓房  市级将唯一标识发给仓" )
	private String cfbm;

	@ApiModelProperty(value="企业编码 通过企业编码唯一标识处理业务数据" )
	private String qybm;

	//模糊查询时间
	@Transient
	private String cxsj;

    @ApiModelProperty(value = "储粮功效")
    private String clgx;

    @ApiModelProperty(value = "结构材料")
    private String jgcl;

    @ApiModelProperty(value = "气密性")
    private String qmx;

    @ApiModelProperty(value = "粮情技术")
    private String lqjs;

    @ApiModelProperty(value = "通风技术")
    private String tfjs;

    @ApiModelProperty(value = "杀虫技术")
    private String scjs;

    @ApiModelProperty(value = "控温技术")
    private String kwjs;

    @ApiModelProperty(value = "设计年限")
    private String sjnx;

    @ApiModelProperty(value = "保管员信息")
    private String bgr;

    @ApiModelProperty(value = "隔热措施")
    private String grcs;

	@ApiModelProperty(value = "是否有竣工验收或验收备案（0：无；1：有）")
	@Column(name = "acceptance_qualified")
	private Integer acceptanceQualified;

	@ApiModelProperty(value = "是否有不动产权证（0：无；1：有）")
	@Column(name = "real_estate_certificate")
	private Integer realEstateCertificate;

	@ApiModelProperty(value = "窗户数量")
	@Column(name = "window_num")
	private Integer windowNum;

	/**
	 * ------------------------实体类新增字段-----------------------------
	 */

	/**
	 * 筒仓外径
	 * 对应国粮局 tcwj
	 */
	@Column(name = "cwtcwj")
	private BigDecimal cwtcwj;

	/**
	 * 筒仓内径
	 * 对应国粮局 tcnj
	 */
	@Column(name = "cntcnj")
	private BigDecimal cntcnj;

	/**
	 * ---------------------数据库新增字段---------------------------------
	 */
	/**
	 * 挡粮门型式
	 */
	@Column(name = "dlmxs")
	private String dlmxs;

	/**
	 * 隔热性能
	 */
	@Column(name = "grxn")
	private String grxn;

	/**
	 * 是否已进行信息化改造
	 */
	@Column(name = "sfyjxxxhgz")
	private String sfyjxxxhgz;

	/**
	 * 通风系统型式
	 */
	@Column(name = "tfxtxs")
	private String tfxtxs;

	/**
	 * 害虫检测方式
	 */
	@Column(name = "hcjcfs")
	private String hcjcfs;

	/**
	 * 货位容量(吨)
	 */
	@Column(name = "hwrl")
	private Double hwrl;

	/**
	 * 廒间代码：符合国粮局文档规范的廒间代码
	 */
	@Column(name = "ajdh")
	private String ajdh;

	/**
	 * 货位代码：符合国粮局文档规范的货位代码
	 */
	@Column(name = "hwdm")
	private String hwdm;

	/**
	 * 仓房代码
	 */
	@Column(name = "gfcfdm")
	private String gfcfdm;

	/**
	 * 仓房名称
	 */
	@Column(name = "gfcfmc")
	private String gfcfmc;

	@ApiModelProperty(value = "墙体结构")
	private String qtjg;

	/**
	 * 房顶结构
	 */
	@ApiModelProperty(value = "房顶结构")
	private String fdjg;

	/**
	 * 房架结构
	 */
	@ApiModelProperty(value = "房架结构")
	private String fjjg;

	/**
	 * 地面结构
	 */
	@ApiModelProperty(value = "地面结构")
	private String dmjg;

	@ApiModelProperty(value = "使用状态", example = "1:在用; 2:弃用")
	private String syzt;

	@ApiModelProperty(value = "下发库级返回信息", notes = "下发库级返回信息")
	private String sendResult;

	@ApiModelProperty(value = "仓内长")
	private BigDecimal cnc;

	/**
	 * 仓内宽
	 */
	@ApiModelProperty(value = "仓内宽")
	private BigDecimal cnk;

	/**
	 * 仓内檐高
	 */
	@ApiModelProperty(value = "仓内檐高")
	private BigDecimal cnyg;

	@ApiModelProperty(value = "仓内体积", notes = "BigDecimal(20,6)")
	private BigDecimal cntj;

	@ApiModelProperty(value = "仓外长")
	private BigDecimal cwc;

	/**
	 * 仓外宽
	 */
	@ApiModelProperty(value = "仓外宽")
	private BigDecimal cwk;

	/**
	 * 仓外檐高
	 */
	@ApiModelProperty(value = "仓外檐高")
	private BigDecimal cwyg;

	/**
	 * 仓外顶高
	 */
	@ApiModelProperty(value = "仓外顶高")
	private BigDecimal cwdg;

	@ApiModelProperty(value = "能否隔热保温")
	private String nfgrbw;

	/**
	 * 仓内装粮线高
	 * BigDecimal(20,6)
	 */
	@ApiModelProperty(value = "仓内装粮线高", notes = "BigDecimal(20,6)")
	private BigDecimal cnzlxg;

	@ApiModelProperty(value = "有无防鼠防雀防虫装置及设施")
	private String ywfsfqfczz;

	@ApiModelProperty(value = "有无防火防爆防盗设施")
	private String ywfhfbfdss;

	@ApiModelProperty(value = "能否富氮低氧气调储粮")
	private String nffddyqtcl;

	@ApiModelProperty(value = "仓房是否完好", notes = "根据【仓房状态】判断", example = "1:是; 0:否; 9:其他或不确定;")
	private String cfsfwh;

	@ApiModelProperty(value = "隔热保温措施")
	private String grbwcs;

	@ApiModelProperty(value = "储存粮食类型 0:原粮；1：成品粮", notes = "储存粮食类型")
	@Column(name = "grain_type")
	private String grainType;

	@ApiModelProperty(value = "设计单位")
	@Column(name = "sjdw")
	private String sjdw;

	@ApiModelProperty(value = "建设单位")
	@Column(name = "jsdw")
	private String jsdw;

	@ApiModelProperty(value = "监理单位")
	@Column(name = "jldw")
	private String jldw;

	@ApiModelProperty(value = "设计使用年限")
	@Column(name = "sjsynx")
	private String sjsynx;

	@ApiModelProperty(value = "仓房启用日期")
	@Column(name = "cfqyrq")
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
	private Date cfqyrq;

	public DCfxxsjyDO(String kddm, String cfxh) {
		this.kddm = kddm;
		this.cfxh = cfxh;
	}

	@Column(name = "change_reason")
    @ApiModelProperty(value = "变更原因")
    private String changeReason;

    @Column(name = "data_ver")
    private Integer dataVer;

	@Column(name = "cf_type")
	private String cfType;

	@Column(name = "package_type")
	private String packageType;

}
