package com.xisc.pm.domain.entity;

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;

import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;


/**
 * 炼钢连铸制造命令板坯表(PmSteelCastSlab)实体类
 *
 * @author
 * @since 2024-09-25 19:21:24
 */

@Getter
@Setter
@ApiModel("炼钢连铸制造命令板坯表")
@VersionAudit
@ModifyAudit
@JsonInclude(value = JsonInclude.Include.NON_NULL)
@Table(name = "PM_STEEL_CAST_SLAB")
public class PmSteelCastSlab extends AuditDomain implements Serializable {
    private static final long serialVersionUID = -96922934017577551L;

    public static final String FIELD_STEEL_CAST_SLAB_ID = "steelCastSlabId";
    public static final String FIELD_MAIN_BACKLOG_CODE = "mainBacklogCode";
    public static final String FIELD_SLAB_NO = "slabNo";
    public static final String FIELD_CAST_LOT_NO = "castLotNo";
    public static final String FIELD_PONO = "pono";
    public static final String FIELD_BILLET_TYPE = "billetType";
    public static final String FIELD_SLAB_GROUP_NO = "slabGroupNo";
    public static final String FIELD_YEAR_ID = "yearId";
    public static final String FIELD_SLAB_NUM = "slabNum";
    public static final String FIELD_SLAB_PLACE_CODE = "slabPlaceCode";
    public static final String FIELD_SLAB_SEQ_HEAT = "slabSeqHeat";
    public static final String FIELD_VARIETY_CODE = "varietyCode";
    public static final String FIELD_STEEL_CODE = "steelCode";
    public static final String FIELD_SLAB_THICK = "slabThick";
    public static final String FIELD_SLAB_WIDTH = "slabWidth";
    public static final String FIELD_SLAB_LEN = "slabLen";
    public static final String FIELD_SLAB_MAX_LEN = "slabMaxLen";
    public static final String FIELD_SLAB_MIN_LEN = "slabMinLen";
    public static final String FIELD_SLAB_WT = "slabWt";
    public static final String FIELD_SLAB_MAX_WT = "slabMaxWt";
    public static final String FIELD_SLAB_MIN_WT = "slabMinWt";
    public static final String FIELD_ORDER_LEN_MAX = "orderLenMax";
    public static final String FIELD_ORDER_LEN_MIN = "orderLenMin";
    public static final String FIELD_ORDER_SHORT_MAX = "orderShortMax";
    public static final String FIELD_ORDER_SHORT_MIN = "orderShortMin";
    public static final String FIELD_ORDER_SHORT_RATE = "orderShortRate";
    public static final String FIELD_INFUR_SLAB_WID = "infurSlabWid";
    public static final String FIELD_INFUR_SLAB_LEN = "infurSlabLen";
    public static final String FIELD_INFUR_SLAB_MAX_LEN = "infurSlabMaxLen";
    public static final String FIELD_INFUR_SLAB_MIN_LEN = "infurSlabMinLen";
    public static final String FIELD_INFUR_SLAB_WT = "infurSlabWt";
    public static final String FIELD_INFUR_SLAB_MAX_WT = "infurSlabMaxWt";
    public static final String FIELD_INFUR_SLAB_MIN_WT = "infurSlabMinWt";
    public static final String FIELD_ORDER_NO = "orderNo";
    public static final String FIELD_PLAN_TYPE = "planType";
    public static final String FIELD_SLAB_DEST = "slabDest";
    public static final String FIELD_HOT_SEND_FLAG = "hotSendFlag";
    public static final String FIELD_HOT_CHARGE_FLAG = "hotChargeFlag";
    public static final String FIELD_MEND_FLAG = "mendFlag";
    public static final String FIELD_SLAB_FINISH_CODE = "slabFinishCode";
    public static final String FIELD_FLAME_CLEAN_DIV = "flameCleanDiv";
    public static final String FIELD_NEW_TEST_NO = "newTestNo";
    public static final String FIELD_SHORT_CUT_FLAG = "shortCutFlag";
    public static final String FIELD_PREC_ROLL_PLAN_NO = "precRollPlanNo";
    public static final String FIELD_PREC_ROLL_SEQ_NO = "precRollSeqNo";
    public static final String FIELD_SLAB_COOL_CODE = "slabCoolCode";
    public static final String FIELD_ORDER_REMAIN_DIV = "orderRemainDiv";
    public static final String FIELD_STEEL_LATEST_DATE = "steelLatestDate";
    public static final String FIELD_TENANT_ID = "tenantId";
    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 static final String FIELD_MSC_LINE_NO = "mscLineNo";
    public static final String FIELD_REP_MAT_FLAG = "repMatFlag";
    public static final String FIELD_SG_SIGN = "sgSign";
    public static final String FIELD_STRAND_NO = "strandNo";
    public static final String FIELD_INGOT_TYPE = "ingotType";

    @Id
    @GeneratedValue
    private Long steelCastSlabId;

