package com.zbf.system.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zbf.common.annotation.Excel;
import com.zbf.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.apache.poi.ss.usermodel.IndexedColors;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 入库通知单明细对象 t_rk_ware_notice_tab
 *
 * @author tony
 * @date 2024-06-18
 */
@Data
@Setter
@Getter
public class TRkWareNoticeTab extends BaseEntity {
private static final long serialVersionUID = 1L;

    /** 主表ID */
    private String noticeId;

    /** 主键 */
//    @Excel(name = "WMS明细编号",type = Excel.Type.EXPORT)
    private String id;
    /** 发货单号 */
    @Excel(name = "发货单号")
    private String purchaseId;

    /** 交货单号 */
    @Excel(name = "*来源单号",required = true,headerColor= IndexedColors.RED,type = Excel.Type.IMPORT)
    private String deliveryId;
    //来源单据号
    private String sourceNum;
    /** 子需求编号-订单号 */
    @Excel(name = "子需求编号")
    private String salesOrderNumber;

    /** 订单类型 */
    @Excel(name = "*入库类型",required = true,comboDictType = "warehouse_type",headerColor= IndexedColors.RED)
    @NotNull(message = "订单类型为空")
    private String orderType;

    @Excel(name = " 订单来源",headerColor= IndexedColors.RED,needMerge = true,comboDictType = "data_source")
    private  String dataSource;

    /** 物料编号 */
    @Excel(name = "*物料编号",required = true,headerColor= IndexedColors.RED)
    @NotNull(message = "物料编码为空")
    private String goodsId;

    /** 物料名称 */
    @Excel(name = "*物料名称",required = true,headerColor= IndexedColors.RED)
    @NotNull(message = "物料名称为空")
    private String goodsName;

    /** 单位 */
    @Excel(name = "*单位",required = true,headerColor= IndexedColors.RED)
    @NotNull(message = "物料单位为空")
    private String unit;

    /** 规格型号 */
    @Excel(name = "*规格型号",required = true,headerColor= IndexedColors.RED)
    @NotNull(message = "规格型号为空")
    private String specification;

    /** 物料描述 */
    @Excel(name = "*物料描述",required = true,headerColor= IndexedColors.RED)
    @NotNull(message = "物料描述为空")
    private String recoil;

    /** 品牌 */
    @Excel(name = "品牌")
    private String brand;

    /** 计划单价（含税） */
    @Excel(name = "采购含税单价")
    private BigDecimal price;

    /** 计划金额 */
    @Excel(name = "采购含税金额")
    private BigDecimal totalMoney;


    /** 采购无税单价 */
    @Excel(name = "采购无税单价")
    private BigDecimal noTaxPrice;

    /** 采购无税金额 */
    @Excel(name = "采购无税金额")
    private BigDecimal noTaxMoney;
    /** 采购税率 */
    @Excel(name = "采购税率")
    private BigDecimal purchaseTaxRate;

    /** 采购税额 */
    @Excel(name = "采购税额")
    private BigDecimal purchaseTax;

    /** 慧采模式 */
    @Excel(name = "慧采模式")
    private String smartSelectionMode;

    /** 发票抬头 */
    @Excel(name = "发票抬头")
    private String invoiceTitle;

    /** 是否独立核算 */
    @Excel(name = "是否独立核算")
    private String independentAccounting;

    @Excel(name = "操作人")
    private String createBy;

    /** 是否重点物资 */
    @Excel(name = "是否重点物资")
    private String emphasisGoods;

    /** 是否加急 */
    @Excel(name = "是否加急")
    private String expedited;

    /** 单独开票标识 */
    @Excel(name = "单独开票标识")
    private String individualInvoicing;

    /** 绝收数量 */
    @Excel(name = "拒收数量",type = Excel.Type.EXPORT)
    private BigDecimal rejectNum;

    /** 请购人 */
    @Excel(name = "请购人")
    private String purchaser;

    /** 附件 */
    @Excel(name = "附件")
    private String attachments;

    /** 附件 */
    @Excel(name = "供方附件")
    private String supplierAttachments;

