package com.cf.imes.module.executor.dal.dataobject.ordermodel;

import com.alibaba.fastjson.JSONObject;
import com.cf.imes.framework.common.util.json.JsonUtils;
import com.cf.imes.framework.es.core.dal.ESDocument;
import com.cf.imes.module.executor.util.deviseData.dataTwo.HoleDetail;
import com.cf.imes.module.executor.util.deviseData.dataTwo.ModelDetail;
import com.cf.imes.module.executor.util.deviseData.dataTwo.PointDetail;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

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

/**
 * @author Beal
 * 生产单 小板的轮廓数据对象
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class OrderModelDO extends ESDocument {
    /*@Schema(description = "组织id")
    private Long organId;*/
    @Schema(description = "生产单id")
    private Long orderId;
    @Schema(description = "小板id")
    private Long plateId;

    @Schema(description = "纹路 纹路(0正纹1可翻转2反纹)")
    private Integer texture;
    @Schema(description = "排版面 排钻类型(0正面1反面2随意面)")
    private Integer typographicFace;
    @Schema(description = "开门类型 0非门板，1左开，2右开，3上翻，4下翻")
    private Integer openDoorType; // 字典转换
    @Schema(description = "小板类型")
    private String boardType;


    @Schema(description = "开料长")
    private BigDecimal splitLength;
    @Schema(description = "开料宽")
    private BigDecimal splitWidth;


    @Schema(description = "偏移量X")
    private BigDecimal offsetX;
    @Schema(description = "偏移量Y")
    private BigDecimal offsetY;

    @Schema(description = "是否有二维刀路")
    private Boolean has2DModel;
    @Schema(description = "是否有三维刀路")
    private Boolean has3DModel;

    @Schema(description = "点明细，表示小板外围轮廓的几个转折点（不含封边）")
    private List<PointDetail> pointDetail;
    @Schema(description = "原始点明细列表")
    private List<PointDetail> rawPointDetail;
    @Schema(description = "孔明细列表")
    private List<HoleDetail> holeDetail;
    @Schema(description = "造型明细")
    private List<ModelDetail> contourDetail;
    @Schema(description = "侧面孔明细列表")
    private List<HoleDetail> sideHoleDetail;

    @Schema(description = "生产封边备注")
    private Map<String,String> sideRemark;// 封边备注

    @Schema(description = "扩展备注(包含铰链备注、订单板件流水号)")
    private String extraRemark; // 扩展备注(包含铰链备注、订单板件流水号)（板材明细中）
    @Schema(description = "特殊备注(Json字符串)")
    private String specialRemarkDei; // 特殊备注(Json字符串)
    @Schema(description = "拉手备注(Json字符串)")
    private String extraHandleRemark; // 拉手备注
    @Schema(description = "排钻备注(Json字符串)")
    private String drillsRemark; // 排钻备注(Json字符串)
    @Schema(description = "板其他备注(Json字符串)")
    private String infoRemark; // 板其他备注(Json字符串)
    @Schema(description = "板件备注(Json字符串)")
    private String remarkJsonDei; // 板件备注(Json字符串)

    @Schema(description = "普通备注(板材数据中)")
    private String remarkJson; // 普通备注（板材数据中）
    @Schema(description = "特殊备注(板材数据中)")
    private String specialRemark; // 特殊备注（板材数据中）
}
