package com.prolog.cs.biz.outbound.model;

import com.prolog.cs.biz.outbound.model.entity.OmsDoBillDDO;
import com.prolog.framework.core.annotation.*;
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;
import java.util.List;

/**
 * @Description
 * @Date 2021-03-25
 */
@Data
@ApiModel
@Table(value = "oms_do_bill_h")
public class OmsDoBillHDO implements Serializable {

    private static final long serialVersionUID = 1808607937857664133L;
    @Id
    @ApiModelProperty(value = "交货单表ID")
    @Column(value = "billid")
    private String billid;

    @ApiModelProperty(value = "交货单号")
    @Column(value = "billno")
    private String billno;

    /**
     * 1 正常销售
     * 2 指定批号
     * 6 越库发货
     * 7 KK
     * 8 采退合格
     * 9 采退退货
     */
    @ApiModelProperty(value = "交货单类型")
    @Column(value = "billtype")
    private String billtype;

    @ApiModelProperty(value = "交货单来源单据类型")
    @Column(value = "ref_billtype")
    private String refBilltype;

    @ApiModelProperty(value = "来源单据ID")
    @Column(value = "ref_billid")
    private String refBillid;

    @ApiModelProperty(value = "来源单据号")
    @Column(value = "ref_billno")
    private String refBillno;

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

    @ApiModelProperty(value = "货主编码")
    @Column(value = "consignorcode")
    private String consignorcode;

    @ApiModelProperty(value = "货主名称")
    @Column(value = "consignorname")
    private String consignorname;

    @ApiModelProperty(value = "出库仓库ID")
    @Column(value = "branchid")
    private String branchid;

    @ApiModelProperty(value = "出库仓库编号")
    @Column(value = "branchcode")
    private String branchcode;

    @ApiModelProperty(value = "出库仓库名称")
    @Column(value = "branchname")
    private String branchname;

    @ApiModelProperty(value = "出库仓库库区ID")
    @Column(value = "branchareaid")
    private String branchareaid;

    @ApiModelProperty(value = "出库仓库库区")
    @Column(value = "brancharea")
    private String brancharea;

    @ApiModelProperty(value = "出库仓库详细地址")
    @Column(value = "branch_address")
    private String branchAddress;

    @ApiModelProperty(value = "收货单位类型")
    @Column(value = "shipper_type")
    private String shipperType;

    @ApiModelProperty(value = "收货单位ID")
    @Column(value = "shipperid")
    private String shipperid;

    @ApiModelProperty(value = "收货单位ID")
    @Column(value = "shippercode")
    private String shipperCode;

    @ApiModelProperty(value = "收货单位名称")
    @Column(value = "shippername")
    private String shippername;

    @ApiModelProperty(value = "收货联系人")
    @Column(value = "cust_person")
    private String custPerson;

    @ApiModelProperty(value = "收货联系人电话")
    @Column(value = "cust_person_tel")
    private String custPersonTel;

    @ApiModelProperty(value = "收货国编号")
    @Column(value = "receive_country_no")
    private String receiveCountryNo;

    @ApiModelProperty(value = "收货国")
    @Column(value = "receive_country_name")
    private String receiveCountryName;

    @ApiModelProperty(value = "收货省编号")
    @Column(value = "receive_province_no")
    private String receiveProvinceNo;

    @ApiModelProperty(value = "收货省")
    @Column(value = "receive_province_name")
    private String receiveProvinceName;

    @ApiModelProperty(value = "收货市编号")
    @Column(value = "receive_city_no")
    private String receiveCityNo;

    @ApiModelProperty(value = "收货市")
    @Column(value = "receive_city_name")
    private String receiveCityName;

    @ApiModelProperty(value = "收货区/县编号")
    @Column(value = "receive_district_no")
    private String receiveDistrictNo;

    @ApiModelProperty(value = "收货区/县")
    @Column(value = "receive_district_name")
    private String receiveDistrictName;

    @ApiModelProperty(value = "收货街道/乡镇编号")
    @Column(value = "receive_town_no")
    private String receiveTownNo;

