package com.xisc.pm.domain.entity;

import java.math.BigDecimal;
import java.util.Date;

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

import com.fasterxml.jackson.annotation.JsonInclude;

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;

/**
 * 自动组板结果信息表
 *
 * @author jun.zeng 2024-11-21 11:05:36
 */
@Setter
@Getter
@ApiModel("自动组板结果信息表")
@VersionAudit
@ModifyAudit
@JsonInclude(value = JsonInclude.Include.NON_NULL)
@Table(name = "PM_AUTO_PD_RESULT")
public class PmAutoPdResult extends AuditDomain {

    public static final String FIELD_RESULT_ID = "resultId";
    public static final String FIELD_REQUEST_ID = "requestId";
    public static final String FIELD_VERSION_ID = "versionId";
    public static final String FIELD_POLICY_GROUP_ID = "policyGroupId";
    public static final String FIELD_MSC_LINE_NO = "mscLineNo";
    public static final String FIELD_MOLD_THICK = "moldThick";
    public static final String FIELD_MOLD_WID = "moldWid";
    public static final String FIELD_VIRTUAL_SLAB_NO = "virtualSlabNo";
    public static final String FIELD_COMBO_SLAB_METHOD = "comboSlabMethod";
    public static final String FIELD_NORM_YIELD = "normYield";
    public static final String FIELD_COMMAND_YIELD = "commandYield";
    public static final String FIELD_ROLL_YIELD = "rollYield";
    public static final String FIELD_ORDER1_THICK = "order1Thick";
    public static final String FIELD_COMBINE_PLATE_WIDTH = "combinePlateWidth";
    public static final String FIELD_COMBINE_PLATE_LEN = "combinePlateLen";
    public static final String FIELD_TRANS_FLAG = "transFlag";
    public static final String FIELD_SINGLE_WEIGHT = "singleWeight";
    public static final String FIELD_INFUR_SLAB_THICK = "infurSlabThick";
    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_NEED_SLAB_LEN = "needSlabLen";
    public static final String FIELD_NEED_SLAB_WT = "needSlabWt";
    public static final String FIELD_PRE_CLEAN_SLAB_THICK = "preCleanSlabThick";
    public static final String FIELD_PRE_CLEAN_SLAB_WIDTH = "preCleanSlabWidth";
    public static final String FIELD_PRE_CLEAN_SLAB_LEN = "preCleanSlabLen";
    public static final String FIELD_PRE_CLEAN_SLAB_MAX_LEN = "preCleanSlabMaxLen";
    public static final String FIELD_PRE_CLEAN_SLAB_MIN_LEN = "preCleanSlabMinLen";
    public static final String FIELD_PRE_CLEAN_SLAB_WT = "preCleanSlabWt";
    public static final String FIELD_PRE_CLEAN_SLAB_MAX_WT = "preCleanSlabMaxWt";
    public static final String FIELD_PRE_CLEAN_SLAB_MIN_WT = "preCleanSlabMinWt";
    public static final String FIELD_PICK_MODE_LEN_DIR = "pickModeLenDir";
    public static final String FIELD_PICK_MODE_WID_DIR = "pickModeWidDir";
    public static final String FIELD_TOT_SMALL_PLATE_NUM = "totSmallPlateNum";
    public static final String FIELD_SAMPLE_LEN_HEAD = "sampleLenHead";
    public static final String FIELD_SAMPLE_LEN_TAIL = "sampleLenTail";
    public static final String FIELD_SAMPLE_LEN_MID = "sampleLenMid";
    public static final String FIELD_ORDER_NUM_IN_PLATE = "orderNumInPlate";
    public static final String FIELD_ROLL_WT_HP = "rollWtHp";
    public static final String FIELD_ROLL_THICK_TOL_MAX = "rollThickTolMax";
    public static final String FIELD_ROLL_THICK_TOL_MIN = "rollThickTolMin";
    public static final String FIELD_HEAD_CUT = "headCut";
    public static final String FIELD_TAIL_CUT = "tailCut";
    public static final String FIELD_ROLL_AIM_THICK = "rollAimThick";
    public static final String FIELD_ROLL_AIM_WIDTH = "rollAimWidth";
    public static final String FIELD_ROLL_AIM_LEN = "rollAimLen";
    public static final String FIELD_RS_CODE = "rsCode";
    public static final String FIELD_BROAD_FLAG = "broadFlag";
    public static final String FIELD_ORDER_NO_AXIS = "orderNoAxis";
    public static final String FIELD_PUBLISHED_STATUS = "publishedStatus";
    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";

