package com.prolog.cs.base.gsp.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.prolog.framework.core.annotation.Column;
import com.prolog.framework.core.annotation.Id;
import com.prolog.framework.core.annotation.Ignore;
import com.prolog.framework.core.annotation.Table;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

/**
 * @Description
 * @Date 2021-05-19
 */

@ApiModel
@Data
@Table(value = "gsp_upkeep_check")
public class GspUpkeepCheck implements Serializable {
    private static final long serialVersionUID = 6278321957398812097L;
    @Id
    @ApiModelProperty(value = "ID")
    @Column(value = "id")
    private String id;

    @ApiModelProperty(value = "养护明细单号")
    @Column(value = "code")
    private String code;

    @ApiModelProperty(value = "企业ID")
    @Column(value = "enterprise_id")
    private String enterpriseId;

    @ApiModelProperty(value = "仓配中心ID")
    @Column(value = "dc_id")
    private String dcId;

    @ApiModelProperty(value = "仓ID")
    @Column(value = "warehouse_id")
    private String warehouseId;

    @ApiModelProperty(value = "货主ID")
    @Column(value = "cargo_owner_id")
    private String cargoOwnerId;

    @ApiModelProperty(value = "批次ID")
    @Column(value = "batch_id")
    private String batchId;

    @ApiModelProperty(value = "养护计划ID")
    @Column(value = "plan_id")
    private String planId;

    @ApiModelProperty(value = "养护计划CODE")
    @Column(value = "plan_code")
    private String planCode;

    @ApiModelProperty(value = "商品ID")
    @Column(value = "item_id")
    private String itemId;

    @ApiModelProperty(value = "商品编号")
    @Column(value = "item_code")
    private String itemCode;

    @ApiModelProperty(value = "商品条码")
    @Column(value = "item_barcode")
    private String itemBarcode;

    @ApiModelProperty(value = "批号")
    @Column(value = "LOT_NUM")
    private String lotNum;

    @ApiModelProperty(value = "货位ID")
    @Column(value = "locator_id")
    private String locatorId;

    @ApiModelProperty(value = "货位编号")
    @Column(value = "locator_code")
    private String locatorCode;

    @ApiModelProperty(value = "库存数量")
    @Column(value = "stock_qty")
    private String stockQty;

    @ApiModelProperty(value = "养护数量")
    @Column(value = "upkeep_qty")
    private String upkeepQty;

    @ApiModelProperty(value = "养护待处理数量")
    @Column(value = "pending_qty")
    private BigDecimal pendingQty;

    @ApiModelProperty(value = "养护类型：(0=一般 1=重点)")
    @Column(value = "IS_PROTECTED")
    private Integer isProtected;

    @ApiModelProperty(value = "类型：0=未分类 1=重点特殊药品，2=重点专管药品，3=重点其他药品，4=重点医疗器械，5=重点非药品，3=一般药品，4=一般器械，5=一般非药品")
    @Column(value = "UPKEEP_TYPE")
    private Integer upkeepType;

    @ApiModelProperty(value = "养护员")
    @Column(value = "upkeep_operator")
    private String upkeepOperator;

    @ApiModelProperty(value = "状态：0初始，1-正常无需质检，2-质检，3-质检无需复检，4-复检，5-复检完成，6-发起移库完成")
    @Column(value = "status")
    private String status;

    @ApiModelProperty(value = "来源：0-自动；1手动")
    @Column(value = "source_type")
    private String sourceType;

    @ApiModelProperty(value = "养护结论：0=待处理，1=合格，2=不合格")
    @Column(value = "upkeep_conclusion")
    private Integer upkeepConclusion;

    @ApiModelProperty(value = "一级审核结论：0=待处理，1=合格，2=不合格")
    @Column(value = "check_conclusion")
    private Integer checkConclusion;

    @ApiModelProperty(value = "二级审核结论：1=合格, 2=不合格入不合格库 3=不合格入不合格库")
    @Column(value = "recheck_conclusion")
    private Integer recheckConclusion;

    @ApiModelProperty(value = "最终结论：1=合格，2=不合格入不合格库 3=不合格入不合格库")
    @Column(value = "conclusion")
    private Integer conclusion;

