package cn.estsh.i3plus.ext.mes.pojo.model.bu3;

import cn.estsh.i3plus.ext.mes.pojo.util.MesExtConstWords;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;

/**
 * @DESCRIPTION:
 * @USER: wangjie
 * @DATE: 2022-11-01 15:54
 */
@Data
@ApiModel("不良数量MODEL")
public class SxProdDataBlslModel implements Serializable {

    private static final long serialVersionUID = -4260563386615232694L;

    @ApiParam("组织代码")
    public String organizeCode;

    @ApiParam("工厂代码")
    public String org;

    @ApiParam("组织名称")
    public String orgName;

    @ApiParam("生产线代码")
    private String workCenterCode;

    @ApiParam("生产线名称")
    private String workCenterName;

    @ApiParam("系别")
    private String isDont;

    @ApiParam("班别")
    private String dontClass;

    @ApiParam("生产工单号")
    private String workOrderNo;

    @ApiParam("物料号")
    private String partNo;

    @ApiParam("物料名称")
    private String partName;

    @ApiParam("不良数量")
    private Integer qty;

    @ApiParam("产品条码")
    private String serialNumber;

    @ApiParam("不良类型代码")
    private String defectType;

    @ApiParam("不良类型描述")
    private String defectTypeName;

    @ApiParam("不良标识代码")
    private String defectCode;

    @ApiParam("不良标识描述")
    private String defectName;

    @ApiParam("维修代码")
    private String repairCode;

    @ApiParam("维修名称")
    private String repairName;

    @ApiParam("缺陷原因代码")
    private String dcCode;

    @ApiParam("缺陷原因描述")
    private String dcName;

    @ApiParam("维修判定")
    private String repairJudge;

    @ApiParam("维修判定")
    private String repairJudgeName;

    @ApiParam("维修状态")
    private String repairStatusName;

    @ApiParam("统计")
    private Integer statistics;

    @ApiParam("创建时间")
    private String createDatetime;

    @ApiParam("创建时间(年月日)")
    private String createDate;

    @ApiParam("更新时间")
    private String modifyDatetime;

    @ApiParam("更新时间(年月日)")
    private String modifyDate;

    public SxProdDataBlslModel() {}

    public SxProdDataBlslModel(String org, String orgName) {
        this.org = org;
        this.orgName = orgName;
    }

    public SxProdDataBlslModel(SxProdDataBlslModel source) {
        if (null == source) return;
        BeanUtils.copyProperties(source, this, MesExtConstWords.CREATE_DATE_TIME, MesExtConstWords.MODIFY_DATE_TIME);
    }
}
