package com.bonus.material.repair.domain;

import com.bonus.common.core.web.domain.BaseEntity;
import com.bonus.material.ma.domain.PartType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

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

/**
 * @author syruan
 */
@EqualsAndHashCode(callSuper = false)
@Data
@ApiModel(value="维修任务明细")
public class RepairTaskDetails extends BaseEntity {
    /**
     * id
     */
    @ApiModelProperty(value = "id")
    private Long id;

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

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

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

    /**
     * 机具ID
     */
    @ApiModelProperty(value = "机具ID")
    private String maId;
    /**
     * 类型名称
     */
    @ApiModelProperty(value = "类型名称")
    private String typeName;

    /**
     * 规格类型id
     */
    @ApiModelProperty(value = "规格型号id")
    private String typeId;

    /**
     * 规格型号
     */
    @ApiModelProperty(value = "规格型号")
    private String type;

    @ApiModelProperty(value = "物资单位")
    private String unitName;

    @ApiModelProperty(value = "管理模式")
    private Integer manageType;

    /**
     * 编码
     */
    @ApiModelProperty(value = "设备编码")
    private String code;

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

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

    /**
     * 维修方式: 1内部 2外部返厂 3报废
     */
    @ApiModelProperty(value = "维修方式: 1内部 2外部 3报废")
    private Integer repairType;

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

    /**
     * 本次维修合格数量
     */
    @ApiModelProperty(value = "本次维修合格数量")
    private BigDecimal thisRepairedNum;
    /**
     * 维修报废数量
     */
    @ApiModelProperty(value = "维修报废数量")
    private BigDecimal scrapNum;
    /**
     * 本次维修报废数量
     */
    @ApiModelProperty(value = "本次维修报废数量")
    private BigDecimal thisScrapNum;
    /**
     * 待修状态
     */
    @ApiModelProperty(value = "待修状态")
    private String status;

    @ApiModelProperty(value = "组织id")
    private Long companyId;

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

    @ApiModelProperty(value = "维修人员")
    private String repairer;

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

    @ApiModelProperty(value = "维修任务编码")
    private String taskCode;

    @ApiModelProperty(value = "维修拆分层级")
    private String level;

    @ApiModelProperty(value = "维修拆分父级id")
    private Long parentId;

    /**
     * 维修前总量
     */
    @ApiModelProperty(value = "维修前总量")
    private BigDecimal preRepairNum;

    /**
     * 维修前合格总量
     */
    @ApiModelProperty(value = "维修前合格总量")
    private BigDecimal preRepairedNum;

    /**
     * 维修前报废总量
     */
    @ApiModelProperty(value = "维修前报废总量")
    private BigDecimal preScrapNum;

    @ApiModelProperty("额定载荷")
    private String ratedLoad;

    @ApiModelProperty("试验载荷")
    private String testLoad;

    @ApiModelProperty("持荷时间")
    private String holdingTime;

    private String userName;

    private int isDs ;

    private List<PartType> partTypeList;

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

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

    public RepairTaskDetails(Long taskId) {
        this.taskId = taskId;
    }

    public RepairTaskDetails() {
    }

}
