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

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

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

@Schema(description = "管理后台 - 订单开料排单 Response VO")
@Data
@ExcelIgnoreUnannotated
@JsonInclude(JsonInclude.Include.NON_NULL)
public class PlanRespVO {

    @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12776")
    @ExcelProperty("ID")
    private Long id;

    @Schema(description = "排序优先级", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("排序优先级")
    private Long sort;

    @Schema(description = "排单类型：1 混单排单，2 订单排单", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @ExcelProperty("排单类型：1 混单排单，2 订单排单")
    private Integer type;

    @Schema(description = "排单状态：0 新单，1 板材已申请，2 开料中，3 已开料", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @ExcelProperty("排单状态：0 新单，1 板材已申请，2 开料中，3 已开料")
    private Integer status;

    @Schema(description = "是否置顶")
    private Boolean isTop;

    @Schema(description = "是否已投产")
    private Boolean isScheduled;

    @Schema(description = "板材过滤条件")
    private String filter;

    @Schema(description = "方案 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "16707")
    @ExcelProperty("方案 ID")
    private Long processId;

    @Schema(description = "方案 名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "16707")
    @ExcelProperty("方案 名称")
    private String processName;

    @Schema(description = "计划时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("计划时间")
    private LocalDateTime planTime;

    @Schema(description = "订单号", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("订单号")
    private String orderNos;

    @Schema(description = "排单对应的订单的信息", requiredMode = Schema.RequiredMode.REQUIRED)
    private List<PlanOrderRespVO> orderList;

    @Schema(description = "板材信息列表-拆单大板信息", requiredMode = Schema.RequiredMode.REQUIRED)
    private List<PlateInfoVO> plateInfoList;

    @Schema(description = "混单实际选择大板信息")
    private PlateInfoVO actualPlanGoodsInfo;

    @Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对")
    @ExcelProperty("备注")
    private String remark;

    @Schema(description = "创建人")
    @ExcelProperty("创建人")
    private String creator;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @Schema(description = "生产操作人", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("生产操作人")
    private String operator;

    @Schema(description = "生产时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("生产时间")
    private LocalDateTime produceTime;


    @Schema(description = "已排大板总数")
    private Long scheduledBoardNum;


    @Schema(description = "已开料的大板片数")
    private Long cuttedBoardNum;


    @Schema(description = "总小板片数")
    private Long plateNum;

    @Schema(description = "总小板面积")
    private BigDecimal plateArea;

    @Schema(description = "未优化小板片数")
    private Long unOptimizePlateCount;


    @Schema(description = "已优化小板片数")
    private Long optimizedPlateNum;

    @Schema(description = "已开小板片数")
    private Long cuttedPlateNum;
}