package com.bonus.material.clz.domain.back;

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 lombok.experimental.Accessors;

import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 退料任务对象 back_apply_info
 * 
 * @author xsheng
 * @date 2024-10-16
 */
@Accessors(chain = true)
@Data
@ToString
public class MaterialBackApplyInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    private Boolean isExport;

    @ApiModelProperty(value = "是否退料 0 否，1 是")
    private Integer isBack;

    /** ID */
    private Long id;

    @ApiModelProperty(value = "协议id")
    private Long agreementId;

    @ApiModelProperty(value = "任务类型")
    private Integer taskType;

    @ApiModelProperty(value = "单位id")
    private Long unitId;

    @ApiModelProperty(value = "班组id")
    private Long teamId;

    @ApiModelProperty(value = "单位名称")
    private String unitName;

    @ApiModelProperty(value = "单位名称")
    @Excel(name = "退料班组")
    private String teamName;

    @ApiModelProperty(value="工程id")
    private Long proId;

    @ApiModelProperty(value="工程名称")
    @Excel(name = "工程名称")
    private String proName;

    /** 退料单号 */
    @Excel(name = "退料单号")
    @ApiModelProperty(value = "退料单号")
    private String code;

    @ApiModelProperty(value = "类型id")
    private String typeId;

    @ApiModelProperty(value = "物资类型")
    private String materialType;

    private String materialName;

    @ApiModelProperty(value = "类型名称")
    @Excel(name = "工器具类型")
    private String typeName;

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

    /** 退料人 */
    @Excel(name = "班组长")
    @ApiModelProperty(value = "退料人")
    private String backPerson;

    private String backSignUrl;

    private Byte backSignType;

    /**
     * 退料数量
     */
    private BigDecimal backNum;

    @Excel(name = "班组长电话")
    @ApiModelProperty(value = "联系方式")
    private String phone;

    @ApiModelProperty(value = "机具公司审批人")
    private Long directAuditBy;

    @ApiModelProperty(value = "机具公司审批时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date directAuditTime;

    @ApiModelProperty(value = "机具公司审批备注")
    private String directAuditRemark;

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

    @ApiModelProperty(value = "预退料时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date backTime;

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

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

    @Excel(name = "状态")
    @ApiModelProperty(value = "1.机具分公司审核通过，2.机具分公司审批不通过，3.调试分公司审批通过，4.调试分公司审批不通过，5.出库进行中，6.出库完成")
    private String status;

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

    private String updateBy;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @ApiModelProperty(value = "打印状态")
    private String printStatus;

    @Size(max = 500, message = "备注长度不能超过500个字符")
    @Excel(name = "备注")
    private String remark;

    @ApiModelProperty(value = "机具id")
    private Long maId;

    @ApiModelProperty(value = "任务ID")
    private Long parentId;

    @ApiModelProperty(value = "直转id")
    private Long directId;

    @ApiModelProperty(value="开始时间")
    private String startTime;

    @ApiModelProperty(value="结束时间")
    private String endTime;

    @ApiModelProperty(value="关键字")
    private String keyWord;

    @ApiModelProperty(value="设备编码")
    private String maCode;

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

    @ApiModelProperty(value = "审批人人签名URL")
    private String directAuditSignUrl;

    @ApiModelProperty(value = "app退料任务状态，0 未审核 1已审核（包含通过和驳回）")
    private Integer appTaskStatus;

    private String maStatus;

    @ApiModelProperty(value = "类型编号")
    private String typeCode;

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

    @ApiModelProperty(value = "计量单位")
    private String unitNames;

    @ApiModelProperty(value = "身份证号码")
    private String idCard;

    @ApiModelProperty(value = "i8工程id")
    private String externalId;

    @ApiModelProperty(value = "实施单位id")
    private String impUnit;

    /**
     * i8工程id集合
     */
    private List<String> projectIdList;

    @ApiModelProperty(value = "退料方式（0 材料退料，1 工器具退料，2 第三方推送）")
    private String backStyle;

    @ApiModelProperty(value = "分公司")
    private String impUnitName;

    @ApiModelProperty(value = "分包单位")
    @Excel(name = "分包单位",sort = 5)
    private String subUnitName;

    @ApiModelProperty(value = "项目部")
    @Excel(name = "项目部",sort = 4)
    private String departName;

}
