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

import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

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

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - 生产计划分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class PlanPageReqVO extends PageParam {

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

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

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

    @Schema(description = "任务单ID", example = "18331")
    private Long taskId;

    @Schema(description = "数量")
    private Long planNumber;
    @Schema(description = "计划热压数量")
    private Long reyaNumber;

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

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

    @Schema(description = "计划开始时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] planStartTime;

    @Schema(description = "计划结束时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] planEndTime;

    @Schema(description = "实际开始时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] startTime;

    @Schema(description = "实际结束时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] endTime;

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

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

    @Schema(description = "是否启用")
    private Boolean isEnable;

    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] createTime;

    @Schema(description = "生产线")
    private Long feedingPipeline;
    @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;
}