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 java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 合同交货明细表
 * </p>
 *
 * @author qzc
 * @since 2025-12-09
 */
@Getter
@Setter
@TableName("t_contract_delivery_detail")
public class ContractDeliveryDetail implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID（自增30位长度）
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 收货单行号
     */
    private String receiptLineNo;

    /**
     * 合同编号
     */
    private String contractNo;

    /**
     * 合同序号
     */
    private String contractSeq;

    /**
     * 资产类别
     */
    private String assetCategory;

    /**
     * 物品名称
     */
    private String itemName;

    /**
     * 型号规格/参数
     */
    private String modelSpec;

    /**
     * 品牌
     */
    private String brand;

    /**
     * 请购单编号
     */
    private String requisitionNo;

    /**
     * 单位
     */
    private String unit;

    /**
     * 订单数量
     */
    private BigDecimal orderQuantity;

    /**
     * 收货数量
     */
    private BigDecimal receivedQuantity;

    /**
     * 设备序列号
     */
    private String deviceSerialNo;

    /**
     * 验收状态
     */
    private String acceptanceStatus;

    /**
     * 验收单号
     */

    private String acceptanceNo;

    /**
     * 请购部门
     */
    private String requisitionDept;

    /**
     * 保管人
     */
    private String custodian;

    /**
     * 成本中心
     */
    private String costCenter;

    /**
     * 存放地点
     */
    private String storageLocation;

    /**
     * 资产用途
     */
    private String assetPurpose;

    /**
     * 资产情况
     */
    private String assetCondition;
    /**
     * 收货单编号
     */
    private String deliveryNo;

    private String requisitionItem;
    private Integer deleteFlag;
    private Long createId;
    private LocalDateTime createTime;
    private Long updateId;
    private LocalDateTime updateTime;
    private Long deliveryId; //收货单id

    /**
     * 主表字段
     */
    @TableField(exist = false)
    private String supplier;
    @TableField(exist = false)
    private String supplierCode;
    @TableField(exist = false)
    private String purchaser;
    @TableField(exist = false)
    private String purchaserCode;
    @TableField(exist = false)
    private BigDecimal  returnQuantity;
    @TableField(exist = false)
    private String purchaseGroup;
    //统计字段
    //在途数量
    @TableField(exist = false)
    private BigDecimal onlineNum;
    //接收数量
    @TableField(exist = false)
    private BigDecimal receiveNum;
    @TableField(exist = false)
    private Integer deliveryStatus;
    //退货数量
    @TableField(exist = false)
    private BigDecimal returnedQuantity;
    //可退数量
    @TableField(exist = false)
    private BigDecimal returnableQuantity;

    /**
     * 请购部门名称
     */
    private String useDeptName;

    /**
     * 保管人code
     */
    private String userCode;
    /**
     * 未税单价
     */
    private BigDecimal noTaxPrice;

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

    private String itemCode;

    @TableField(exist = false)
    private String contractType; //主表合同分类

}
