package com.unis.base.common.vo;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.format.annotation.NumberFormat;

import javax.persistence.Column;
import javax.persistence.Transient;
import javax.validation.constraints.Pattern;

/**
 * @author huangxing
 * @version 1.0
 * @Title DCfxxsjyVO
 * @ProjectName 仓房信息实体类
 * @date 2019/07/22 17点26分
 */
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@SuppressWarnings("serial")
@ApiModel("仓房信息实体")
public class DCfxxsjyVO extends BaseEntity {

    /**
     * 仓房类型
     */
    @ApiModelProperty(value = "仓房类型", example = "eg:12  长度20")
    @Column(name = "cflx")
    @NotBlank(message = "请填写正确仓房类型")
    @Pattern(regexp = "^[0-9]{1,8}$",message = "请填写正确仓房类型")
    private String cflx;

    /**
     * 仓房结构
     */
    @ApiModelProperty(value = "仓房结构", example = "eg:仓房结构  长度20")
    @Column(name = "cfjg")
    private String cfjg;

    /**
     * 建筑类型
     */
    @ApiModelProperty(value = "建筑类型", example = "eg:仓房结构  长度20")
    @Column(name = "jzlx")
    private String jzlx;

    /**
     * 仓房长度
     */
    @ApiModelProperty(value = "仓房长度", example = "eg:12.5  长度3,保留小数点后一位")
    @Column(name = "cfcd")
    private Double cfcd;

    /**
     * 仓房宽度
     */
    @ApiModelProperty(value = "仓房宽度", example = "eg:12.5  长度3,保留小数点后一位")
    @Column(name = "cfkd")
    private Double cfkd;

    /**
     * 仓房高度
     */
    @ApiModelProperty(value = "仓房高度", example = "eg:12.5  长度3,保留小数点后一位")
    @Column(name = "cfgd")
    private Double cfgd;

    @Column(name = "sjcrStart")
    private Double sjcrStart;

    @Column(name = "sjcrEnd")
    private Double sjcrEnd;

    /**
     * 实际仓容
     */
    @ApiModelProperty(value = "实际仓容", example = "eg:仓房结构  长度20")
    @Column(name = "sjcr01")
    private Double sjcr01;

    /**
     * 联系电话
     */
    @ApiModelProperty(value = "联系电话", example = "eg:15501136167  长度15")
    @Column(name = "lxdh")
    private String lxdh;


    /**
     * 人员编号
     */
    @ApiModelProperty(value = "人员编号", example = "eg:A001  长度30")
    @Column(name = "rybh")
    private String rybh;

    /**
     * 人员名称
     */
    @ApiModelProperty(value = "人员名称", example = "eg:王琦  长度30")
    @Column(name = "ryxm")
    private String ryxm;

    /**
     * 仓房墙体
     */
    @ApiModelProperty(value = "仓房墙体", example = "eg:仓房墙体  长度20")
    @Column(name = "cfqt")
    private String cfqt;

    /**
     * 仓房檐高
     */
    @ApiModelProperty(value = "仓房檐高", example = "eg:10  长度10")
    @Column(name = "cfyg")
    private Double cfyg;

    /**
     * 仓房屋顶
     */
    @ApiModelProperty(value = "仓房屋顶", example = "eg:10  长度20")
    @Column(name = "cfwm")
    private String cfwm;

    /**
     * 房屋跨度
     */
    @ApiModelProperty(value = "房屋跨度", example = "eg:15  长度10")
    @Column(name = "fwkd")
    private Long fwkd;

    /**
     * 装粮线高度/设计装粮高度(米)
     */
    @ApiModelProperty(value = "装粮线高度/设计装粮高度(米)", example = "eg:20  长度10")
    @Column(name = "zlxgd")
    private Double zlxgd;

    /**
     * 筒仓直径
     */
    @ApiModelProperty(value = "筒仓直径", example = "eg:8  长度10")
    private Double tczj;

    /**
     * 仓门数量
     */
    private Integer cmsl;

    /**
     * 通风措施
     */
    @ApiModelProperty(value = "通风措施", example = "eg:通风措施  长度50")
    private String tffs;

    @ApiModelProperty(value = "屋面隔热", example = "eg:屋面隔热  长度50")
    @Column(name = "grfs")
    private String grfs;

