package com.xisc.pm.domain.entity;

import java.io.Serializable;
import java.math.BigDecimal;

import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import com.fasterxml.jackson.annotation.JsonInclude;

import com.xisc.pm.infra.constant.Constants;
import com.xisc.pm.infra.util.Utils;
import io.choerodon.mybatis.annotation.ModifyAudit;
import io.choerodon.mybatis.annotation.VersionAudit;
import io.choerodon.mybatis.domain.AuditDomain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * 钢板信息表(PmPdPlateInfo)实体类
 *
 * @author 蒋雨航 yuhang.jiang02@hand-china.com
 * @since 2024-08-22 19:58:30
 */

@Getter
@Setter
@ApiModel("钢板信息表")
@VersionAudit
@ModifyAudit
@JsonInclude(value = JsonInclude.Include.NON_NULL)
@Table(name = "PM_PD_PLATE_INFO")
public class PmPdPlateInfo extends AuditDomain implements Serializable {
    private static final long serialVersionUID = 643519837223103276L;

    public static final String FIELD_PM_PD_PLATE_INFO_ID = "pmPdPlateInfoId";
    public static final String FIELD_PLATE_NO = "plateNo";
    public static final String FIELD_SLAB_NO = "slabNo";
    public static final String FIELD_PONO = "pono";
    public static final String FIELD_WHOLE_BACKLOG_CODE = "wholeBacklogCode";
    public static final String FIELD_WHOLE_BACKLOG_SEQ = "wholeBacklogSeq";
    public static final String FIELD_NEXT_WHOLE_BACKLOG_CODE = "nextWholeBacklogCode";
    public static final String FIELD_NEXT_WHOLE_BACKLOG_SEQ = "nextWholeBacklogSeq";
    public static final String FIELD_WHOLE_BACKLOG_ACT = "wholeBacklogAct";
    public static final String FIELD_OU_BACKLOG_SEQ = "ouBacklogSeq";
    public static final String FIELD_OU_BACKLOG_CODE = "ouBacklogCode";
    public static final String FIELD_MAT_STATUS = "matStatus";
    public static final String FIELD_PD_STATUS_HP = "pdStatusHp";
    public static final String FIELD_AUTO_MANUAL_FLAG = "autoManualFlag";
    public static final String FIELD_PD_BEGIN_TIME = "pdBeginTime";
    public static final String FIELD_PD_END_TIME = "pdEndTime";
    public static final String FIELD_PD_PROGRAM = "pdProgram";
    public static final String FIELD_PD_RESP = "pdResp";
    public static final String FIELD_SG_STD = "sgStd";
    public static final String FIELD_SG_SIGN = "sgSign";
    public static final String FIELD_ST_NO = "stNo";
    public static final String FIELD_PSC = "psc";
    public static final String FIELD_APN = "apn";
    public static final String FIELD_MSC = "msc";
    public static final String FIELD_MSC_LINE_NO = "mscLineNo";
    public static final String FIELD_OLD_PSC = "oldPsc";
    public static final String FIELD_OLD_APN = "oldApn";
    public static final String FIELD_OLD_MSC = "oldMsc";
    public static final String FIELD_OLD_MSC_LINE = "oldMscLine";
    public static final String FIELD_CAN_ASSIGN_FLAG = "canAssignFlag";
    public static final String FIELD_REMAIN_CAUSE_CODE = "remainCauseCode";
    public static final String FIELD_STOCK_NO = "stockNo";
    public static final String FIELD_MAT_ACT_THICK = "matActThick";
    public static final String FIELD_MAT_ACT_WIDTH = "matActWidth";
    public static final String FIELD_MAT_ACT_LEN = "matActLen";
    public static final String FIELD_MAT_ACT_WT = "matActWt";
    public static final String FIELD_SHP_CODE = "shpCode";
    public static final String FIELD_THICK1 = "thick1";
    public static final String FIELD_THICK2 = "thick2";
    public static final String FIELD_THICK3 = "thick3";
    public static final String FIELD_LEN1 = "len1";
    public static final String FIELD_LEN2 = "len2";
    public static final String FIELD_LEN3 = "len3";
    public static final String FIELD_LEN4 = "len4";
    public static final String FIELD_LEN5 = "len5";
    public static final String FIELD_UOE_FLAG = "uoeFlag";
    public static final String FIELD_WITH_SIDE_FLAG = "withSideFlag";
    public static final String FIELD_BETTER_SURF_WARD_CODE = "betterSurfWardCode";
    public static final String FIELD_AD_MODE_CODE = "adModeCode";
    public static final String FIELD_CTRL_ROLL_CODE = "ctrlRollCode";
    public static final String FIELD_HEAT_TREAT_PLATE_FLAG = "heatTreatPlateFlag";
    public static final String FIELD_ACT_CUT_MODE = "actCutMode";
    public static final String FIELD_FUR_TYPE = "furType";
    public static final String FIELD_ROLL_DIRECT_CODE = "rollDirectCode";
    public static final String FIELD_ACT_PRESS_RATE = "actPressRate";
    public static final String FIELD_ACT_BROAD_RATIO = "actBroadRatio";
    public static final String FIELD_REMAIN_MIN_THICK = "remainMinThick";
    public static final String FIELD_REMAIN_MAX_THICK = "remainMaxThick";
    public static final String FIELD_PD_RESP_AUTO = "pdRespAuto";
    public static final String FIELD_PD_TIME_AUTO = "pdTimeAuto";
    public static final String FIELD_PD_AUTO_FLAG = "pdAutoFlag";
    public static final String FIELD_TENANT_ID = "tenantId";
    public static final String FIELD_OBJECT_VERSION_NUMBER = "objectVersionNumber";
    public static final String FIELD_CREATION_DATE = "creationDate";
    public static final String FIELD_CREATED_BY = "createdBy";
    public static final String FIELD_LAST_UPDATED_BY = "lastUpdatedBy";
    public static final String FIELD_LAST_UPDATE_DATE = "lastUpdateDate";
    public static final String FIELD_ATTRIBUTE1 = "attribute1";
    public static final String FIELD_ATTRIBUTE2 = "attribute2";
    public static final String FIELD_ATTRIBUTE3 = "attribute3";
    public static final String FIELD_ATTRIBUTE4 = "attribute4";
    public static final String FIELD_ATTRIBUTE5 = "attribute5";

//
// 业务方法(按public protected private顺序排列)
// ------------------------------------------------------------------------------

//
// 数据库字段
// ------------------------------------------------------------------------------

