package com.ruoyi.asset.domain;

import java.util.List;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
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_transfer_order
 * 
 * @author Yangk
 * @date 2026-06-12
 */
public class AmsTransferOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 单据ID */
    private Long orderId;

    /** 调拨单号 */
    @Excel(name = "调拨单号")
    private String transferNo;

    /** 申请人ID（新增时由服务层从登录用户取值，前端不传） */
    private Long applicantId;

    /** 申请人名称快照（保存时冻结，后续姓名变更不影响历史记录） */
    @Excel(name = "申请人")
    private String applicantName;

    /** 调拨原因 */
    @Excel(name = "调拨原因")
    private String transferReason;

    /** 确认人ID（确认调拨时由服务层写入） */
    private Long confirmUserId;

    /** 确认人名称快照（确认时冻结） */
    @Excel(name = "确认人")
    private String confirmUserName;

    /** 确认时间（确认调拨时由服务层写入当前时间） */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "确认时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date confirmTime;

    /** 单据状态：DRAFT / PENDING_CONFIRM / TRANSFERRED（由服务层管控状态流转） */
    @Excel(name = "单据状态", dictType = "ams_transfer_status")
    private String orderStatus;

    /** 删除标志：0存在，1删除 */
    private String delFlag;

    /** 调拨单明细信息 */
    private List<AmsTransferOrderItem> amsTransferOrderItemList;

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

    public Long getOrderId() 
    {
        return orderId;
    }

    public void setTransferNo(String transferNo) 
    {
        this.transferNo = transferNo;
    }

    public String getTransferNo() 
    {
        return transferNo;
    }

    public void setApplicantId(Long applicantId) 
    {
        this.applicantId = applicantId;
    }

    public Long getApplicantId() 
    {
        return applicantId;
    }

    public void setApplicantName(String applicantName) 
    {
        this.applicantName = applicantName;
    }

    public String getApplicantName() 
    {
        return applicantName;
    }

    public void setTransferReason(String transferReason) 
    {
        this.transferReason = transferReason;
    }

    public String getTransferReason() 
    {
        return transferReason;
    }

    public void setConfirmUserId(Long confirmUserId) 
    {
        this.confirmUserId = confirmUserId;
    }

    public Long getConfirmUserId() 
    {
        return confirmUserId;
    }

    public void setConfirmUserName(String confirmUserName) 
    {
        this.confirmUserName = confirmUserName;
    }

    public String getConfirmUserName() 
    {
        return confirmUserName;
    }

    public void setConfirmTime(Date confirmTime) 
    {
        this.confirmTime = confirmTime;
    }

    public Date getConfirmTime() 
    {
        return confirmTime;
    }

    public void setOrderStatus(String orderStatus) 
    {
        this.orderStatus = orderStatus;
    }

    public String getOrderStatus() 
    {
        return orderStatus;
    }

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

    public String getDelFlag() 
    {
        return delFlag;
    }

    public List<AmsTransferOrderItem> getAmsTransferOrderItemList()
    {
        return amsTransferOrderItemList;
    }

    public void setAmsTransferOrderItemList(List<AmsTransferOrderItem> amsTransferOrderItemList)
    {
        this.amsTransferOrderItemList = amsTransferOrderItemList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("orderId", getOrderId())
            .append("transferNo", getTransferNo())
            .append("applicantId", getApplicantId())
            .append("applicantName", getApplicantName())
            .append("transferReason", getTransferReason())
            .append("confirmUserId", getConfirmUserId())
            .append("confirmUserName", getConfirmUserName())
            .append("confirmTime", getConfirmTime())
            .append("orderStatus", getOrderStatus())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .append("delFlag", getDelFlag())
            .append("amsTransferOrderItemList", getAmsTransferOrderItemList())
            .toString();
    }
}