    @ApiModelProperty("主键ID")
    @Id
    @GeneratedValue
    private Long resultId;
    @ApiModelProperty(value = "请求ID", required = true)
    @NotNull
    private Long requestId;
    @ApiModelProperty(value = "版本ID", required = true)
    @NotNull
    private Long versionId;
    @ApiModelProperty(value = "策略组ID", required = true)
    @NotNull
    private Long policyGroupId;
    @ApiModelProperty(value = "产线号")
    private String mscLineNo;
    @ApiModelProperty(value = "断面厚", required = true)
    @NotNull
    private BigDecimal moldThick;
    @ApiModelProperty(value = "断面宽", required = true)
    @NotNull
    private BigDecimal moldWid;
    @ApiModelProperty(value = "虚拟板坯号", required = true)
    @NotBlank
    private String virtualSlabNo;
    @ApiModelProperty(value = "组板方式")
    private String comboSlabMethod;
    @ApiModelProperty(value = "基准收得率")
    private BigDecimal normYield;
    @ApiModelProperty(value = "命令收得率")
    private BigDecimal commandYield;
    @ApiModelProperty(value = "轧制收得率")
    private BigDecimal rollYield;
    @ApiModelProperty(value = "轴合同订货厚度")
    private BigDecimal order1Thick;
    @ApiModelProperty(value = "组合板宽度")
    private BigDecimal combinePlateWidth;
    @ApiModelProperty(value = "组合板长度")
    private BigDecimal combinePlateLen;
    @ApiModelProperty(value = "转置标记")
    private Long transFlag;
    @ApiModelProperty(value = "单板重量", required = true)
    @NotNull
    private BigDecimal singleWeight;
    @ApiModelProperty(value = "进加热炉板坯厚度")
    private BigDecimal infurSlabThick;
    @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 BigDecimal needSlabLen;
    @ApiModelProperty(value = "必要板坯重量")
    private BigDecimal needSlabWt;
    @ApiModelProperty(value = "清理前板坯厚度")
    private BigDecimal preCleanSlabThick;
    @ApiModelProperty(value = "清理前板坯宽度")
    private BigDecimal preCleanSlabWidth;
    @ApiModelProperty(value = "清理前板坯长度")
    private BigDecimal preCleanSlabLen;
    @ApiModelProperty(value = "清理前板坯最大长度")
    private BigDecimal preCleanSlabMaxLen;
    @ApiModelProperty(value = "清理前板坯最小长度")
    private BigDecimal preCleanSlabMinLen;
    @ApiModelProperty(value = "清理前板坯重量")
    private BigDecimal preCleanSlabWt;
    @ApiModelProperty(value = "清理前板坯最大重量")
    private BigDecimal preCleanSlabMaxWt;
    @ApiModelProperty(value = "清理前板坯最小重量")
    private BigDecimal preCleanSlabMinWt;
    @ApiModelProperty(value = "取板方式_长度方向")
    private BigDecimal pickModeLenDir;
    @ApiModelProperty(value = "取板方式_宽度方向")
    private BigDecimal pickModeWidDir;
    @ApiModelProperty(value = "大板内成品小板总块数")
    private BigDecimal totSmallPlateNum;
    @ApiModelProperty(value = "头部试材长度")
    private BigDecimal sampleLenHead;
    @ApiModelProperty(value = "尾部试材长度")
    private BigDecimal sampleLenTail;
    @ApiModelProperty(value = "中部试材长度")
    private BigDecimal sampleLenMid;
    @ApiModelProperty(value = "板内合同个数")
    private BigDecimal orderNumInPlate;
    @ApiModelProperty(value = "厚板轧制重量")
    private BigDecimal rollWtHp;
    @ApiModelProperty(value = "轧制厚度公差上限")
    private BigDecimal rollThickTolMax;
    @ApiModelProperty(value = "轧制厚度公差下限")
    private BigDecimal rollThickTolMin;
    @ApiModelProperty(value = "头部切舍量")
    private BigDecimal headCut;
    @ApiModelProperty(value = "尾部切舍量")
    private BigDecimal tailCut;
    @ApiModelProperty(value = "轧制目标厚度")
    private BigDecimal rollAimThick;
    @ApiModelProperty(value = "轧制目标宽度")
    private BigDecimal rollAimWidth;
    @ApiModelProperty(value = "轧制目标长度")
    private BigDecimal rollAimLen;
    @ApiModelProperty(value = "RS代码")
    private String rsCode;
    @ApiModelProperty(value = "展宽标记")
    private String broadFlag;
    @ApiModelProperty(value = "轴合同号")
    private String orderNoAxis;
    @ApiModelProperty(value = "发布状态0-未处理，1-暂存，2-发布，3-发布中，4-发布失败")
    private Integer publishedStatus ;
    @ApiModelProperty(value = "命令粗切")
    private String commandCut ;
    @ApiModelProperty(value = "异宽粗切")
    private String diffCut ;
    
    @ApiModelProperty(value = "发布失败原因")
    private String errorMessage ;
    
    @ApiModelProperty(value = "租户ID", required = true)
    @NotNull
    private Long tenantId;
    @ApiModelProperty(value = "行版本号，用来处理锁", required = true)
    @NotNull
    private Long objectVersionNumber;
    
    @Transient
    @ApiModelProperty(value = "钢种", required = true)
    private String stNo ;
    
    @Transient
    @ApiModelProperty(value = "牌号", required = true)
    private String sgSign ;
    
    @Transient
    @ApiModelProperty(value = "精炼路径代码", required = true)
    private String rfPath ;
    
    @ApiModelProperty(value = "请求编码")
    @Transient
    private String requestCode ;
    
    @ApiModelProperty(value = "新虚拟板坯号")
    @Transient
    private String newVirtualSlabNo;
    
    // 交货日
    @Transient
    private Date delivyDate;

    // 到站港
    @Transient
    private String delivyPlace;

    // 客户
    @Transient
    private String orderCustCname;
    
    @Transient
    private Integer orderCustCnameCount ;
}