    @ApiModelProperty("")
    @Id
    @GeneratedValue
    private Long pmPdPlateInfoId;
    @ApiModelProperty(value = "钢板号")
    private String plateNo;
    @ApiModelProperty(value = "板坯号")
    private String slabNo;
    @ApiModelProperty(value = "制造命令号")
    private String pono;
    @ApiModelProperty(value = "全程工序代码")
    private String wholeBacklogCode;
    @ApiModelProperty(value = "全程工序顺序号")
    private Long wholeBacklogSeq;
    @ApiModelProperty(value = "后全程工序代码")
    private String nextWholeBacklogCode;
    @ApiModelProperty(value = "后全程工序顺序号")
    private Long nextWholeBacklogSeq;
    @ApiModelProperty(value = "实际全程工序途径码")
    private String wholeBacklogAct;
    @ApiModelProperty(value = "组批工序顺序号")
    private Long ouBacklogSeq;
    @ApiModelProperty(value = "组批工序代码")
    private String ouBacklogCode;
    @ApiModelProperty(value = "材料状态码")
    private String matStatus;
    @ApiModelProperty(value = "厚板组板状态")
    private String pdStatusHp;
    @ApiModelProperty(value = "自动人工标记")
    private String autoManualFlag;
    @ApiModelProperty(value = "组批开始时间")
    private String pdBeginTime;
    @ApiModelProperty(value = "组批结束时间")
    private String pdEndTime;
    @ApiModelProperty(value = "组批程序")
    private String pdProgram;
    @ApiModelProperty(value = "组板责任者")
    private String pdResp;
    @ApiModelProperty(value = "标准")
    private String sgStd;
    @ApiModelProperty(value = "牌号")
    private String sgSign;
    @ApiModelProperty(value = "内部钢种")
    private String stNo;
    @ApiModelProperty(value = "产品规范码")
    private String psc;
    @ApiModelProperty(value = "产品最终用途码")
    private String apn;
    @ApiModelProperty(value = "冶金规范码")
    private String msc;
    @ApiModelProperty(value = "产线号")
    private String mscLineNo;
    @ApiModelProperty(value = "原产品规范码")
    private String oldPsc;
    @ApiModelProperty(value = "原产品用途码")
    private String oldApn;
    @ApiModelProperty(value = "原冶金规范码")
    private String oldMsc;
    @ApiModelProperty(value = "原产线号")
    private String oldMscLine;
    @ApiModelProperty(value = "可充当标记")
    private String canAssignFlag;
    @ApiModelProperty(value = "余材原因代码")
    private String remainCauseCode;
    @ApiModelProperty(value = "库号")
    private String stockNo;
    @ApiModelProperty(value = "材料实际厚度")
    private BigDecimal matActThick;
    @ApiModelProperty(value = "材料实际宽度")
    private BigDecimal matActWidth;
    @ApiModelProperty(value = "材料实际长度")
    private BigDecimal matActLen;
    @ApiModelProperty(value = "材料实际重量")
    private BigDecimal matActWt;
    @ApiModelProperty(value = "钢板形状代码")
    private String shpCode;
    @ApiModelProperty(value = "钢板厚度1")
    private BigDecimal thick1;
    @ApiModelProperty(value = "钢板厚度2")
    private BigDecimal thick2;
    @ApiModelProperty(value = "钢板厚度3")
    private BigDecimal thick3;
    @ApiModelProperty(value = "钢板长度1")
    private BigDecimal len1;
    @ApiModelProperty(value = "钢板长度2")
    private BigDecimal len2;
    @ApiModelProperty(value = "钢板长度3")
    private BigDecimal len3;
    @ApiModelProperty(value = "钢板长度4")
    private BigDecimal len4;
    @ApiModelProperty(value = "钢板长度5")
    private BigDecimal len5;
    @ApiModelProperty(value = "UOE合同标记")
    private String uoeFlag;
    @ApiModelProperty(value = "毛边切边标记")
    private String withSideFlag;
    @ApiModelProperty(value = "好面朝向代码")
    private String betterSurfWardCode;
    @ApiModelProperty(value = "AD控制模式代码")
    private String adModeCode;
    @ApiModelProperty(value = "控轧代码")
    private String ctrlRollCode;
    @ApiModelProperty(value = "热处理板标记")
    private String heatTreatPlateFlag;
    @ApiModelProperty(value = "实际切断方式代码")
    private String actCutMode;
    @ApiModelProperty(value = "加热炉类型")
    private String furType;
    @ApiModelProperty(value = "轧制方向代码")
    private String rollDirectCode;
    @ApiModelProperty(value = "实际压下比")
    private BigDecimal actPressRate;
    @ApiModelProperty(value = "实际展宽比")
    private BigDecimal actBroadRatio;
    @ApiModelProperty(value = "余材最小厚度")
    private BigDecimal remainMinThick;
    @ApiModelProperty(value = "余材最大厚度")
    private BigDecimal remainMaxThick;
    @ApiModelProperty(value = "收小池责任者")
    private String pdRespAuto;
    @ApiModelProperty(value = "收小池时间")
    private String pdTimeAuto;
    @ApiModelProperty(value = "正在自动组板中标记")
    private String pdAutoFlag;
    @ApiModelProperty(value = "租户ID", required = true)
    @NotNull
    private Long tenantId;
    @ApiModelProperty(value = "行版本号，用来处理锁", required = true)
    @NotNull
    private Long objectVersionNumber;
    
