package com.glxp.mipsdl.entity.inout;

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 lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 采集点单据主表
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "io_collect_order")
public class IoCollectOrder implements Serializable {
    @TableId(value = "id", type = IdType.INPUT)
    private Integer id;

    /**
     * 单据号
     */
    @TableField(value = "billNo")
    private String billNo;

    /**
     * 单据类型
     */
    @TableField(value = "busType")
    private String busType;

    /**
     * 来源业务
     */
    @TableField(value = "fromType")
    private String fromType;

    /**
     * 来源业务说明
     */
    @TableField(value = "fromTypeDesc")
    private String fromTypeDesc;
    @TableField(value = "shipper")
    private String shipper;

    @TableField(value = "shipperName")
    private String shipperName;


    /**
     * 往来信息
     */
    @TableField(value = "fromCorp")
    private String fromCorp;


    @TableField(value = "fromCorpName")
    private String fromCorpName;

    /**
     * 单据时间
     */
    @TableField(value = "billTime")
    private Date billTime;

    /**
     * 创建时间
     */
    @TableField(value = "createTime")
    private Date createTime;

    /**
     * 采集时间
     */
    @TableField(value = "collectTime")
    private Date collectTime;

    /**
     * 采集点编码
     */
    @TableField(value = "collectCode")
    private String collectCode;

    /**
     * 工位编码
     */
    @TableField(value = "workPlaceCode")
    private Long workPlaceCode;

    /**
     * 备注
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 创建人
     */
    @TableField(value = "`createUser`")
    private String createUser;

    /**
     * 更新时间
     */
    @TableField(value = "updateTime")
    private Date updateTime;

    /**
     * 更新人
     */
    @TableField(value = "updateUser")
    private Long updateUser;
    /**
     * 赋码状态  0:原始单据未处理，1:已分配工位待处理；2：处理中；3：已完成；4：处理异常,-1:草稿，挂起状态，5：库存不足
     */
    @TableField(value = "tagStatus")
    private Integer tagStatus;

    /**
     * 拆零状态：0：未拆零，1，正在拆零；2,已完成；3.拆零失败
     */
    @TableField(value = "splitStatus")
    private Integer splitStatus;

    /**
     * 拆零异常信息
     */
    @TableField(value = "splitMsg")
    private String splitMsg;


    /**
     * 处方赋码信息
     */
    @TableField(value = "tagMsg")
    private String tagMsg;

    /**
     * 单据流通方式： 1:配送流通; 2:出库使用
     */
    @TableField(value = "orderCirType")
    private Integer orderCirType;


    /**
     * 单据备注1
     */
    @TableField(value = "backupOrderRemark1")
    private String backupOrderRemark1;

    /**
     * 单据备注2
     */
    @TableField(value = "backupOrderRemark2")
    private String backupOrderRemark2;

    /**
     * 单据备注3
     */
    @TableField(value = "backupOrderRemark3")
    private String backupOrderRemark3;

    /**
     * 单据备注4
     */
    @TableField(value = "backupOrderRemark4")
    private String backupOrderRemark4;

    /**
     * 单据备注5
     */
    @TableField(value = "backupOrderRemark5")
    private String backupOrderRemark5;

    /**
     * 单据备注6
     */
    @TableField(value = "backupOrderRemark6")
    private String backupOrderRemark6;

    /**
     * 排序时间
     */
    @TableField(value = "orderTime")
    private Date orderTime;


    /**
     * 库存预警： 1:上锁正常; 2:上锁不足；3:已释放锁
     */
    @TableField(value = "invAlert")
    private Integer invAlert;


    /**
     * 异常信息
     */
    @TableField(value = "errorMsg")
    private String errorMsg;


    @TableField(exist = false)
    private List<CollectOrderBizResponse> collectOrderBizResponseList;

    @TableField(exist = false)
    private List<IoCollectOrderBiz> bizList;

    private static final long serialVersionUID = 1L;
}
