package com.jwipc.contract.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author zx
 * @since 2024-03-13
 */
@Getter
@Setter
@TableName("t_contract_detail")
public class ContractDetail implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private Long contractId;

    private String contractCode;

    /**
     * 物料编码
     */
    private String materialCode;

    /**
     * 物料编码
     */
    private String materialName;

    /**
     * 物料组
     */
    private String materialGroupName;

    /**
     * 物料组
     */
    private String materialGroupCode;

    /**
     * 品类
     */
    private String materialCategory;

    /**
     * 规格
     */
    private String materialSpec;

    /**
     * 型号
     */
    private String materialModel;

    /**
     * 品牌
     */
    private String materialBrand;

    /**
     * 单位
     */
    private String basisUnit;

    /**
     * 单价
     */
    private BigDecimal price;

    /**
     * 数量
     */
    private BigDecimal num;

    /**
     * 税率
     */
    private String taxRateName;

    /**
     * 税率
     */
    private String taxRateCode;

    /**
     * 固定资产卡号
     */
    private String cardNumber;

    /**
     * 备注
     */
    private String bz;

    /**
     * 删除标记；0-未删除；1-已删除
     */
    private Integer deleteFlag;

    private String purchaseCode;

    private String itemCode;

    private String factoryCode;

    private String factoryName;

    private String subjectCode;

    private String currencyCode;

    private String purchaseName;

    private String customerCode;

    private String customerName;

    private String driverAsset;

    private String teamName;

    private Integer warrantyPeriod;

    private String requireName;
    @TableField(exist = false)
    private BigDecimal amount;
    @TableField(exist = false)
    private String serviceUser;
    @TableField(exist = false)
    private String driveBz;

    private String costCenterCode;
    private String costCenterName;
    private LocalDateTime deliveryDate;

    private LocalDateTime invoiceTime;

    private String stockPoint;

    @TableField(exist = false)
    private String  stockPointName;

    private String mainUses;
//    private String checkState;
//    private String checkNo;
    @TableField(exist = false)
    private String contractType; //主表合同分类
    @TableField(exist = false)
    private String contractCompanyCode;//主表合同甲方公司代码
    @TableField(exist = false)
    private String contractCompanyName;//主表合同甲方公司名称
    @TableField(exist = false)
    private String contractSupplierCode;//主表合同乙方公司代码
    @TableField(exist = false)
    private String contractSupplierName;//主表合同乙方公司名称
    @TableField(exist = false)
    private String contractPurchaseGroup;//主表合同采购组代码

    /**
     * 未税单价
     */
    private BigDecimal noTaxPrice;
    /**
     * 合同明细行号
     */
    private int lineNo;
    //在途数量
    @TableField(exist = false)
    private BigDecimal onlineNum;
    //接收数量
    @TableField(exist = false)
    private BigDecimal receiveNum;
    //已退数量
    @TableField(exist = false)
    private BigDecimal returnNum;
    //未清数量
    @TableField(exist = false)
    private BigDecimal unclearNum;
    //可送数量
    @TableField(exist = false)
    private BigDecimal  deliverableNum;
    //收货数量
    @TableField(exist = false)
    private BigDecimal shipmentNum;



    /**
     * 申请样品制作项目类型 传编码
     */
    private String applyProjectType;

    /**
     * 模具申请 传编码
     */
    private String modelApply;

    /**
     * 项目所处阶段
     */
    private String projectProcess;


    private String modelType;

    /**
     * 模具编号
     */
    private String modelNumber;

    //使用人
    private String userCode;
    private String userName;

    //使用部门
    private String useDeptCode;
    private String useDeptName;

    /**
     * 可申请数量
     */
    private BigDecimal enablePurchaseNum;

}