    /** 到货数量 */
    @Excel(name = "到货数量")
    private BigDecimal arraMount;
    /** 到货数量 */
//    @Excel(name = "累计仓库收货数量")
    private BigDecimal totalArraAmout;
    /** 签收数量 */
    @Excel(name = "签收数量",type = Excel.Type.EXPORT)
    private BigDecimal receivingNum;

    /** 签收数量 */
    @Excel(name = "签收人")
    private String recPerson;
    /** 收货数量 */
    @Excel(name = "收货数量",type = Excel.Type.EXPORT)
    private BigDecimal recNum;
    /** 需求人 */
    @Excel(name = "需求人")
    private String needPerson;
    @Excel(name = "需求人联系方式")
    private String needTel;
    /** 联系方式 */
    @Excel(name = "联系方式")
    private String telephone;

    /** 工程项目 */
//    @Excel(name = "工程项目")
    private String project;

    /** 需求部门 */
    @Excel(name = "需求部门")
    private String needDept;

    /** 用途 */
    @Excel(name = "用途")
    private String useType;

    /** 测量单位 */
    private String scaleUnit;

    /** 总量 */
    private BigDecimal totalVolume;

    /** 毛重 */
    private BigDecimal totalRoughWeight;

    /** 净重 */
    private BigDecimal totalNetWeigh;

    /** 数量 */
    private BigDecimal amount;

    /** 上报时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
//    @Excel(name = "上报时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date productionDate;

    /** 仓库ID */
    private String storageId;

    /** 库区 */
    private String storageAreaId;

    /** 技术需求附件 */
//    @Excel(name = "技术需求附件")
    private String packageId;

    /** 物料分类 */
    @Excel(name = "物料分类",comboDictType = "goods_type")
    private String goodsTypeId;

    /** 条码 */
    @Excel(name = "条码")
    private String barcode;

    /** 重量 */
    private BigDecimal goodsVolume;

    /** 打印状态 */
    private String printSts;

    /** 打印次数 */
    private Long printCs;

    /** 净重 */
    private BigDecimal netWeigh;

    /** 冻结数量 */
    private Long kindNum;

    /** 需求时间 */
    private String expiryDate;

    /** 创建时间 */
    private Date operateDate;

    /** 物料状态 */
    private String productStatus;

    /** 收货状态 */
    private String receivingStatus;

    /** 内部状态 */
    private String inStatus;

    /** 托盘号 */
    private String ctl;

    /** 质检日期 */
    private String qualityInspectionDate;

    /** 状态 */
//    @Excel(name = "状态")
    private String status;

    /** 累计入库数量 */
    @Excel(name = "上架数量")
    private BigDecimal acceNum;

    /** 质检状态 */
    private String qualityInspecStatus;

    /** 到货单号 */
    @Excel(name = "到货单号")
    private String arrivalNum;

    /** 申请人 */
    @Excel(name = "申请人")
    private String applicant;

    /** 申请部门 */
    @Excel(name = "申请部门")
    private String supplier;

    /** 是否合格 */
    private String qualified;

    /** 计划日期 */
    @Excel(name = "计划到货日期")
    private String planDate;
    /** 计划日期 */
    @Excel(name = "到货日期")
    private String arraDate;
    /** 单据状态 */
    @Excel(name = "单据状态")
    private String documentStatus;
    /** 计划时间 */
    private String planTime;

    /** 需求周期 */
    private BigDecimal needCycle;

    /** 需求类型 */
    private String needType;

    /** 批次号 */
    @Excel(name = "批次号")
    private String batchNo;

    /** 上报时间 */
    private String reportTime;

    /**编辑状态 */
    @TableField(exist = false)
    private boolean editFlg = false;

    /**是否新追加 */
    @TableField(exist = false)
    private boolean addFlg = false;


    /** 供应商编号 */
    @Excel(name = "供应商编号")
    private String providerId;

    /** 供应商名称 */
    @Excel(name = "供货供应商")
    private String providerName;


    /** 发货组织 */
//    @Excel(name = "发货组织")
    private String shippingDept;

    /** 联系人 */
//    @Excel(name = "联系人")
    private String contact;