    @ApiModelProperty(value = "")
    private String attribute1;
    @ApiModelProperty(value = "")
    private String attribute2;
    @ApiModelProperty(value = "")
    private String attribute3;
    @ApiModelProperty(value = "")
    private String attribute4;
    @ApiModelProperty(value = "")
    private String attribute5;

    public void setMatActThick(BigDecimal matActThick) {
        this.matActThick = Utils.conversionDecimal(matActThick, Constants.ConversionType.THICKNESS);
    }

    public void setMatActWidth(BigDecimal matActWidth) {
        this.matActWidth = Utils.conversionDecimal(matActWidth, Constants.ConversionType.WIDTH);
    }

    public void setMatActLen(BigDecimal matActLen) {
        this.matActLen = Utils.conversionDecimal(matActLen, Constants.ConversionType.LENGTH);
    }

    public void setMatActWt(BigDecimal matActWt) {
        this.matActWt = Utils.conversionDecimal(matActWt, Constants.ConversionType.WEIGHT);
    }

    public void setThick1(BigDecimal thick1) {
        this.thick1 = Utils.conversionDecimal(thick1, Constants.ConversionType.THICKNESS);
    }

    public void setThick2(BigDecimal thick2) {
        this.thick2 = Utils.conversionDecimal(thick2, Constants.ConversionType.THICKNESS);
    }

    public void setThick3(BigDecimal thick3) {
        this.thick3 = Utils.conversionDecimal(thick3, Constants.ConversionType.THICKNESS);
    }

    public void setLen1(BigDecimal len1) {
        this.len1 = Utils.conversionDecimal(len1, Constants.ConversionType.LENGTH);
    }

    public void setLen2(BigDecimal len2) {
        this.len2 = Utils.conversionDecimal(len2, Constants.ConversionType.LENGTH);
    }

    public void setLen3(BigDecimal len3) {
        this.len3 = Utils.conversionDecimal(len3, Constants.ConversionType.LENGTH);
    }

    public void setLen4(BigDecimal len4) {
        this.len4 = Utils.conversionDecimal(len4, Constants.ConversionType.LENGTH);
    }

    public void setLen5(BigDecimal len5) {
        this.len5 = Utils.conversionDecimal(len5, Constants.ConversionType.LENGTH);
    }

    public void setRemainMinThick(BigDecimal remainMinThick) {
        this.remainMinThick = Utils.conversionDecimal(remainMinThick, Constants.ConversionType.THICKNESS);
    }

    public void setRemainMaxThick(BigDecimal remainMaxThick) {
        this.remainMaxThick = Utils.conversionDecimal(remainMaxThick, Constants.ConversionType.THICKNESS);
    }
}
