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

import com.alibaba.fastjson.JSONObject;
import com.cf.imes.module.plan.dal.elasticsearch.BasePosition;
import com.cf.imes.module.plan.dal.elasticsearch.HoleDetail;
import com.cf.imes.module.plan.dal.elasticsearch.ModelDetail;
import com.cf.imes.module.plan.dal.elasticsearch.PartsInfo;
import com.cf.imes.module.plan.dal.elasticsearch.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;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class OrderPlateList {


    @Schema(description = "小板id")
    private Long plateId;
    @Schema(description = "是否已优化")
    private Boolean isOptimized;
    @Schema(description = "房间的基点坐标")
    private BasePosition roomBasePosition; // 板件基准点坐标
    @Schema(description = "柜体的基点坐标")
    private BasePosition bodyBasePosition; // 板件基准点坐标
    @Schema(description = "板件的基点坐标")
    private BasePosition plateBasePosition; // 板件基准点坐标

    @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 List<PartsInfo> partsInfos;

    @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<PointDetail> basePointDetail ; //坯料点明细
    @Schema(description = "holes数量集合 count=孔数量 countFaceA=正面垂直孔数量] countFaceB=反面垂直孔数量] countSide=水平侧孔数量] countSideL=左侧孔数量] countSideR=右侧孔数量 countSideU=上侧孔数量 countSideD=下侧孔数量 countBevelled=斜面孔数量 countLocking=偏心轮/锁定孔数量 countBuildIn=预埋件/插入孔数量 countHinge=铰链孔数量 countThrough=通孔(对穿孔)/挖穿孔数量]")
    private Map<String,Integer> holeCount;//孔类型数量集合
    @Schema(description = "孔明细列表")
    private List<HoleDetail> holeDetail;
    @Schema(description = "凹槽数量集合")
    private Map<String,Integer> contourCount;//凹槽数量集合
    @Schema(description = "造型明细（凹槽）")
    private List<ModelDetail> contourDetail;
    @Schema(description = "造型明细（孤岛，现在是xml数据格式添加）")
    private List<ModelDetail> sideDetail ; //造型明细（孤岛） sideDetail
    @Schema(description = "侧面孔明细列表")
    private List<HoleDetail> sideHoleDetail;

    @Schema(description = "生产封边备注")
    private Map<String,String> sideRemark;// 封边备注
    @Schema(description = "板材扩展备注")
    private JSONObject plateExtraRemark;// 封边备注

    @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; // 特殊备注（板材数据中）

}