    @ApiModelProperty(value = "处理意见")
    @Column(value = "process_opinion")
    private String processOpinion;

    @ApiModelProperty(value = "审核员")
    @Column(value = "check_operator")
    private String checkOperator;

    @ApiModelProperty(value = "审核意见")
    @Column(value = "check_opinion")
    private String checkOpinion;

    @ApiModelProperty(value = "复检员")
    @Column(value = "recheck_operator")
    private String recheckOperator;

    @ApiModelProperty(value = "复检意见")
    @Column(value = "recheck_opinion")
    private String recheckOpinion;

    @ApiModelProperty(value = "外观(0=未选 1=已选)")
    @Column(value = "check_wai_guan")
    private Boolean checkWaiGuan;

    @ApiModelProperty(value = "包装(0=未选 1=已选)")
    @Column(value = "check_bao_zhuang")
    private Boolean checkBaoZhuang;

    @ApiModelProperty(value = "存储条件(0=未选 1=已选)")
    @Column(value = "check_chen_chu_tiao_jian")
    private Boolean checkChenChuTiaoJian;

    @ApiModelProperty(value = "翻跺(0=未选 1=已选)")
    @Column(value = "check_fan_duo")
    private Boolean checkFanDuo;

    @ApiModelProperty(value = "除湿(0=未选 1=已选)")
    @Column(value = "check_chu_shi")
    private Boolean checkChuShi;

    @ApiModelProperty(value = "加湿(0=未选 1=已选)")
    @Column(value = "check_jia_shi")
    private Boolean checkJiaShi;

    @ApiModelProperty(value = "升温(0=未选 1=已选)")
    @Column(value = "check_shen_wen")
    private Boolean checkShenWen;

    @ApiModelProperty(value = "降温(0=未选 1=已选)")
    @Column(value = "check_jiang_wen")
    private Boolean checkJiangWen;

    @ApiModelProperty(value = "通风(0=未选 1=已选)")
    @Column(value = "check_tong_feng")
    private Boolean checkTongFeng;

    @ApiModelProperty(value = "除尘(0=未选 1=已选)")
    @Column(value = "check_chu_chen")
    private Boolean checkChuChen;

    @ApiModelProperty(value = "质量状况：0=未确定 1=合格 2=不合格")
    @Column(value = "quality_status")
    private String qualityStatus;

    @ApiModelProperty(value = "温湿度状况")
    @Column(value = "ths_tatus")
    private String thsTatus;

    @ApiModelProperty(value = "养护待处理原因")
    @Column(value = "pending_reason")
    private String pendingReason;

    @ApiModelProperty(value = "计划养护时间")
    @Column(value = "plan_upkeep_date")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date planUpkeepDate;

    @ApiModelProperty(value = "养护时间")
    @Column(value = "upkeep_date")
    private Date upkeepDate;

    @ApiModelProperty(value = "一检时间")
    @Column(value = "check_date")
    private Date checkDate;

    @ApiModelProperty(value = "复检日期")
    @Column(value = "recheck_date")
    private Date recheckDate;

    //@ApiModelProperty(value = "生产日期")
    @Column(value = "PDATE_FROM")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date pdateFrom;

    //@ApiModelProperty(value = "有效期至")
    @Column(value = "VALID_UNTIL")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date validUntil;

    //@ApiModelProperty(value = "创建日期")
    @Column(value = "gmt_create")
    private Date gmtCreate;

    //@ApiModelProperty(value = "创建人")
    @Column(value = "creator")
    private String creator;

    //@ApiModelProperty(value = "创建人")
    @Column(value = "creator_name")
    private String creatorName;

    //@ApiModelProperty(value = "最后修改日期")
    @Column(value = "gmt_modified")
    private Date gmtModified;

    @ApiModelProperty(value = "最后修改人")
    @Column(value = "modifier")
    private String modifier;

    @ApiModelProperty(value = "最后修改人")
    @Column(value = "modifier_name")
    private String modifierName;

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

    @ApiModelProperty(value = "建筑物ID")
    @Column(value = "BLDG_ID")
    private String bldgId;

    @ApiModelProperty(value = "商品大类(字典) (对应ERP药品大类)(oms增加)")
    @Column(value = "ITEM_HEALTH_CATEGORY")
    private String itemHealthCategory;

