package com.bonus.sgzb.app.domain;

import com.bonus.sgzb.common.core.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

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

/**
 * Description: 任务表tm_task
 *
 * @Author 阮世耀
 * @Create 2023/12/13 15:14
 * @Version 1.0
 */

@ApiModel(description = "任务表tm_task")
@Data
public class TmTask implements Serializable {

    private static final long serialVersionUID = -4135112109792782142L;

    private String id;

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

    /**
     * 任务类型(定义数据字典)
     */
    @ApiModelProperty(value = "任务类型(数据字典)")
    private Integer taskType;
    private List<TmTask> outboundType;

    /**
     * 任务状态(定义数据字典)
     */
    @ApiModelProperty(value = "任务状态(数据字典)")
    private Integer taskStatus;

    private Integer flag;

    /**
     * 预领料合计数
     */
    @ApiModelProperty(value = "预领料合计数")
    private Integer preCountNum;
    /**
     * 预领料合计数
     */
    @ApiModelProperty(value = "已出库数量")
    private Integer alNum;
    /**
     * 库存
     */
    @ApiModelProperty(value = "库存")
    private Double num;

    /**
     * 费用承担方
     */
    @ApiModelProperty(value = "费用承担方(01项目,03分包)")
    private String costBearingParty;
    /**
     * 编号
     */
    @ApiModelProperty(value = "编号")
    @Excel(name = "领料单号", sort = 1)
    private String code;

    /**
     * 创建者
     */
    @ApiModelProperty(value = "创建者")
    private String createBy;

    /**
     * 申请人手机号码
     */
    @ApiModelProperty(value = "手机号")
    private String phoneNumber;

    /**
     * 部门名称 单位名称
     */
    @ApiModelProperty(value = "部门/单位名称")
    private String deptName;

    /**
     * 工程名称
     */
    @ApiModelProperty(value = "工程名称")
    @Excel(name = "领料工程", sort = 3)
    private String proName;

    /**
     * 工程id
     */
    @ApiModelProperty(value = "工程id")
    private Integer proId;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    /**
     * 更新者
     */
    @ApiModelProperty(value = "更新者")
    private String updateBy;

    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    @Excel(name = "备注", sort = 11)
    private String remark;

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

    /**
     * 领料任务实体
     */
    @ApiModelProperty(value = "领料任务实体")
    private LeaseApplyInfo leaseApplyInfo;

    /**
     * 领料任务实体集合
     */
    @ApiModelProperty(value = "领料任务实体集合")
    private List<LeaseApplyInfo> leaseApplyInfoList;

    /**
     * 领料任务详情集合
     */
    @ApiModelProperty(value = "领料任务详情集合")
    private List<LeaseApplyDetails> leaseApplyDetails;

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

    @ApiModelProperty(value = "退料人")
    private String backPerson;
    @ApiModelProperty(value = "退料人联系电话")
    private String phone;
    @ApiModelProperty(value = "退料申请时间")
    private String backTime;
    @ApiModelProperty(value = "退料审核人 机具分公司审批人")
    private String directAuditBy;
    @ApiModelProperty(value = "退料审核时间 机具分公司审批时间")
    private String directAuditTime;
    @ApiModelProperty(value = "退料审核备注 机具分公司审批备注")
    private String directAuditRemark;

    @ApiModelProperty(value = "往来单位id")
    private Long unitId;
    @ApiModelProperty(value = "往来单位")
    @Excel(name = "领料单位", sort = 2)
    private String unitName;

    @ApiModelProperty(value = "工程id")
    private Long projectId;
    @ApiModelProperty(value = "关键字")
    private String keyWord;
    @ApiModelProperty(value = "开始时间")
    private String startTime;
    @ApiModelProperty(value = "结束时间")
    private String endTime;
    @ApiModelProperty(value = "类型")
    private Integer types;


    @ApiModelProperty(value = "协议编号")
    @Excel(name = "协议号", sort = 4)
    private String agreementCode;

    @ApiModelProperty(value = "领料人")
    @Excel(name = "领料人", sort = 5)
    private String leasePerson;

    @ApiModelProperty(value = "领料人手机号")
    @Excel(name = "联系电话", sort = 6)
    private String leasePhone;

    @ApiModelProperty(value = "申请人")
    @Excel(name = "申请人", sort = 7)
    private String applyFor;

    @ApiModelProperty(value = "任务状态")
    @Excel(name = "任务状态", sort = 9)
    private String taskName;

    @ApiModelProperty(value = "审批状态id")
    private String examineStatusId;

    @ApiModelProperty(value = "审批状态的备注")
    @Excel(name = "审批结果", sort = 10)
    private String examineStatus;

    @ApiModelProperty(value = "创建时间")
    @Excel(name = "申请时间", sort = 8)
    private String createTimes;

    @ApiModelProperty(value = "更新时间")
    private String updateTimes;

    @ApiModelProperty(value = "公司审批人")
    private String companyAuditBy;

    @ApiModelProperty(value = "公司审批时间")
    private String companyAuditTime;

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

    @ApiModelProperty(value = "分管审批人")
    private String deptAuditBy;

    @ApiModelProperty(value = "分管审批时间")
    private String deptAuditTime;

    @ApiModelProperty(value = "分管审批备注")
    private String deptAuditRemark;

    @ApiModelProperty(value = "领用类型：0 工程租赁 1长期领用")
    @Excel(name = "领料类型", readConverterExp = "0=工程租赁,1=长期租赁")
    private String leaseType;

    private String userId;
    private String userName;
    private String typeName;
    private String typeModelName;

    private String manageType;
    private String maCode;
    private String maId;
    private String status;
    private String maStatus;
    private String typeId;
    private Double partNum;
    @ApiModelProperty(value = "预计领料时间（重庆）")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date estimateLeaseTime;

    private Integer souceByRefuse;
    private int souceBy;

}