    /**
     * 控温措施
     */
    @ApiModelProperty(value = "控温措施", example = "eg:控温措施  长度50")
    @Column(name = "kwcs")
    private String kwcs;

    /**
     * 建设年代
     */
    @ApiModelProperty(value = "建设年代", example = "eg:仓房结构  长度20")
    @Column(name = "jsnd")
    private String jsnd;

    /**
     * 单仓装粮容积
     */
    @ApiModelProperty(value = "单仓装粮容积", example = "eg:仓房结构  长度20")
    @Column(name = "dczlrj")
    private Double dczlrj;

    /**
     * 库点名称
     */
    @ApiModelProperty(value = "库点名称", example = "eg:仓房结构  长度20")
    @Column(name = "kdmc")
    private String kdmc;

    /**
     * 0、低温仓、1、准低温仓、2、普通仓、3、保温仓（见备注）
     */
    @ApiModelProperty(value = "0、低温仓、1、准低温仓、2、普通仓、3、保温仓（见备注）", example = "eg:1  长度1")
    @Column(name = "dwc")
    private Integer dwc;

    /**
     * 仓房用途
     */
    @ApiModelProperty(value = "仓房用途", example = "eg:仓房结构  长度20")
    private String cfyt;
    /**
     * 其他用途
     */
    @ApiModelProperty(value = "其他用途")
    private String qtyt;

    /**
     * 仓房内长
     */
    @ApiModelProperty(value = "仓房内长", example = "eg:仓房结构  长度20")
    @Column(name = "cfnc")
    private Double cfnc;

    /**
     * 仓房内宽
     */
    @ApiModelProperty(value = "仓房内宽", example = "eg:仓房结构  长度20")
    @Column(name = "cfnk")
    private Double cfnk;

    /**
     * 仓房内径
     */
    @ApiModelProperty(value = "仓房内径", example = "eg:仓房结构  长度20")
    @Column(name = "cfnj")
    private Integer cfnj;

    /**
     * 储存方式
     */
    @ApiModelProperty(value = "储存方式 ", example = "eg:仓房结构  长度20")
    @Column(name = "ccfs")
    private String ccfs;

    /**
     * 保温门    0、无。1、有
     */
    @ApiModelProperty(value = "保温门    0、无。1、有", example = "eg:仓房结构  长度20")
    @Column(name = "bwm")
    private Integer bwm;

    /**
     * 保温窗
     */
    @ApiModelProperty(value = "保温窗", example = "eg:仓房结构  长度20")
    @Column(name = "bwc")
    private Integer bwc;

    /**
     * 双层保温窗0、无。1、有
     */
    @ApiModelProperty(value = "双层保温窗0、无。1、有", example = "eg:仓房结构  长度20")
    @Column(name = "scbwc")
    private Integer scbwc;

    /**
     * 外控内开窗0、无。1、有
     */
    @ApiModelProperty(value = "外控内开窗0、无。1、有", example = "eg:仓房结构  长度20")
    @Column(name = "wknkc")
    private Integer wknkc;

    /**
     * 仓内吊顶0、无。1、有
     */
    @ApiModelProperty(value = "仓内吊顶0、无。1、有", example = "eg:仓房结构  长度20")
    @Column(name = "cndd")
    private Integer cndd;

    /**
     * 仓内保温吊顶0、无。1、有
     */
    @ApiModelProperty(value = "仓内保温吊顶0、无。1、有", example = "eg:仓房结构  长度20")
    @Column(name = "cdbwdd")
    private Integer cdbwdd;

    /**
     * 隔层排积热0、无。1、有
     */
    @ApiModelProperty(value = "隔层排积热0、无。1、有", example = "eg:仓房结构  长度20")
    @Column(name = "gcpjr")
    private Integer gcpjr;

    /**
     * 仓顶外隔热层0、无。1、有
     */
    @ApiModelProperty(value = "仓顶外隔热层0、无。1、有", example = "eg:仓房结构  长度20")
    @Column(name = "cdwgrc")
    private Integer cdwgrc;

    /**
     * 保温墙体0、无。1、有
     */
    @ApiModelProperty(value = "保温墙体0、无。1、有", example = "eg:仓房结构  长度20")
    @Column(name = "bwqt")
    private Integer bwqt;

    /**
     * 保温涂料0、无。1、有
     */
    @ApiModelProperty(value = "保温涂料0、无。1、有", example = "eg:仓房结构  长度20")
    @Column(name = "bwtl")
    private Integer bwtl;