    @ApiModelProperty(value = "收货街道/乡镇")
    @Column(value = "receive_town_name")
    private String receiveTownName;

    @ApiModelProperty(value = "收货社区/村编号")
    @Column(value = "receive_community_no")
    private String receiveCommunityNo;

    @ApiModelProperty(value = "收货社区/村")
    @Column(value = "receive_community_name")
    private String receiveCommunityName;

    @ApiModelProperty(value = "收货详细地址")
    @Column(value = "receive_address")
    private String receiveAddress;

    @ApiModelProperty(value = "运输条件")
    @Column(value = "ship_term")
    private String shipTerm;

    @ApiModelProperty(value = "到货方式 1：集团连锁 2：市外配送 3：市内配送 4：托运 5：自提")
    @Column(value = "ARRIVAL_MODE")
    private String arrivalMode;

    @ApiModelProperty(value = "订单紧急等级")
    @Column(value = "priority_level")
    private String priorityLevel;

    @ApiModelProperty(value = "运输路线ID")
    @Column(value = "ship_line_id")
    private String shipLineId;

    @ApiModelProperty(value = "物流商ID")
    @Column(value = "carrier_id")
    private String carrierId;

    @ApiModelProperty(value = "物流商名称")
    @Column(value = "carrier_name")
    private String carrierName;

    @ApiModelProperty(value = "物流商编码")
    @Column(value = "carrier_code")
    private String carrierCode;

    @ApiModelProperty(value = "物流商类型(1快递；2物流 3快运)")
    @Column(value = "carrier_type")
    private String carrierType;

    @ApiModelProperty(value = "销售员/业务员ID")
    @Column(value = "salesperson_id")
    private String salespersonId;

    @ApiModelProperty(value = "销售员/业务员名称")
    @Column(value = "salesperson_name")
    private String salespersonName;

    @ApiModelProperty(value = "状态 10-未下发 20-已下发 30-已确认(代管/待检) 5-已取消")
    @Column(value = "status")
    private String status;

    @ApiModelProperty(value = "制单日期")
    @Column(value = "bill_date")
    private Date billDate;

    @ApiModelProperty(value = "预定到货日")
    @Column(value = "attain_date")
    private Date attainDate;

    @ApiModelProperty(value = "审核状态")
    @Column(value = "examine_state")
    private String examineState;

    @ApiModelProperty(value = "总件数")
    @Column(value = "tot_pcs")
    private BigDecimal totPcs;

    @ApiModelProperty(value = "总数量")
    @Column(value = "tot_qty")
    private BigDecimal totQty;

    @ApiModelProperty(value = "包装数量")
    @Column(value = "containers_num")
    private BigDecimal containersNum;

    @ApiModelProperty(value = "总拼箱数")
    @Column(value = "tot_box_num")
    private BigDecimal totBoxNum;

    @ApiModelProperty(value = "总重量")
    @Column(value = "tot_weight")
    private BigDecimal totWeight;

    @ApiModelProperty(value = "总体积")
    @Column(value = "tot_volume")
    private BigDecimal totVolume;

    @ApiModelProperty(value = "总未税金额")
    @Column(value = "totnetamt")
    private BigDecimal totnetamt;

    @ApiModelProperty(value = "总含税金额")
    @Column(value = "totamt")
    private BigDecimal totamt;

    @ApiModelProperty(value = "退货原因")
    @Column(value = "rt_reason")
    private String rtReason;

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

    @Column(value = "caozy")
    private String caozy;

    @ApiModelProperty(value = "作废原因")
    @Column(value = "closed_reason")
    private String closedReason;

    @ApiModelProperty(value = "字符扩展属性1")
    @Column(value = "attr_str1")
    private String attrStr1;

    @ApiModelProperty(value = "字符扩展属性2")
    @Column(value = "attr_str2")
    private String attrStr2;

    @ApiModelProperty(value = "是否打印首营资料")
    @Column(value = "attr_str3")
    private String attrStr3;

    @ApiModelProperty(value = "是否打印质检报告单")
    @Column(value = "attr_str4")
    private String attrStr4;