    @ApiModelProperty(value = "厂别")
    private String mainBacklogCode;

    @ApiModelProperty(value = "命令板坯号")
    private String slabNo;

    @ApiModelProperty(value = "CAST_LOT号")
    private String castLotNo;

    @ApiModelProperty(value = "制造命令号")
    private String pono;

    @ApiModelProperty(value = "钢坯类型")
    private String billetType;

    @ApiModelProperty(value = "板坯组号")
    private Long slabGroupNo;

    @ApiModelProperty(value = "年", required = true)
    @NotNull
    private Long yearId;

    @ApiModelProperty(value = "板坯块数")
    private Long slabNum;

    @ApiModelProperty(value = "板坯位置代码")
    private String slabPlaceCode;

    @ApiModelProperty(value = "炉内板坯顺序号")
    private Long slabSeqHeat;

    @ApiModelProperty(value = "品种代码")
    private String varietyCode;

    @ApiModelProperty(value = "钢种代码")
    private String steelCode;

    @ApiModelProperty(value = "板坯厚度")
    private BigDecimal slabThick;

    @ApiModelProperty(value = "板坯宽度")
    private BigDecimal slabWidth;

    @ApiModelProperty(value = "板坯长度")
    private BigDecimal slabLen;

    @ApiModelProperty(value = "板坯长度最大值")
    private BigDecimal slabMaxLen;

    @ApiModelProperty(value = "板坯长度最小值")
    private BigDecimal slabMinLen;

    @ApiModelProperty(value = "板坯重量")
    private BigDecimal slabWt;

    @ApiModelProperty(value = "板坯重量最大值")
    private BigDecimal slabMaxWt;

    @ApiModelProperty(value = "板坯重量最小值")
    private BigDecimal slabMinWt;

    @ApiModelProperty(value = "订货长度上限")
    private BigDecimal orderLenMax;

    @ApiModelProperty(value = "订货长度下限")
    private BigDecimal orderLenMin;

    @ApiModelProperty(value = "订货最大短尺")
    private BigDecimal orderShortMax;

    @ApiModelProperty(value = "订货最小短尺")
    private BigDecimal orderShortMin;

    @ApiModelProperty(value = "订货短尺率")
    private BigDecimal orderShortRate;

    @ApiModelProperty(value = "进加热炉板坯宽度")
    private BigDecimal infurSlabWid;

    @ApiModelProperty(value = "进加热炉板坯长度")
    private BigDecimal infurSlabLen;

    @ApiModelProperty(value = "进加热炉板坯最大长度")
    private BigDecimal infurSlabMaxLen;

    @ApiModelProperty(value = "进加热炉板坯最小长度")
    private BigDecimal infurSlabMinLen;

    @ApiModelProperty(value = "进加热炉板坯重量")
    private BigDecimal infurSlabWt;

    @ApiModelProperty(value = "进加热炉板坯最大重量")
    private BigDecimal infurSlabMaxWt;

    @ApiModelProperty(value = "进加热炉板坯最小重量")
    private BigDecimal infurSlabMinWt;

    @ApiModelProperty(value = "合同号")
    private String orderNo;

    @ApiModelProperty(value = "计划类型")
    private String planType;

    @ApiModelProperty(value = "板坯去向")
    private String slabDest;

    @ApiModelProperty(value = "热送标记")
    private String hotSendFlag;

    @ApiModelProperty(value = "热装标记")
    private String hotChargeFlag;

    @ApiModelProperty(value = "修磨标志")
    private Long mendFlag;

    @ApiModelProperty(value = "板坯精整基准代码")
    private String slabFinishCode;

    @ApiModelProperty(value = "火焰清理区分")
    private String flameCleanDiv;

    @ApiModelProperty(value = "新试号")
    private String newTestNo;

    @ApiModelProperty(value = "短尺坯切割标记")
    private String shortCutFlag;

    @ApiModelProperty(value = "预定轧制计划号")
    private String precRollPlanNo;

    @ApiModelProperty(value = "预定轧制计划顺序号")
    private Long precRollSeqNo;

    @ApiModelProperty(value = "板坯冷却基准代码")
    private String slabCoolCode;

    @ApiModelProperty(value = "合同材/预备材区分")
    private String orderRemainDiv;

    @ApiModelProperty(value = "炼钢最晚结束日期")
    private Date steelLatestDate;

    @ApiModelProperty(value = "租户ID", required = true)
    @NotNull
    private Long tenantId;

    private String attribute1;

    private String attribute2;

    private String attribute3;

    private String attribute4;

    private String attribute5;

    @ApiModelProperty(value = "产线号")
    private String mscLineNo;

    @ApiModelProperty(value = "是否代表板标记")
    private String repMatFlag;

    @ApiModelProperty(value = "牌号")
    private String sgSign;

    @ApiModelProperty(value = "流号")
    private String strandNo;

    @ApiModelProperty(value = "钢锭型")
    private String ingotType;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

}
