package com.ruoyi.asset.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 资产领用单明细对象 ams_receive_order_item
 * 
 * 对应数据库表 ams_receive_order_item，用以记录单张领用单中关联的每一项资产。
 * 核心特征是包含大量“资产领用前”的物理仓位快照，以及“领用后”的使用归属信息，用作履历 and 防并发校验依据。
 *
 * @author Yangk
 * @date 2026-06-12
 */
public class AmsReceiveOrderItem extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键明细ID */
    private Long itemId;

    /** 关联的领用主单ID */
    @Excel(name = "领用单ID")
    private Long orderId;

    /** 关联的领用单单号快照 */
    @Excel(name = "领用单号快照")
    private String receiveNo;

    /** 关联的被领用资产ID */
    @Excel(name = "资产ID")
    private Long assetId;

    /** 被领用资产的编码历史快照 */
    @Excel(name = "资产编码快照")
    private String assetCode;

    /** 被领用资产的名称快照 */
    @Excel(name = "资产名称快照")
    private String assetName;

    /** 资产类别ID快照 */
    @Excel(name = "资产类别ID快照")
    private Long categoryId;

    /** 资产类别编码历史快照 */
    @Excel(name = "类别编码快照")
    private String categoryCode;

    /** 资产类别名称快照 */
    @Excel(name = "类别名称快照")
    private String categoryName;

    /** 规格型号快照 */
    @Excel(name = "规格型号快照")
    private String specModel;

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

    /** 当前资产的最新状态：不落库字段。仅用于页面端加载展示（如判断是否处于在库可领用状态）以及后端校验 */
    private String assetStatus;

    /** 资产领用前的仓库ID：用于流转前的仓位比对 */
    @Excel(name = "领用前仓库ID")
    private Long beforeWarehouseId;

    /** 资产领用前的仓库编码快照 */
    @Excel(name = "领用前仓库编码快照")
    private String beforeWarehouseCode;

    /** 资产领用前的仓库名称历史快照 */
    @Excel(name = "领用前仓库名称快照")
    private String beforeWarehouseName;

    /** 资产领用前的位置(货架/仓位)ID：用于校验在草稿暂存到确认流转之间该资产有没有发生仓位移动 */
    @Excel(name = "领用前位置ID")
    private Long beforeLocationId;

    /** 资产领用前的位置编码快照 */
    @Excel(name = "领用前位置编码快照")
    private String beforeLocationCode;

    /** 资产领用前的位置名称历史快照 */
    @Excel(name = "领用前位置名称快照")
    private String beforeLocationName;

    /** 领用后指定的使用人用户ID */
    @Excel(name = "领用后使用人ID")
    private Long receiveUserId;

    /** 领用后指定的使用人姓名快照：最终确认通过领用申请后，此字段会被写入对应的资产使用人属性 */
    @Excel(name = "领用后使用人名称快照")
    private String receiveUserName;

    /** 领用后指定的使用部门ID */
    @Excel(name = "领用后部门ID")
    private Long receiveDeptId;

    /** 领用后指定的使用部门名称快照：最终确认通过后，此字段会被写入对应资产的使用部门属性 */
    @Excel(name = "领用后部门名称快照")
    private String receiveDeptName;

    /** 逻辑删除标志：0正常存在，1已逻辑删除 */
    private String delFlag;

    public void setItemId(Long itemId) 
    {
        this.itemId = itemId;
    }

    public Long getItemId() 
    {
        return itemId;
    }
    public void setOrderId(Long orderId) 
    {
        this.orderId = orderId;
    }

    public Long getOrderId() 
    {
        return orderId;
    }
    public void setReceiveNo(String receiveNo) 
    {
        this.receiveNo = receiveNo;
    }

    public String getReceiveNo() 
    {
        return receiveNo;
    }
    public void setAssetId(Long assetId) 
    {
        this.assetId = assetId;
    }

    public Long getAssetId() 
    {
        return assetId;
    }
    public void setAssetCode(String assetCode) 
    {
        this.assetCode = assetCode;
    }

    public String getAssetCode() 
    {
        return assetCode;
    }
    public void setAssetName(String assetName) 
    {
        this.assetName = assetName;
    }

    public String getAssetName() 
    {
        return assetName;
    }
    public void setCategoryId(Long categoryId) 
    {
        this.categoryId = categoryId;
    }

    public Long getCategoryId() 
    {
        return categoryId;
    }
    public void setCategoryCode(String categoryCode) 
    {
        this.categoryCode = categoryCode;
    }

    public String getCategoryCode() 
    {
        return categoryCode;
    }
    public void setCategoryName(String categoryName) 
    {
        this.categoryName = categoryName;
    }

    public String getCategoryName() 
    {
        return categoryName;
    }
    public void setSpecModel(String specModel) 
    {
        this.specModel = specModel;
    }

    public String getSpecModel() 
    {
        return specModel;
    }
    public void setBrand(String brand) 
    {
        this.brand = brand;
    }

    public String getBrand() 
    {
        return brand;
    }
    public void setAssetStatus(String assetStatus)
    {
        this.assetStatus = assetStatus;
    }

    public String getAssetStatus()
    {
        return assetStatus;
    }
    public void setBeforeWarehouseId(Long beforeWarehouseId) 
    {
        this.beforeWarehouseId = beforeWarehouseId;
    }

    public Long getBeforeWarehouseId() 
    {
        return beforeWarehouseId;
    }
    public void setBeforeWarehouseCode(String beforeWarehouseCode) 
    {
        this.beforeWarehouseCode = beforeWarehouseCode;
    }

    public String getBeforeWarehouseCode() 
    {
        return beforeWarehouseCode;
    }
    public void setBeforeWarehouseName(String beforeWarehouseName) 
    {
        this.beforeWarehouseName = beforeWarehouseName;
    }

    public String getBeforeWarehouseName() 
    {
        return beforeWarehouseName;
    }
    public void setBeforeLocationId(Long beforeLocationId) 
    {
        this.beforeLocationId = beforeLocationId;
    }

    public Long getBeforeLocationId() 
    {
        return beforeLocationId;
    }
    public void setBeforeLocationCode(String beforeLocationCode) 
    {
        this.beforeLocationCode = beforeLocationCode;
    }

    public String getBeforeLocationCode() 
    {
        return beforeLocationCode;
    }
    public void setBeforeLocationName(String beforeLocationName) 
    {
        this.beforeLocationName = beforeLocationName;
    }

    public String getBeforeLocationName() 
    {
        return beforeLocationName;
    }
    public void setReceiveUserId(Long receiveUserId) 
    {
        this.receiveUserId = receiveUserId;
    }

    public Long getReceiveUserId() 
    {
        return receiveUserId;
    }
    public void setReceiveUserName(String receiveUserName) 
    {
        this.receiveUserName = receiveUserName;
    }

    public String getReceiveUserName() 
    {
        return receiveUserName;
    }
    public void setReceiveDeptId(Long receiveDeptId) 
    {
        this.receiveDeptId = receiveDeptId;
    }

    public Long getReceiveDeptId() 
    {
        return receiveDeptId;
    }
    public void setReceiveDeptName(String receiveDeptName) 
    {
        this.receiveDeptName = receiveDeptName;
    }

    public String getReceiveDeptName() 
    {
        return receiveDeptName;
    }
    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("itemId", getItemId())
            .append("orderId", getOrderId())
            .append("receiveNo", getReceiveNo())
            .append("assetId", getAssetId())
            .append("assetCode", getAssetCode())
            .append("assetName", getAssetName())
            .append("categoryId", getCategoryId())
            .append("categoryCode", getCategoryCode())
            .append("categoryName", getCategoryName())
            .append("specModel", getSpecModel())
            .append("brand", getBrand())
            .append("assetStatus", getAssetStatus())
            .append("beforeWarehouseId", getBeforeWarehouseId())
            .append("beforeWarehouseCode", getBeforeWarehouseCode())
            .append("beforeWarehouseName", getBeforeWarehouseName())
            .append("beforeLocationId", getBeforeLocationId())
            .append("beforeLocationCode", getBeforeLocationCode())
            .append("beforeLocationName", getBeforeLocationName())
            .append("receiveUserId", getReceiveUserId())
            .append("receiveUserName", getReceiveUserName())
            .append("receiveDeptId", getReceiveDeptId())
            .append("receiveDeptName", getReceiveDeptName())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
