package cn.iocoder.yudao.module.mes.controller.admin.plan.vo;

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

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Schema(description = "管理后台 - 生产计划新增/修改 Request VO")
@Data
public class PlanSaveReqVO {

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

    @Schema(description = "计划编码")
    private String code;

    @Schema(description = "产品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21176")
    private Long productId;

    @Schema(description = "任务单明细ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18938")
    private Long taskDetailId;

    @Schema(description = "任务单ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18331")
    @NotNull(message = "任务单ID不能为空")
    private Long taskId;

    @Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "计划数量不能为空")
    private Long planNumber;
    @Schema(description = "计划热压数量")
    @ExcelProperty("计划热压数量")
    private Long reyaNumber;

    @Schema(description = "成品数量")
    private Long finishNumber;

    @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Integer status;

    @Schema(description = "计划开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "计划开始时间不能为空")
    private LocalDateTime planStartTime;

    @Schema(description = "计划结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "计划结束时间不能为空")
    private LocalDateTime planEndTime;

    @Schema(description = "实际开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
    private LocalDateTime startTime;

    @Schema(description = "实际结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
    private LocalDateTime endTime;

    @Schema(description = "生产主管ID", example = "10640")
    private Long productionManagerId;

    @Schema(description = "备注", example = "你说的对")
    private String remark;

    @Schema(description = "是否启用")
    private Boolean isEnable;
    @Schema(description = "生产线")
    private Long feedingPipeline;

    /**
     * 优先级，同种产品的优先级，数字越大，排序越靠前，越早分配完成数量
     */
    @Schema(description = "优先级")
    private Long priorityNum;

    @Schema(description = "组别", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Integer groupType;

    @Schema(description = "是否试生产")
    private BigDecimal isPreProduction;

    @Schema(description = "领料人ID", example = "10640")
    private Long workerId;

    @Schema(description = "是否完成质检")
    private BigDecimal isZj;

    @Schema(description = "完工数量")
    private Long wangongNumber;

    @Schema(description = "合格数量")
    private Long passNumber;

    @Schema(description = "不合格数量")
    private Long noPassNumber;

    @Schema(description = "合格率")
    private BigDecimal passRate;
}