package com.cf.imes.module.executor.controller.admin.plan.saveOptimize;


import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

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


@Data
public class RemainBoardInfo {


    @Schema(description = "余料板ID")
    private Long remainId;

    @Schema(description = "商品 ID-大板的实际ID")
    private String goodsId;

    @Schema(description = "商品名称")
    private String goodsName;

    @Schema(description = "余料板材质")
    private String material;

    @Schema(description = "余料板颜色")
    private String color;


    @Schema(description = "余料板颜色")
    private String colorBlack;


    @Schema(description = "纹路 纹路(0正纹1可翻转2反纹)")
    private Boolean texture;


    @Schema(description = "余料板宽")
    private Double width;



    @Schema(description = "余料板长")
    private Double length;



    @Schema(description = "余料板厚度")
    private Double thickness;



    @Schema(description = "价格")
    private BigDecimal price;


    @Schema(description = "品牌")
    private String brand;


    @Schema(description = "规格")
    private String spec;


    @Schema(description = "备注")
    private String remark;


    private Integer cutedType;

    private String height;


    private Boolean isRealCuttingBoard;


    @Schema(description = "余料板数量")
    private Integer count;


    private String cutKnifeName;


    private String placeBoardJSON;


    private Integer usedCount;


    private BigDecimal avgUsageRateAll;


    private BigDecimal avgUsageRateExcludeLastBoard;


    private BigDecimal usageRateLastBoard;


    private List<PlaceBoardList> placeBoardList;


    @Data
    public static class PlaceBoardList {

        private Integer boardId;

        private Double width;

        private Double length;

        private Boolean isRemainBoard;

        private String remainNo;

        private Integer remainId;

        private Boolean isScrap;

        private List<Object> points;

        private List<Blocks> blocks;

        private List<Object> objects;

        private BigDecimal area;

        private Boolean isTwoFaceProcess;

        private Integer cutedType;

    }


    @Data
    public static class Blocks {

        private String blockId;

        private String blockNo;

        private Integer boardId;

        private Integer placeId;

        private BigDecimal placeX;

        private BigDecimal placeY;

        private BigDecimal width;

        private BigDecimal length;

        private Integer placeStyle;

        private BigDecimal area;

    }


    @Data
    public static class PlaceObject {

        private Long orderId;

        private Long oldBlockId;

        private Long blockNo;

        private BigDecimal cuttingWidth;

        private BigDecimal cuttingLength;

        private BigDecimal cuttingArea;

        private Integer texture;

        private Boolean isTurnFaceToPlace;

        private Boolean isDoubleFaceProcess;

        private Boolean isPlaced;

        private PlaceObjectDetail blockDetail;

    }


    @Data
    public static class PlaceObjectDetail {

        private Long orderId;

        private Long blockId;

        private Integer psFrontNormalTexture;

        private Integer psFrontReverseTexture;

        private Integer psBackNormalTexture;

        private Integer psBackReverseTexture;

        private Boolean hasBlockInnerSpace;

        private List<PlaceSpace> spaces;

    }


    @Data
    public static class PlaceSpace {

        private Long boardId;

        private Long spaceId;

        private BigDecimal x;

        private BigDecimal y;

        private BigDecimal width;

        private BigDecimal length;

        private Boolean isBlockInnerSpace;

        private Object spaces;

    }

}
