package com.bonus.common.biz.domain.repair;

import com.bonus.common.core.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import com.bonus.common.core.web.domain.BaseEntity;

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

/**
 * 修试后入库对象 repair_input_details
 *
 * @author xsheng
 * @date 2024-10-16
 */


@Data
@ToString
public class RepairInputDetails extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 任务ID */
    @ApiModelProperty(value = "任务ID")
    private Long taskId;

    @ApiModelProperty(value = "任务ID集合")
    private List<RePairDto> outTaskList;

    /** 维修审核ID */
    @ApiModelProperty(value = "维修审核ID")
    private Long auditId;

    /** 维修ID */
    @ApiModelProperty(value = "维修ID")
    private Long repairId;

    /** 机具ID */
    @ApiModelProperty(value = "机具ID")
    private Long maId;

    @ApiModelProperty(value = "机具编码")
    private String maCode;

    /** 规格ID */
    @ApiModelProperty(value = "规格ID")
    private Long typeId;

    @ApiModelProperty(value = "物资名称")
    private String typeName;

    @ApiModelProperty(value = "规格型号")
    private String typeModelName;

    @ApiModelProperty(value = "机具状态")
    private String maStatus;

    @ApiModelProperty(value = "入库方式 0编码，1数量，2二维码，3标准箱")
    private Integer inputType;

    @ApiModelProperty(value = "二维码code")
    private String qrCode;

    /**
     * 退料单位名称
     */
    @ApiModelProperty(value = "退料单位名称")
    @Excel(name = "退料单位",sort = 1)
    private String backUnit;
    /**
     * 退料工程名称
     */
    @ApiModelProperty(value = "退料工程名称")
    @Excel(name = "工程名称",sort = 2)
    private String backPro;

    @ApiModelProperty(value = "修饰入库编码")
    @Excel(name = "入库单号",sort = 3)
    private String inputCode;

    @ApiModelProperty(value = "物资类型")
    @Excel(name = "物资类型",sort = 4)
    private String materialType;

    @ApiModelProperty(value = "修饰入库编码")
    @Excel(name = "维修单号",sort = 5)
    private String repairCode;

    @Excel(name = "创建人")
    private String createBy;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /** 0未审核，1已入库，2驳回 */
    @Excel(name = "状态")
    private String statusName;

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

    @ApiModelProperty(value = "驳回原因")
    private String rejectReason;

    @ApiModelProperty(value = "任务状态")
    private Integer taskStatus;

    /** 维修合格数量 */
    @ApiModelProperty(value = "维修合格数量")
    private BigDecimal repairNum;

    @ApiModelProperty(value = "待入库数量")
    private BigDecimal pendingInputNum;

    @ApiModelProperty(value = "驳回数量")
    private BigDecimal rejectNum;

    /** 入库数量 */
    @ApiModelProperty(value = "入库数量")
    private BigDecimal inputNum;

    /** 0未审核，1已入库，2驳回 */
    @ApiModelProperty(value = "0未审核，1已入库，2驳回")
    private String status;

    /** 数据所属组织 */
    @ApiModelProperty(value = "数据所属组织")
    private Long companyId;

    @ApiModelProperty(value = "协议号")
    private Integer agreementId;

    private String manageType;

    /**
     * 关键字
     */
    private String keyWord;
    /**
     * 开始时间
     */
    private String startTime;
    /**
     * 结束时间
     */
    private String endTime;

    @ApiModelProperty(value = "退料ID")
    private Long backId;

    @ApiModelProperty(value = "操作前库存数量")
    private BigDecimal preStoreNum;

    @ApiModelProperty(value = "操作后库存数量")
    private BigDecimal postStoreNum;

    @ApiModelProperty(value = "审核人id")
    private Long auditBy;

    @ApiModelProperty(value = "审核人")
    private String auditByName;

    @ApiModelProperty(value = "审核时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date auditTime;

    @ApiModelProperty(value = "编码列表")
    private List<RepairInputDetails> maCodeList;

    @ApiModelProperty(value = "详情列表")
    private List<RepairInputDetails> detailsList;

    @ApiModelProperty(value = "app维修任务状态，1 进行中 1已审核（包含通过和驳回）")
    private Integer appTaskStatus;

    private String boxCode;

    private String boxId;

    @ApiModelProperty(value = "登录用户id")
    private Long userId;

    @ApiModelProperty(value = "一级类型id")
    private String firstId;

    private String backCode;

}