    @ApiModelProperty(value = "是否打印发票")
    @Column(value = "attr_str5")
    private String attrStr5;

    @ApiModelProperty(value = "收货人(客户)身份证号码")
    @Column(value = "attr_str6")
    private String attrStr6;

    @ApiModelProperty(value = "出库清单模板 1: 通用版 2: 折后版 3：商品分类版")
    @Column(value = "attr_str7")
    private String attrStr7;

    @ApiModelProperty(value = "字符扩展属性8")
    @Column(value = "attr_str8")
    private String attrStr8;

    @ApiModelProperty(value = "是否回写中间表")
    @Column(value = "attr_str9")
    private String attrStr9;

    @ApiModelProperty(value = "字符扩展属性10")
    @Column(value = "attr_str10")
    private String attrStr10;

    @ApiModelProperty(value = "数字扩展属性1")
    @Column(value = "attr_num1")
    private BigDecimal attrNum1;

    @ApiModelProperty(value = "数字扩展属性2")
    @Column(value = "attr_num2")
    private BigDecimal attrNum2;

    @ApiModelProperty(value = "数字扩展属性3")
    @Column(value = "attr_num3")
    private BigDecimal attrNum3;

    @ApiModelProperty(value = "数字扩展属性4")
    @Column(value = "attr_num4")
    private BigDecimal attrNum4;

    @ApiModelProperty(value = "数字扩展属性5")
    @Column(value = "attr_num5")
    private BigDecimal attrNum5;

    @ApiModelProperty(value = "日期属性扩展1")
    @Column(value = "attr_dte1")
    private Date attrDte1;

    @ApiModelProperty(value = "日期属性扩展2")
    @Column(value = "attr_dte2")
    private Date attrDte2;

    @ApiModelProperty(value = "日期属性扩展3")
    @Column(value = "attr_dte3")
    private Date attrDte3;

    @ApiModelProperty(value = "日期属性扩展4")
    @Column(value = "attr_dte4")
    private Date attrDte4;

    @ApiModelProperty(value = "日期属性扩展5")
    @Column(value = "attr_dte5")
    private Date attrDte5;

    @ApiModelProperty(value = "录入员")
    @Column(value = "createby")
    private String createby;

    @ApiModelProperty(value = "录入时间")
    @Column(value = "createdate")
    private Date createdate;

    @ApiModelProperty(value = "修改人")
    @Column(value = "lastmodifyby")
    private String lastmodifyby;

    @ApiModelProperty(value = "修改时间")
    @Column(value = "lastmodifydate")
    private Date lastmodifydate;

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

    @ApiModelProperty(value = "企业名称")
    @Column(value = "p_enterprisename")
    private String enterpriseName;

    @ApiModelProperty(value = "业务员部门")
    @Column(value = "sale_branchname")
    private String saleBranchname;

    @ApiModelProperty(value = "是否紧急")
    @Column(value = "is_emergency")
    private Integer isEmergency;

    @ApiModelProperty(value = "购销合同号")
    @Column(value = "SALESCONTRNUMB")
    private String salesContrNumb;

	@ApiModelProperty(value = "账期类型")
    @Column(value = "PAYMENTDAYTYPE")
    private String paymentDayType;

    @ApiModelProperty(value = "是否取消（冲红）")
    @Column(value = "is_cancelled")
    private Integer isCancelled;

    @ApiModelProperty(value = "冲红原因")
    @Column(value = "red_reason")
    private String redReason;

    /**
     * 0:未冲红
     * 1:部分冲红
     * 2:整单冲红
     */
    @ApiModelProperty(value = "是否部分红冲")
    @Column(value = "partly_red")
    private BigDecimal partlyRed;

    @ApiModelProperty(value = "线路编码")
    @Column(value = "line_code")
    private String lineCode;

    @ApiModelProperty(value = "线路名称")
    @Column(value = "line_name")
    private String lineName;

    @ApiModelProperty(value = "账期类型编码")
    @Column(value = "PAYMENTDAYTYPECODE")
    private String paymentDayTypeCode;

    @ApiModelProperty(value = "当前页码")
    @Ignore
    private Integer pageSize;