    @Ignore
    @ApiModelProperty(value = "仓库")
    private String warehouseName;

    @Ignore
    @ApiModelProperty(value = "货主")
    private String cargoOwnerName;

    @Ignore
    @ApiModelProperty(value = "商品名称")
    private String itemName;

    @Ignore
    @ApiModelProperty(value = "货位")
    private String locatorName;

    @Ignore
    @ApiModelProperty(value = "生产日期")
    private String productionDate;

    @Ignore
    @ApiModelProperty(value = "有效期至日期")
    private String expiredDate;

    @Ignore
    @ApiModelProperty(value = "显示生产日期")
    private String showProductionDate;

    @Ignore
    @ApiModelProperty(value = "显示有效期至日期")
    private String showExpiredDate;

    @Ignore
    @ApiModelProperty(value = "上市许可持有人")
    private String itemHealthListedLicensor;

    @Ignore
    @ApiModelProperty(value = "下架库存状态")
    private String outStockStatus;

    @Ignore
    @ApiModelProperty(value = "上架库存状态")
    private String inStockStatus;

    @ApiModelProperty(value = "是否近效期：(0=否 1=是)")
    @Column(value = "IS_NEAR_DATE")
    private String isNearDate;

    @ApiModelProperty(value = "计划养护数量")
    @Column(value = "PLAN_STOCK_QTY")
    private String planStockQty;

    // 设备养护合格数
    @Ignore
    @ApiModelProperty(value = "设备养护合格数量")
    private String okQty;

    /**
     * 虫蛀(0=未选 1=已选)
     */
    @ApiModelProperty(value = "虫蛀(0=未选 1=已选)")
    @Column(value = "CHECK_CHONG_ZHU")
    private Boolean checkChongZhu;

    /**
     * 发霉(0=未选 1=已选)
     */
    @ApiModelProperty(value = "发霉(0=未选 1=已选)")
    @Column(value = "CHECK_FA_MEI")
    private Boolean checkFaMei;

    /**
     * 泛油(0=未选 1=已选)
     */
    @ApiModelProperty(value = "泛油(0=未选 1=已选)")
    @Column(value = "CHECK_FAN_YOU")
    private Boolean checkFanYou;

    /**
     * 潮解(0=未选 1=已选)
     */
    @ApiModelProperty(value = "潮解(0=未选 1=已选)")
    @Column(value = "CHECK_CHAO_JIE")
    private Boolean checkChaoJie;

    /**
     * 变色(0=未选 1=已选)
     */
    @ApiModelProperty(value = "变色(0=未选 1=已选)")
    @Column(value = "CHECK_BIAN_SE")
    private Boolean checkBianSe;

    /**
     * 上斗(0=未选 1=已选)
     */
    @ApiModelProperty(value = "上斗(0=未选 1=已选)")
    @Column(value = "CHECK_SHANG_DOU")
    private Boolean checkShangDou;

    /**
     * 破损(0=未选 1=已选)
     */
    @ApiModelProperty(value = "破损(0=未选 1=已选)")
    @Column(value = "CHECK_PO_SUN")
    private Boolean checkPoSun;

    /**
     * 破损(0=未选 1=已选)
     */
    @ApiModelProperty(value = "遮光(0=未选 1=已选)")
    @Column(value = "CHECK_ZHE_GUANG")
    private Boolean checkZheGuang;


    /**
     * 破损(0=未选 1=已选)
     */
    @ApiModelProperty(value = "避光(0=未选 1=已选)")
    @Column(value = "CHECK_BI_GUANG")
    private Boolean checkBiGuang;

    @ApiModelProperty(value = "是否已发出库指令（0-否；1-已发未达；2-已送达）")
    @Column(value = "outbound_instruct")
    private Integer outboundInstruct;

    @ApiModelProperty(value = "容器编码")
    @Column(value = "container_code")
    private String containerCode;

    @ApiModelProperty(value = "容器编码")
    @Column(value = "location_no")
    private String locationNo;

    @ApiModelProperty(value = "容器编码")
    @Column(value = "STORE_TEMPERATURE")
    private String storeTemperature;

    @ApiModelProperty(value = "出库库区")
    @Ignore
    private String outWhAreaCategory;
}