    /** 收货地址 */
//    @Excel(name = "收货地址")
    private String receiveAddr;

    /** 发货日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发货日期", width = 30, dateFormat = "yyyy-MM-dd")
    private String sendeDate;

    /** 采购组织 */
//    @Excel(name = "采购组织")
    private String purchaseDept;

    /** 送货区域 */
//    @Excel(name = "送货区域")
    private String receivingArea;

    /** 使用单位收货人 */
//    @Excel(name = "使用单位收货人")
    private String useReceiver;

    /** 使用单位保管员 */
//    @Excel(name = "使用单位保管员")
    private String useCustodian;

    /** 使用单位主管 */
//    @Excel(name = "使用单位主管")
    private String useLeader;

    /** 收货人 */
//    @Excel(name = "收货人")
    private String receiver;


    /** 收货组织 */
//    @Excel(name = "收货组织")
    private String produclotId;

    /** 收货人部门 */
//    @Excel(name = "收货人部门")
    private String receiverDept;

    /** 招标员 */
//    @Excel(name = "招标员")
    private String tenderer;

    /** ABC分类 */
//    @Excel(name = "ABC分类")
    private String abc;

    /** 1:一级库 2：二级库 */
    @Excel(name = "仓库类别",dictType = "storage_classification")
    private String levelType;
    /** 仓库名称 */
    @Excel(name = "仓库名称")
    private String storageShortName;

    private String rfidTid;

    private String rfidEpc;

    /**库位 */
    private String storageLocation;

    /**本次接收数量 */
    @Excel(name = "本次签收数量",type = Excel.Type.EXPORT)
    private BigDecimal recNumNow;

@Override
public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("salesOrderNumber", getSalesOrderNumber())
            .append("noticeId", getNoticeId())
            .append("goodsId", getGoodsId())
            .append("goodsName", getGoodsName())
            .append("unit", getUnit())
            .append("specification", getSpecification())
            .append("recoil", getRecoil())
            .append("brand", getBrand())
            .append("price", getPrice())
            .append("totalMoney", getTotalMoney())
            .append("arraMount", getArraMount())
            .append("recNum", getRecNum())
            .append("project", getProject())
            .append("needDept", getNeedDept())
            .append("useType", getUseType())
            .append("scaleUnit", getScaleUnit())
            .append("totalVolume", getTotalVolume())
            .append("totalRoughWeight", getTotalRoughWeight())
            .append("totalNetWeigh", getTotalNetWeigh())
            .append("amount", getAmount())
            .append("productionDate", getProductionDate())
            .append("storageId", getStorageId())
            .append("storageAreaId", getStorageAreaId())
            .append("packageId", getPackageId())
            .append("remark", getRemark())
            .append("goodsTypeId", getGoodsTypeId())
            .append("barcode", getBarcode())
            .append("goodsVolume", getGoodsVolume())
            .append("printSts", getPrintSts())
            .append("printCs", getPrintCs())
            .append("netWeigh", getNetWeigh())
            .append("kindNum", getKindNum())
            .append("expiryDate", getExpiryDate())
            .append("operateDate", getOperateDate())
            .append("productStatus", getProductStatus())
            .append("receivingStatus", getReceivingStatus())
            .append("inStatus", getInStatus())
            .append("ctl", getCtl())
            .append("qualityInspectionDate", getQualityInspectionDate())
            .append("status", getStatus())
            .append("acceNum", getAcceNum())
            .append("qualityInspecStatus", getQualityInspecStatus())
            .append("orderType", getOrderType())
            .append("applicant", getApplicant())
            .append("supplier", getSupplier())
            .append("qualified", getQualified())
            .append("updateTime", getUpdateTime())
            .append("planDate", getPlanDate())
            .append("planTime", getPlanTime())
            .append("needCycle", getNeedCycle())
            .append("needType", getNeedType())
            .append("batchNo", getBatchNo())
            .append("reportTime", getReportTime())
            .append("createTime", getCreateTime())
            .append("createBy", getCreateBy())
            .append("updateBy", getUpdateBy())
        .toString();
        }
}