    @ApiModelProperty(value = "每页数量")
    @Ignore
    private Integer pageNum;

    @ApiModelProperty(value = "出库单行集合")
    @Ignore
    private List<OmsDoBillDDO> omsDoBillDDOList;

    @ApiModelProperty(value = "销售制单开始日期")
    @Ignore
    private Date billDateStart;

    @ApiModelProperty(value = "销售制单结束日期")
    @Ignore
    private Date billDateEnd;

    @ApiModelProperty(value = "到货开始日期")
    @Ignore
    private Date attainDateStart;

    @ApiModelProperty(value = "到货结束日期")
    @Ignore
    private Date attainDateEnd;

    @ApiModelProperty(value = "是否待检品出库")
    @Column(value = "isUnchecproducts")
    private String isUnchecproducts;

    @ApiModelProperty(value = "要货部门")
    @Column(value = "ENQUIRYDEPARTMENT")
    private String enquiryDepartment;

    @Column(value = "cus_remark")
    private String cusRemark;

    @Column(value = "department")
    private String department;

    @Column(value = "sf_zzdy")
    private String sfZzdy;

    @Column("printtemplateno")
    private String printtemplateno;

    @Column(value = "jjk")
    private BigDecimal jjk;

    @Column(value = "operationlicenseno")
    private String operationlicenseno;

    @Column(value = "cx_memberno")
    private String cxMemberno;

    @Column(value = "cx_membername")
    private String cxMembername;

    @Column(value = "idcard")
    private String idcard;

    @ApiModelProperty(value = "单据类型")
    @Ignore
    private String type;

    @Column("src_plate")
    private String srcPlate;

    @Column("src_plate_billno")
    private String srcPlateBillno;


    /**
     * 运费
     */
    @Column("freight")
    private BigDecimal freight;

    /**
     * 运单号
     */
    @Column("ship_bill_no")
    private String shipBillNo;

    /**
     * 提货方式（河南省医药需核实是否是到货方式字段）
     *  1：集团连锁
     *  2：市外配送
     *  3：市内配送
     *  4：托运
     *  5：自提
     */
    @Column("take_mode")
    private Integer takeMode;

    /**
     * 运输方式
     * 1:汽车
     * 2:铁路
     * 3:航空
     * 4:海运
     */
    @Column("transport_mode")
    private Integer transportMode;


    /**
     * 业务员电话
     */
    @Column("salesperson_tel")
    private String salespersonTel;

    /**
     * 制单人
     */
    @Column("prepared_by")
    private String preparedBy;

    /**
     * 支付时间
     */
    @Column("paytime")
    private Date paytime;

    /**
     * 支付金额
     */
    @Column("payamount")
    private BigDecimal payamount;

    /**
     * 支付流水号
     */
    @Column("paysn")
    private String paysn;

    /**
     * 来源店铺编码
     */
    @Column("shopcode")
    private String shopcode;

    /**
     * 店铺名称
     */
    @Column("shopname")
    private String shopname;

    /**
     * 预计发货时间
     */
    @Column("plan_delivery_date")
    private Date planDeliveryDate;

    /**
     * 发货人名称
     */
    @Column("delivery_name")
    private String deliveryName;

    @ApiModelProperty(value = "行业线")
    @Column("item_health_industry")
    private String itemHealthIndustry;

    @ApiModelProperty(value = "订单类型展示值")
    @Ignore
    private String billTypeName;

    @ApiModelProperty(value = "状态展示值")
    @Ignore
    private String statusName;

    @ApiModelProperty(value = "部门展示名称展示值")
    @Ignore
    private String departmentName;

    @ApiModelProperty(value = "到货方式展示值")
    @Ignore
    private String arrivalModeName;

    @ApiModelProperty(value = "运输条件展示值")
    @Ignore
    private String shipTermName;

    @ApiModelProperty(value = "订单紧急等级展示值")
    @Ignore
    private String priorityLevelName;

    @ApiModelProperty(value = "是否回传SAP展示值")
    @Ignore
    private String isBackSapName;


}