    /**
     * 制冷设备0、无。1、有
     */
    @ApiModelProperty(value = "制冷设备0、无。1、有", example = "eg:仓房结构  长度20")
    @Column(name = "zlsb")
    private Integer zlsb;

    /**
     * 地笼通风0、无。1、有
     */
    @ApiModelProperty(value = "地笼通风0、无。1、有", example = "eg:仓房结构  长度20")
    @Column(name = "dltf")
    private Integer dltf;

    /**
     * 轴流通风0、无。1、有
     */
    @ApiModelProperty(value = "轴流通风0、无。1、有", example = "eg:仓房结构  长度20")
    @Column(name = "zltf")
    private Integer zltf;

    /**
     * 电子测温0、无。1、有
     */
    @ApiModelProperty(value = "电子测温0、无。1、有", example = "eg:仓房结构  长度20")
    @Column(name = "dzcw")
    private Integer dzcw;

    /**
     * 自动流粮口0、无。1、有
     */
    @ApiModelProperty(value = "自动流粮口0、无。1、有", example = "eg:仓房结构  长度20")
    @Column(name = "zdllk")
    private Integer zdllk;

    /**
     * 环流熏蒸0、无。1、有
     */
    @ApiModelProperty(value = "环流熏蒸0、无。1、有", example = "eg:仓房结构  长度20")
    @Column(name = "hlxz")
    private Integer hlxz;

    /**
     * 仓内环流0、无。1、有
     */
    @ApiModelProperty(value = "仓内环流0、无。1、有", example = "eg:仓房结构  长度20")
    @Column(name = "cnhl")
    private Integer cnhl;


    /**
     * 有效仓容(总库容）
     */
    @ApiModelProperty(value = "有效仓容", example = "eg:仓房结构  长度20")
    @Column(name = "kdyxcr")
    private Double kdyxcr;

    /**
     * 总仓房数
     */
    @ApiModelProperty(value = "总仓房数", example = "eg:仓房结构  长度20")
    @Column(name = "cfs")
    private Integer cfs;


    /**
     * 单位名称
     */
    @ApiModelProperty(value = "单位名称", example = "eg:仓房结构  长度20")
    @Column(name = "qymc")
    private String qymc;

    /**
     * 单位地址
     */
    @ApiModelProperty(value = "单位地址", example = "eg:仓房结构  长度20")
    @Column(name = "qytxdz")
    private String qytxdz;

    /**
     * 单位负责人
     */
    @ApiModelProperty(value = "单位负责人")
    @Column(name = "fddbr")
    private String fddbr;

    /**
     * 是否备案，<br/>
     * 0，未备案，1，待提交，2待审核，3已驳回，
     * <s>4，已备案</s>
     * <br/>
     * 5 通过
     * */
    @ApiModelProperty(value = "是否备案，0，未备案，1，待提交，2待审核，3已驳回，4，已备案", notes = "是否备案，0，未备案，1，待提交，2待审核，3已驳回，4，已备案", required = false)
    @Column(name = "sfba")
    private Integer sfba;

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

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

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

    @ApiModelProperty(value = "建设时间", notes = "建设时间", example = "2019-09-24 12:00:00  Date_Time")
    @Column(name = "jssj")
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date jssj;

    private String startJssj;

    private String endJssj;

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

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

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

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

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

    @ApiModelProperty(value = "仓房使用情况，0：停用，1：闲置，2：储粮，3：物资，4：他用", notes = "仓房使用情况，0：停用，1：闲置，2：储粮，3：物资，4：他用", required = false, example = "eg:0")
    @Column(name = "cfsyqk")
    private Integer cfsyqk;

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

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

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

    @ApiModelProperty(value = "仓门信息列表")
    private List<WarehouseDoorVO> warehouseDoorVOList;

    @ApiModelProperty(value = "货位信息列表")
    private List<DHwxxsjyVO> hwxxsjyVOList;

    @ApiModelProperty(value = "粮食库存品种名称")
    @Column(name = "lspzmc")
    private String lspzmc;

    @ApiModelProperty(value = "封仓数据")
    @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;

    @ApiModelProperty(value = "状态集合")
    private String[] zts;

    @ApiModelProperty(value = "审核人")
    @Column(name = "shrmc")
    private String shrmc;

