package com.zt.plat.module.qms.resource.material.controller.vo;

import com.zt.plat.framework.common.pojo.PageParam;
import com.zt.plat.module.qms.resource.material.enums.MaterialBatchBusinessType;
import com.zt.plat.module.qms.resource.material.enums.MaterialBatchGongBusinessType;
import com.zt.plat.module.qms.resource.material.enums.MaterialBatchGongType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.time.LocalDateTime;

import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - 物料批次分页 Request VO")
@Data
public class MaterialBatchPageReqVO extends PageParam {

    @Schema(description = "分类其他配置")
    private String categoryCustomConfig;

    @Schema(description = "物料大类id", example = "9381")
    private Long productId;

    @Schema(description = "业务场景 batch_manage-批次管理，acceptance-验收，inbound-入库，return_exchange-退换货")
    private MaterialBatchGongBusinessType businessType;

    @Schema(description = "是否需要组装 children")
    private Boolean children = false;

    @Schema(description = "数据类型 batch-批次，gong-工段，空-全部")
    private String dataType;

    @Schema(description = "true-已处理，false-未处理")
    private Boolean treatment = false;

    @Schema(description = "批次编号")
    private String batchNo;

    @Schema(description = "存放位置描述")
    private String location;

    @Schema(description = "供应商id", example = "3737")
    private Long supplierId;

    @Schema(description = "生产日期")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDate[] manufacturerDate;

    @Schema(description = "到期日期")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDate[] dueDate;

    @Schema(description = "分配部门id")
    private Long assignDepartmentId;

    @Schema(description = "分配部门名称")
    private String assignDepartmentName;

    @Schema(description = "提交状态,0-未提交，1-已提交", example = "1")
    private Integer submitStatus;

    @Schema(description = "验收状态 accepted-已验收，not_accepted-未验收")
    private String acceptanceStatus;

    @Schema(description = "是否检化验,1-是，0-否")
    private Integer assayFlag;

    @Schema(description = "检化验状态,未开始，进行中，通过，未通过", example = "2")
    private String assayStatus;

//    @Schema(description = "检化验结果")
//    private String assayResult;

    @Schema(description = "所属部门")
    private String systemDepartmentCode;

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

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

}