package com.zg.project.wisdom.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
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_info
 *
 * @author zg
 * @date 2025-05-28
 */
public class RkInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 模糊搜索关键字（项目号、项目描述、物料号、物料描述、供应商编码、供应商名称，订单编号） */
    private String keyword;

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

    @TableField(exist = false)
    private List<Long> ids;

    /** 供应计划ID（对应供应计划表主键） */
    @Excel(name = "供应计划ID")
    private Long gysJhId;

    /** 审批人ID（非数据库字段） */
    @TableField(exist = false)
    private String approverId;

    /** 库龄 */
    @Excel(name = "库龄")
    private Long stockAge;

    /** 入库类型 */
    private String rkType;

    /** 物资类型 */
    private String wlType;

    /** 所属仓库 */
    private String cangku;

    /** 多状态查询：是否出库（如 0=入库, 1=出库 等） */
    @TableField(exist = false)
    private List<String> isChukuList;

    /** 入库类型名称（联查显示用，导出专用） */
    @Excel(name = "入库类型名称")
    private String rkTypeName;

    /** 物资类型名称（联查显示用，导出专用） */
    @Excel(name = "物资类型名称")
    private String wlTypeName;

    /** 所属仓库名称（联查显示用，导出专用） */
    @Excel(name = "所属仓库名称")
    private String cangkuName;

    /** 入库时间（用户操作入库的日期） */
    @Excel(name = "入库时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date rkTime;

    /** 借用时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "借用时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date borrowTime;

    /** 归还时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "归还时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date returnTime;

    /** 理货员 */
    @Excel(name = "理货员")
    private String lihuoY;

    /** 理货员名称（联查显示用，导出专用） */
    private String lihuoYName;

    /** 是否已出库（0未出库，1已出库） */
    @Excel(name = "是否已出库", readConverterExp = "0已入库，1已出库，2待审批，3借料出库，4入库撤销，5出库撤销")
    private String isChuku;

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

    /** 出库单据号 */
    @Excel(name = "出库单据号")
    private String billNoCk;

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

    /** 县局 */
    @Excel(name = "县局")
    private String xj;

    /** 项目号 */
    @Excel(name = "库存项目号")
    private String xmNo;

    /** 项目描述 */
    @Excel(name = "库存项目描述")
    private String xmMs;

    @Excel(name = "领取方项目号")
    private String xmNoCk;

    @Excel(name = "领取方项目描述")
    private String xmMsCk;

    /** 物料号 */
    @Excel(name = "物料号")
    private String wlNo;

    /** 物料描述 */
    @Excel(name = "物料描述")
    private String wlMs;

    /** 供应商编码 */
    @Excel(name = "供应商编码")
    private String gysNo;

    /** 供应商名称 */
    @Excel(name = "供应商名称")
    private String gysMc;

    /** 计划交货金额 */
    @Excel(name = "计划交货金额")
    private BigDecimal jhAmt;

    /** 合同单价 */
    @Excel(name = "合同单价")
    private BigDecimal htDj;

    /** SAP订单编号 */
    @Excel(name = "SAP订单编号")
    private String sapNo;

    /** 行号 */
    @Excel(name = "行号")
    private String xh;

    /** 计划交货数量 */
    @Excel(name = "计划交货数量")
    private Long jhQty;

    /** 合同数量 */
    @Excel(name = "合同数量")
    private Long htQty;

    /** 计量单位 */
    @Excel(name = "计量单位")
    private String dw;

    /** 实际入库数量 */
    @Excel(name = "实际入库数量")
    private BigDecimal realQty;

    /** 库位码 */
    @Excel(name = "库位码")
    private String pcode;

    /** 库位主键ID */
    @Excel(name = "库位主键ID")
    private String pcodeId;

    /** 托盘码 */
    @Excel(name = "托盘码")
    private String trayCode;

    /** 实物ID */
    @Excel(name = "实物ID")
    private String entityId;

    /** 一货一图 - 货物照片URL */
    @TableField(exist = false)
    private String photoUrl;

    @Excel(name = "出库理货员")
    private String ckLihuoY;

    private String ckType;

    @Excel(name = "出库类型名称")
    private String ckTypeName;

    private String teamCode;

    @Excel(name = "施工队名称")
    private String teamName;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "领用时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date lyTime;

    @Excel(name = "出库备注")
    private String ckRemark;

    @Excel(name = "出库备注")
    private String status;

    /** 是否移库过（0否 1是） */
    @Excel(name = "是否移库过")
    private String hasMoved;

    /** 是否借料（0否 1是） */
    @Excel(name = "是否借料", readConverterExp = "0=否,1=是,2=已归还")
    private String isBorrowed;

    /** 签字图片URL（image_type = 0） */
    @TableField(exist = false)
    private String signImageUrl;

    /** 现场图片URL（image_type = 1） */
    @TableField(exist = false)
    private String scenePhotoUrl;

    /** 当前审批结果（0：通过，1：驳回） */
    @TableField(exist = false)
    private String auditResult;

    /** 入库开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startTime;

    /** 入库结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endTime;

    /** 领用开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(exist = false)
    private Date lyStartTime;

    /** 领用结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(exist = false)
    private Date lyEndTime;

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

    // Getter 和 Setter 方法
    public String getKeyword() { return keyword; }
    public void setKeyword(String keyword) { this.keyword = keyword; }
    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }

    public List<Long> getIds() {
        return ids;
    }

    public void setIds(List<Long> ids) {
        this.ids = ids;
    }
    public Long getGysJhId() {
        return gysJhId;
    }

    public void setGysJhId(Long gysJhId) {
        this.gysJhId = gysJhId;
    }

    public String getApproverId() {
        return approverId;
    }

    public void setApproverId(String approverId) {
        this.approverId = approverId;
    }
    public Long getStockAge() { return stockAge; }
    public void setStockAge(Long stockAge) { this.stockAge = stockAge; }
    public String getRkType() { return rkType; }
    public void setRkType(String rkType) { this.rkType = rkType; }
    public String getWlType() { return wlType; }
    public void setWlType(String wlType) { this.wlType = wlType; }
    public String getCangku() { return cangku; }
    public void setCangku(String cangku) { this.cangku = cangku; }
    public String getRkTypeName() { return rkTypeName; }
    public void setRkTypeName(String rkTypeName) { this.rkTypeName = rkTypeName; }
    public String getWlTypeName() { return wlTypeName; }
    public void setWlTypeName(String wlTypeName) { this.wlTypeName = wlTypeName; }
    public String getCangkuName() { return cangkuName; }
    public void setCangkuName(String cangkuName) { this.cangkuName = cangkuName; }
    public Date getRkTime() { return rkTime; }
    public void setRkTime(Date rkTime) { this.rkTime = rkTime; }
    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 String getLihuoY() { return lihuoY; }
    public void setLihuoY(String lihuoY) { this.lihuoY = lihuoY; }

    public String getLihuoYName() { return lihuoYName; }
    public void setLihuoYName(String lihuoYName) { this.lihuoYName = lihuoYName; }

    public List<String> getIsChukuList() {
        return isChukuList;
    }

    public void setIsChukuList(List<String> isChukuList) {
        this.isChukuList = isChukuList;
    }
    public String getIsChuku() { return isChuku; }
    public void setIsChuku(String isChuku) { this.isChuku = isChuku; }
    public String getBillNo() { return billNo; }
    public void setBillNo(String billNo) { this.billNo = billNo; }
    public String getBillNoCk() { return billNoCk; }
    public void setBillNoCk(String billNoCk) { this.billNoCk = billNoCk; }
    public String getXj() { return xj; }
    public void setXj(String xj) { this.xj = xj; }
    public String getXmNo() { return xmNo; }
    public void setXmNo(String xmNo) { this.xmNo = xmNo; }
    public String getXmMs() { return xmMs; }
    public void setXmMs(String xmMs) { this.xmMs = xmMs; }
    public String getWlNo() { return wlNo; }
    public void setWlNo(String wlNo) { this.wlNo = wlNo; }
    public String getWlMs() { return wlMs; }
    public void setWlMs(String wlMs) { this.wlMs = wlMs; }
    public String getGysNo() { return gysNo; }
    public void setGysNo(String gysNo) { this.gysNo = gysNo; }
    public String getGysMc() { return gysMc; }
    public void setGysMc(String gysMc) { this.gysMc = gysMc; }
    public BigDecimal getJhAmt() { return jhAmt; }
    public void setJhAmt(BigDecimal jhAmt) { this.jhAmt = jhAmt; }
    public BigDecimal getHtDj() { return htDj; }
    public void setHtDj(BigDecimal htDj) { this.htDj = htDj; }
    public String getSapNo() { return sapNo; }
    public void setSapNo(String sapNo) { this.sapNo = sapNo; }
    public String getXh() { return xh; }
    public void setXh(String xh) { this.xh = xh; }
    public Long getJhQty() { return jhQty; }
    public void setJhQty(Long jhQty) { this.jhQty = jhQty; }
    public Long getHtQty() { return htQty; }
    public void setHtQty(Long htQty) { this.htQty = htQty; }
    public String getDw() { return dw; }
    public void setDw(String dw) { this.dw = dw; }
    public BigDecimal getRealQty() { return realQty; }
    public void setRealQty(BigDecimal realQty) { this.realQty = realQty; }
    public String getPcode() { return pcode; }
    public void setPcode(String pcode) { this.pcode = pcode; }
    public String getPcodeId() { return pcodeId; }
    public void setPcodeId(String pcodeId) { this.pcodeId = pcodeId; }
    public String getTrayCode() { return trayCode; }
    public void setTrayCode(String trayCode) { this.trayCode = trayCode; }
    public String getEntityId() { return entityId; }
    public void setEntityId(String entityId) { this.entityId = entityId; }
    public String getPhotoUrl() {
        return photoUrl;
    }

    public void setPhotoUrl(String photoUrl) {
        this.photoUrl = photoUrl;
    }
    public String getCkLihuoY() { return ckLihuoY; }
    public void setCkLihuoY(String ckLihuoY) { this.ckLihuoY = ckLihuoY; }
    public String getCkType() { return ckType; }
    public void setCkType(String ckType) { this.ckType = ckType; }
    public String getCkTypeName() { return ckTypeName; }
    public void setCkTypeName(String ckTypeName) { this.ckTypeName = ckTypeName; }
    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 Date getLyTime() { return lyTime; }
    public void setLyTime(Date lyTime) { this.lyTime = lyTime; }
    public String getCkRemark() { return ckRemark; }
    public void setCkRemark(String ckRemark) { this.ckRemark = ckRemark; }
    public String getStatus() { return status; }
    public void setStatus(String status) { this.status = status; }
    public String getHasMoved() { return hasMoved; }
    public void setHasMoved(String hasMoved) { this.hasMoved = hasMoved; }
    public String getXmNoCk() {
        return xmNoCk;
    }

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

    public String getXmMsCk() {
        return xmMsCk;
    }

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

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Date getLyStartTime() {
        return lyStartTime;
    }

    public void setLyStartTime(Date lyStartTime) {
        this.lyStartTime = lyStartTime;
    }

    public Date getLyEndTime() {
        return lyEndTime;
    }

    public void setLyEndTime(Date lyEndTime) {
        this.lyEndTime = lyEndTime;
    }

    public String getIsBorrowed() {
        return isBorrowed;
    }

    public void setIsBorrowed(String isBorrowed) {
        this.isBorrowed = isBorrowed;
    }

    public String getSignImageUrl() {
        return signImageUrl;
    }

    public void setSignImageUrl(String signImageUrl) {
        this.signImageUrl = signImageUrl;
    }

    public String getScenePhotoUrl() {
        return scenePhotoUrl;
    }

    public void setScenePhotoUrl(String scenePhotoUrl) {
        this.scenePhotoUrl = scenePhotoUrl;
    }

    public String getAuditResult() {
        return auditResult;
    }

    public void setAuditResult(String auditResult) {
        this.auditResult = auditResult;
    }
    public String getIsDelete() { return isDelete; }
    public void setIsDelete(String isDelete) { this.isDelete = isDelete; }


    public String getIsDelivery() {
        return isDelivery;
    }

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

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("gysJhId", getGysJhId())
                .append("approverId", getApproverId())
                .append("rkType", getRkType())
                .append("wlType", getWlType())
                .append("cangku", getCangku())
                .append("rkTime", getRkTime())
                .append("borrowTime", getBorrowTime())
                .append("returnTime", getReturnTime())
                .append("lihuoY", getLihuoY())
                .append("isChuku", getIsChuku())
                .append("billNo", getBillNo())
                .append("billNoCk", getBillNoCk())
                .append("isDelivery", getBillNoCk())
                .append("remark", getRemark())
                .append("xj", getXj())
                .append("xmNo", getXmNo())
                .append("xmMs", getXmMs())
                .append("wlNo", getWlNo())
                .append("wlMs", getWlMs())
                .append("gysNo", getGysNo())
                .append("gysMc", getGysMc())
                .append("jhAmt", getJhAmt())
                .append("htDj", getHtDj())
                .append("sapNo", getSapNo())
                .append("xh", getXh())
                .append("jhQty", getJhQty())
                .append("htQty", getHtQty())
                .append("dw", getDw())
                .append("realQty", getRealQty())
                .append("pcode", getPcode())
                .append("pcodeId", getPcodeId())
                .append("trayCode", getTrayCode())
                .append("entityId", getEntityId())
                .append("photoUrl", getPhotoUrl())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("ckLihuoY", getCkLihuoY())
                .append("ckType", getCkType())
                .append("ckTypeName", getCkTypeName())
                .append("teamCode", getTeamCode())
                .append("teamName", getTeamName())
                .append("lyTime", getLyTime())
                .append("ckRemark", getCkRemark())
                .append("status", getStatus())
                .append("hasMoved", getHasMoved())
                .append("xmNoCk", getXmNoCk())
                .append("xmMsCk", getXmMsCk())
                .append("startTime", getStartTime())
                .append("endTime", getEndTime())
                .append("isBorrowed", getIsBorrowed())
                .append("signImageUrl", getSignImageUrl())
                .append("scenePhotoUrl", getScenePhotoUrl())
                .append("auditResult", getAuditResult())
                .append("isChukuList", getIsChukuList())
                .append("lyStartTime", getLyStartTime())
                .append("lyEndTime", getLyEndTime())
                .append("isDelete", getIsDelete())
                .toString();
    }
}