    @ApiModelProperty(value = "审核时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @Column(name = "shsj")
    private Date shsj;

    @ApiModelProperty(value = "审核人")
    @Column(name = "shyj")
    private String shyj;

    @ApiModelProperty(value = "审核人")
    private List<String> cfbhs;

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

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

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

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

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

    @ApiModelProperty(value = "仓房编码")
    @Column(name = "cfbm")
    private String cfbm;

    @ApiModelProperty(value = "企业编码")
    @Column(name = "qybm")
    private String qybm;

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

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

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

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

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

    @ApiModelProperty(value = "仓容（以三等小麦计）")
    private BigDecimal zcr;

    /*
     * -------------------仓房-----以下为修改过后的----------------------------
     */

    /**
     * 仓房编号
     */
    @ApiModelProperty(value = "仓房编号")
    private String cfbh;

    /**
     * 仓房名称
     */
    @ApiModelProperty(value = "仓房名称")
    private String cfmc;

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

    /**
     * 所属库点编号
     */
    @ApiModelProperty(value = "库区代码", notes = "length: 21")
    private String kddm;

    /**
     * 库区代码: 遵循国粮局规范的库区编码
     */
    @ApiModelProperty(value = "库区代码: 遵循国粮局规范的库区编码", notes = "length: 21")
    private String kqdm;

    /**
     * 仓房类型代码
     * 对应国粮局 cflxdm
     */
    @ApiModelProperty(value = "仓房类型", example = "10101 平房仓; 10102 筒仓; 10103 浅圆仓; 10104 楼房仓; 10105 地下仓")
    private String cflxbh;

    /**
     * 交付使用日期
     */

    @ApiModelProperty(value = "交付使用日期", notes = "格式 yyyy-MM-dd")
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date jfsyrq;

    /**
     * 墙体结构
     */
    @ApiModelProperty(value = "墙体结构")
    @NotBlank(message = "请填写正确墙体结构")
    @Pattern(regexp = "^01$|^02$|^03$|^04$|^99$",message = "请填写正确墙体结构")
    private String qtjg;

    /**
     * 房顶结构
     */
    @ApiModelProperty(value = "房顶结构")
    @NotBlank(message = "请填写正确房顶结构")
    @Pattern(regexp = "^01$|^02$|^03$|^04$|^05$|^06$",message = "请填写正确房顶结构")
    private String fdjg;

    /**
     * 房架结构
     */
    @ApiModelProperty(value = "房架结构")
    @NotBlank(message = "请填写正确房架结构")
    @Pattern(regexp = "^01$|^02$|^03$|^04$|^05$|^06$|^07$",message = "请填写正确房架结构")
    private String fjjg;

    /**
     * 地面结构
     */
    @ApiModelProperty(value = "地面结构")
    @NotBlank(message = "请填写正确地面结构")
    @Pattern(regexp = "^01$|^02$|^03$|^04$|^05$|^06$",message = "请填写正确地面结构")
    private String dmjg;

    /**
     * 设计仓容
     */
    @ApiModelProperty(value = "设计仓容")
    private Double sjcr;

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

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

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

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

    /**
     * 筒仓外径
     * 对应国粮局 tcwj
     */
    @ApiModelProperty(value = "筒仓外径", notes = "BigDecimal(20,6)")
    private BigDecimal cwtcwj;

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

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

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

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

    /**
     * 筒仓内径
     * BigDecimal(20,6)
     * 对应国粮局 tcnj
     */
    @ApiModelProperty(value = "筒仓内径", notes = "BigDecimal(20,6)")
    private BigDecimal cntcnj;

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

    /**
     * 挡粮门型式
     */
    @ApiModelProperty(value = "挡粮门型式", example = "01 “一字型” 挡粮板; 02 “三角形” 挡粮门")
    @NotBlank(message = "请填写正确挡粮门型式")
    @Pattern(regexp = "^01$|^02$|^03$|^04$|^05$|^06$",message = "请填写正确挡粮门型式")
    private String dlmxs;

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

    /**
     * 储粮功效
     */
    @ApiModelProperty(value = "储粮功效")
    @NotBlank(message = "请填写正确储粮功效")
    @Pattern(regexp = "^0$|^1$|^2$|^3$",message = "请填写正确储粮功效")
    private String clgx;

    /**
     * 能否隔热保温
     */
    @ApiModelProperty(value = "能否隔热保温")
    @NotBlank(message = "请填写正确能否隔热保温")
    @Pattern(regexp = "^0$|^1$|^9$",message = "请填写正确能否隔热保温")
    private String nfgrbw;

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

    /**
     * 隔热性能
     */
    @ApiModelProperty(value = "隔热性能")
    @NotBlank(message = "请填写正确隔热性能")
    @Pattern(regexp = "^$|^1$|^2$|^3$|^4$",message = "请填写正确隔热性能")
    private String grxn;

    /**
     * 结构材料
     */
    @ApiModelProperty(value = "结构材料")
    @NotBlank(message = "请填写正确结构材料")
    @Pattern(regexp = "^1$|^2$|^3$",message = "请填写正确结构材料")
    private String jgcl;

    /**
     * 气密性
     */
    @ApiModelProperty(value = "气密性")
    @NotBlank(message = "请填写正确气密性")
    @Pattern(regexp = "^$|^1$|^2$|^3$|^4$",message = "请填写正确气密性")
    private String qmx;

    /**
     * 是否已进行信息化改造
     * 0：否1：是
     */
    @ApiModelProperty(value = "是否已进行信息化改造")
    private String sfyjxxxhgz;

    /**
     * 粮情技术
     */
    @ApiModelProperty(value = "粮情技术", notes = "length: 1")
    private String lqjs;

    /**
     * 能否散装储存
     * 1:有; 0:无; 9:其他或不确定;
     */
    @ApiModelProperty(value = "能否散装储存", notes = "1:有; 0:无; 9:其他或不确定;")
    private Integer sfszcc;

    /**
     * 有无防鼠防雀防虫装置及设施
     * 1:有; 0:无; 9:其他或不确定;
     */
    @ApiModelProperty(value = "有无防鼠防雀防虫装置及设施")
    @NotBlank(message = "请填写正确有无防鼠防雀防虫装置及设施")
    @Pattern(regexp = "^0$|^1$|^9$",message = "请填写正确有无防鼠防雀防虫装置及设施")
    private String ywfsfqfczz;


    /**
     * 有无防火防爆防盗设施
     * 1:有; 0:无; 9:其他或不确定;
     */
    @ApiModelProperty(value = "有无防火防爆防盗设施")
    private String ywfhfbfdss;

    /**
     * 有无机械通风设施
     * 1:有; 0:无; 9:其他或不确定;
     */
    @ApiModelProperty(value = "有无机械通风设施 0:无 1:有")
    private Integer ywjxtfss;

    /**
     * 通风系统型式
     * 0：竖向通风1：横向通风2：径向通风3：全网板通风4：其它
     */
    @ApiModelProperty(value = "通风系统型式: 0：竖向通风1：横向通风2：径向通风3：全网板通风4：其它")
    private String tfxtxs;

    /**
     * 通风技术
     * 1：Ⅰ级
     * 2：Ⅱ级
     * 3：Ⅲ级
     */
    @ApiModelProperty(value = "通风技术", example = "1：Ⅰ级; 2：Ⅱ级; 3：Ⅲ级")
    private String tfjs;

    /**
     * 能否环流熏蒸杀虫
     * 标准：nfhlxzsc
     */
    @ApiModelProperty(value = "能否环流熏蒸杀虫 0:否 1:能")
    private Integer nfxlsc;

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

    /**
     * 能否富氮低氧气调储粮
     */
    @ApiModelProperty(value = "能否富氮低氧气调储粮")
    @NotBlank(message = "请填写正确能否富氮低氧气调储粮")
    @Pattern(regexp = "^0$|^1$|^9$",message = "请填写正确能否富氮低氧气调储粮")
    private String nffddyqtcl;

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

    /**
     * 害虫检测方式
     */
    @ApiModelProperty(value = "害虫检测方式", notes = "固定值02")
    private String hcjcfs;

    /**
     * 仓房状态
     */
    @ApiModelProperty(value = "仓房状态", example = "1:完好; 2:需小修; 3:需大修; 4:待报废; 5:待拆除; 6:死角仓;7：报废; 9:其他;")
    @NotBlank(message = "请填写正确仓房状态")
    @Pattern(regexp = "^1$|^2$|^3$|^4$|^5$|^6$|^7$|^9$",message = "请填写正确仓房状态")
    private String cfzt;

    /**
     * 保管员信息
     */
    @ApiModelProperty(value = "保管员信息")
    @NotBlank(message = "请填写正确保管员信息")
    @Pattern(regexp = "[^暂无|测试|无|空]+",message = "请填写正确保管员信息")
    private String bgr;

    /**
     * 纬度
     */
    @ApiModelProperty(value = "纬度", example = "eg:仓房结构  长度20")
    private Double wd;

    /**
     * 精度
     */
    @ApiModelProperty(value = "精度", example = "eg:仓房结构  长度10，保留小数点后六位")
    @Column(name = "jd")
    private Double jd;


    /**
     * ------------------廒间----以下是修改后的------------------------
     */

    /**
     * 启用日期
     * 廒间启用日期、货位启用日期都是此字段
     */
    @ApiModelProperty(value = "启用日期")
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date qyrq;

    /**
     * ------------------货位----以下是修改后的------------------------
     */

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

    /**
     * ------------------------------市平台业务新增字段-------------------------------------
     */

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

    @ApiModelProperty(value = "标准仓房代码")
    @Pattern(regexp = "^[A-Z0-9]{2}[0-9]{6}[A-Z0-9]{10}[0-9]{7}$",message = "标准仓房代码不正确")
    private String gfcfdm;

    @ApiModelProperty(value = "标准仓房名称")
    @NotBlank(message = "请填写正确仓房名称")
    @Pattern(regexp = "[^暂无|测试|无|空]+",message = "请填写正确仓房名称")
    private String gfcfmc;

    @ApiModelProperty(value = "标准廒间代码")
    private String ajdh;

    @ApiModelProperty(value = "标准货位代码", notes = "标准货位代码")
    private String hwdm;

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

    @ApiModelProperty(value = "是否是导入数据")
    private Boolean isImport;

    @ApiModelProperty(value="是否可删除，0 可删除 1 不可删除", example = "eg:是否可删除，0 可删除 1 不可删除")
    private String delFlag;

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

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

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

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

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

    @ApiModelProperty(value = "储粮总仓容")
    private BigDecimal clzcr;

    @ApiModelProperty(value = "储粮空仓容")
    private BigDecimal clkcr;

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

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

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

    @ApiModelProperty(value = "仓房 0:仓房,1:油罐")
    @Column(name = "cf_type")
    private String cfType;

    @ApiModelProperty(value = "包装类型")
    @Column(name = "package_type")
    private String packageType;

    public List<DCfxxsjyUpdateLogVO> checkInfo(DCfxxsjyVO afterData) {
        List<DCfxxsjyUpdateLogVO> dataList = new ArrayList<>();
        DCfxxsjyUpdateLogVO data1 = new DCfxxsjyUpdateLogVO(afterData.getTyshxydm(), this.gfcfdm, this.gfcfmc, DCfxxsjyUpdateLogVO.COL.CFYT.getName(),this.cfyt, afterData.getCfyt());
        dataList.add(data1);
        DCfxxsjyUpdateLogVO data2 = new DCfxxsjyUpdateLogVO(afterData.getTyshxydm(), this.gfcfdm, this.gfcfmc, DCfxxsjyUpdateLogVO.COL.CFZT.getName(), this.getCfzt(), afterData.getCfzt());
        dataList.add(data2);
        return dataList;
    }

    /**
     * 是否备案，<br/>
     * 0，未备案，1，待提交，2待审核，3已驳回，
     * <s>4，已备案</s>
     * <br/>
     * 5 通过
     * */
    public enum SFBA{
        /**待提交 1*/
        DTJ(1, "待提交"),
        /**待审核 2*/
        DSH(2, "待审核"),
        /**已驳回 3*/
        YBH(3, "已驳回"),
        /**通过 5*/
        TG(5, "通过");
        @Setter
        @Getter
        private Integer value;
        @Setter
        @Getter
        private String name;

        SFBA(Integer value, String name) {
            this.value = value;
            this.name = name;
        }

        public boolean equalsVal(Integer arg) {
            return Objects.equals(this.value, arg);
        }
    }

    public enum UPDATE_RES{
        INVALID(-3, "变更原因 (状态、用途变更时，必须填写)");
        @Getter
        private Integer value;
        @Getter
        private String name;

        UPDATE_RES(Integer value, String name) {
            this.value = value;
            this.name = name;
        }

        public boolean equalVal(Integer arg) {
            return Objects.equals(this.value, arg);
        }
    }
}
