package com.zt.plat.module.qms.business.bus.controller.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import jakarta.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;

import com.alibaba.excel.annotation.ExcelProperty;

import java.time.LocalDateTime;

@Schema(description = "管理后台 - 检测任务分配业务新增/修改 Request VO")
@Data
public class BusinessAssayTaskSaveReqVO {

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

    @Schema(description = "指派编号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "指派编号不能为空")
    private String taskNo;

    @Schema(description = "指派单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
    @NotEmpty(message = "指派单名称不能为空")
    private String taskName;

    @Schema(description = "方法类别ID,字典表【T_DIC_BSN】方法类别：methodCategory，容量法、等离子发射光谱法、原子吸收分光光度等", example = "9102")
    private Long dictionaryBusinessId;

    @Schema(description = "方法类别KEY,字典表【T_DIC_BSN】方法类别：methodCategory，容量法、等离子发射光谱法、原子吸收分光光度等")
    private String dictionaryBusinessKey;

//    @Schema(description = "检测方法配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "13609")
//    private Long configAssayMethodId;

    @Schema(description = "任务单模板ID", example = "4389")
    private Long configReportTemplateId;

    @Schema(description = "任务单模板key")
    private String configReportTemplateKey;

    @Schema(description = "任务单来源,分配-task_assign、领取-task_claim", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotEmpty(message = "任务单来源,分配-task_assign、领取-task_claim不能为空")
    private String taskSourceType;

    @Schema(description = "任务单分配人", requiredMode = Schema.RequiredMode.REQUIRED)
    private String taskAssignOperator;

    @Schema(description = "任务单分配人ID", example = "14545")
    private Long taskAssignOperatorId;

    @Schema(description = "任务单分配时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "任务单分配时间不能为空")
    private LocalDateTime taskAssignTime;

    @Schema(description = "任务单分配状态,进行中-in_progress、已提交-submitted、作废-void", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotEmpty(message = "任务单分配状态,进行中-in_progress、已提交-submitted不能为空、作废-void")
    private String taskAssignStatus;

    @Schema(description = "任务单分配提交时间")
    @ExcelProperty("任务单分配提交时间")
    private LocalDateTime taskAssignSubmitTime;

    @Schema(description = "是否配料,1-是，0-否")
    private Integer isIngredients;
    
    @Schema(description = "配料方式,初始状态-initial、自动配料-automatic、人工配料-manual")
    private String ingredientsWay;

    @Schema(description = "配料状态,初始状态-initial、等待配料-in_progress、可提交-allow_submit", example = "2")
    private String ingredientsStatus;

    @Schema(description = "分析人")
    private String assayOperator;

    @Schema(description = "分析人", example = "17685")
    private Long assayOperatorId;

    @Schema(description = "分析时间")
    private LocalDateTime assayTime;

    @Schema(description = "分析提交时间")
    private LocalDateTime assaySubmitTime;

    @Schema(description = "任务单分析状态,未开始-not_start、已保存- saved、 已提交-submitted", example = "1")
    private String taskAssayStatus;

    @Schema(description = "上报时间")
    private LocalDateTime reportTime;

    @Schema(description = "上报人")
    private String reportOperator;

    @Schema(description = "上报人ID", example = "7393")
    private Long reportOperatorId;

    @Schema(description = "任务单完成时间")
    private LocalDateTime taskFinishTime;

    @Schema(description = "流程实例id", example = "19026")
    private Long flowInstanceId;

    @Schema(description = "顶部字段数据集ID,T_DAT_COLT_FLD", example = "9742")
    private Long formDataCollectionId;

    @Schema(description = "顶部字段值")
    private String formValue;

    @Schema(description = "签名信息")
    private String documentSignature;

    @Schema(description = "完成状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed", example = "2")
    private String finishStatus;

    @Schema(description = "流程状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed", example = "1")
    private String flowStatus;

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

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

}