package com.zg.project.wisdom.domain;

import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zg.framework.aspectj.lang.annotation.Excel;
import com.zg.framework.web.domain.BaseEntity;

/**
 * 库存单据对象 rk_bill
 *
 * @author zg
 * @date 2026-01-20
 */
public class RkBill extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 物资类型 */
    @Excel(name = "物资类型")
    private String wlType;

    /** 物资类型名称（联表） */
    @Excel(name = "物资类型名称")
    private String wlTypeName;

    /** 所属仓库（小仓编码） */
    @Excel(name = "所属仓库")
    private String cangku;

    /** 小仓名称（联表） */
    @Excel(name = "仓库名称")
    private String warehouseName;

    /** 大仓名称（联表） */
    @Excel(name = "大仓名称")
    private String parentWarehouseName;

    /** 单据号 */
    @Excel(name = "单据号")
    private String billNo;

    /** 原字段：出入库类型 */
    @Excel(name = "出入库类型")
    private String operationType;

    /** 出入库类型名称（联表） */
    @Excel(name = "出入库类型名称")
    private String operationTypeName;

    /**
     * 业务操作类型
     * 0 入库
     * 1 出库
     * 2 借料出库
     * 3 还料入库
     */
    @Excel(name = "操作类型", readConverterExp = "0=入库,1=出库,2=借料出库,3=还料入库")
    private String bizType;

    /** 业务类型列表（查询用） */
    private List<String> bizTypeList;

    /** 出入库时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "出入库时间")
    private Date operationTime;

    /** 执行状态（0预入/预出，1已完成） */
    @Excel(name = "执行状态", readConverterExp = "0=预入/预出,1=已完成")
    private String execStatus;

    /** 理货员（用户ID） */
    private Integer operator;

    /** 理货员名称（联表） */
    @Excel(name = "理货员")
    private String operatorName;

    /** 施工队编码 */
    @Excel(name = "施工队编码")
    private String teamCode;

    /** 施工队名称（联表） */
    @Excel(name = "施工队名称")
    private String teamName;

    /** 是否需要配送(0否,1是,2配送中,3配送完成) */
    @Excel(name = "是否需要配送", readConverterExp = "0=否,1=是,2=配送中,3=配送完成")
    private String isDelivery;

    /** 借用时间 */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date borrowTime;

    /** 归还时间 */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date returnTime;

    /** 借用方项目号（借用方项目） */
    @Excel(name = "借用方项目号")
    private String xmNoCk;

    /** 借用方项目描述（借用方项目描述） */
    @Excel(name = "借用方项目描述")
    private String xmMsCk;


    /** 创建人 */
    private String createBy;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /** 更新人 */
    private String updateBy;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /** 是否删除（0正常，1删除） */
    private String isDelete;

    /** 入库 / 出库开始时间（查询用） */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startDate;

    /** 入库 / 出库结束时间（查询用） */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endDate;

    /** 备注 */
    @Excel(name = "备注")
    private String remark;

    // ================= getter / setter =================

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getWlType() {
        return wlType;
    }

    public void setWlType(String wlType) {
        this.wlType = wlType;
    }

    public String getWlTypeName() {
        return wlTypeName;
    }

    public void setWlTypeName(String wlTypeName) {
        this.wlTypeName = wlTypeName;
    }

    public String getCangku() {
        return cangku;
    }

    public void setCangku(String cangku) {
        this.cangku = cangku;
    }

    public String getWarehouseName() {
        return warehouseName;
    }

    public void setWarehouseName(String warehouseName) {
        this.warehouseName = warehouseName;
    }

    public String getParentWarehouseName() {
        return parentWarehouseName;
    }

    public void setParentWarehouseName(String parentWarehouseName) {
        this.parentWarehouseName = parentWarehouseName;
    }

    public String getBillNo() {
        return billNo;
    }

    public void setBillNo(String billNo) {
        this.billNo = billNo;
    }

    public String getOperationType() {
        return operationType;
    }

    public void setOperationType(String operationType) {
        this.operationType = operationType;
    }

    public String getOperationTypeName() {
        return operationTypeName;
    }

    public void setOperationTypeName(String operationTypeName) {
        this.operationTypeName = operationTypeName;
    }

    public String getBizType() {
        return bizType;
    }

    public void setBizType(String bizType) {
        this.bizType = bizType;
    }

    public List<String> getBizTypeList() {
        return bizTypeList;
    }

    public void setBizTypeList(List<String> bizTypeList) {
        this.bizTypeList = bizTypeList;
    }

    public Date getOperationTime() {
        return operationTime;
    }

    public void setOperationTime(Date operationTime) {
        this.operationTime = operationTime;
    }

    public String getExecStatus() {
        return execStatus;
    }

    public void setExecStatus(String execStatus) {
        this.execStatus = execStatus;
    }

    public Integer getOperator() {
        return operator;
    }

    public void setOperator(Integer operator) {
        this.operator = operator;
    }

    public String getOperatorName() {
        return operatorName;
    }

    public void setOperatorName(String operatorName) {
        this.operatorName = operatorName;
    }

    public String getTeamCode() {
        return teamCode;
    }

    public void setTeamCode(String teamCode) {
        this.teamCode = teamCode;
    }

    public String getTeamName() {
        return teamName;
    }

    public void setTeamName(String teamName) {
        this.teamName = teamName;
    }

    public String getIsDelivery() {
        return isDelivery;
    }

    public void setIsDelivery(String isDelivery) {
        this.isDelivery = isDelivery;
    }

    public Date getBorrowTime() {
        return borrowTime;
    }

    public void setBorrowTime(Date borrowTime) {
        this.borrowTime = borrowTime;
    }

    public Date getReturnTime() {
        return returnTime;
    }

    public void setReturnTime(Date returnTime) {
        this.returnTime = returnTime;
    }

    public void setXmNoCk(String xmNoCk)
    {
        this.xmNoCk = xmNoCk;
    }

    public String getXmNoCk()
    {
        return xmNoCk;
    }

    public void setXmMsCk(String xmMsCk)
    {
        this.xmMsCk = xmMsCk;
    }

    public String getXmMsCk()
    {
        return xmMsCk;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(String isDelete) {
        this.isDelete = isDelete;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    // ================= toString =================

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", id)
                .append("wlType", wlType)
                .append("wlTypeName", wlTypeName)
                .append("cangku", cangku)
                .append("warehouseName", warehouseName)
                .append("parentWarehouseName", parentWarehouseName)
                .append("billNo", billNo)
                .append("operationType", operationType)
                .append("operationTypeName", operationTypeName)
                .append("bizType", bizType)
                .append("operationTime", operationTime)
                .append("execStatus", execStatus)
                .append("operator", operator)
                .append("operatorName", operatorName)
                .append("teamCode", teamCode)
                .append("teamName", teamName)
                .append("isDelivery", isDelivery)
                .append("borrowTime", borrowTime)
                .append("returnTime", returnTime)
                .append("xmNoCk", getXmNoCk())
                .append("xmMsCk", getXmMsCk())
                .append("createBy", createBy)
                .append("createTime", createTime)
                .append("updateBy", updateBy)
                .append("updateTime", updateTime)
                .append("isDelete", isDelete)
                .append("remark", remark)
                .append("startDate", startDate)
                .append("endDate", endDate)
                .toString();
    }
}
