package com.zt.plat.module.qms.thirdpartyapi.controller.vo;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

@Data
public class XRFDeviceSampleReqVO implements Serializable {

	private static final long serialVersionUID = 3173676626377747618L;

	/**
     * 设备编号
     */
    @Schema(description = "设备编号")
    private String deviceNo;
    
    /**
     * 分析线
     */
    @Schema(description = "分析线")
    private String lineName;
    
    /**
     * 样品id
     */
    @Schema(description = "样品id")
    private String sampleId;
    
    /**
     * 样品编号
     */
    @Schema(description = "样品编号")
    private String sampleCode;
    
    /**
     * 样品时间
     */
    @JsonSerialize(using = LocalDateTimeSerializer.class) // 序列化（响应）
    @JsonDeserialize(using = LocalDateTimeDeserializer.class) // 反序列化（请求）
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "样品时间")
    private LocalDateTime sampleTime;

    /**
     * 样品开始时间
     */
    @JsonSerialize(using = LocalDateTimeSerializer.class) // 序列化（响应）
    @JsonDeserialize(using = LocalDateTimeDeserializer.class) // 反序列化（请求）
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "样品开始时间")
    private LocalDateTime sampleStartTime;

    /**
     * 样品结束时间
     */
    @JsonSerialize(using = LocalDateTimeSerializer.class) // 序列化（响应）
    @JsonDeserialize(using = LocalDateTimeDeserializer.class) // 反序列化（请求）
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "样品结束时间")
    private LocalDateTime sampleEndTime;
    
    /**
     * 分析人
     */
    @Schema(description = "分析人")
    private String assayOper;
    
    /**
     * 分析项目
     */
    @Schema(description = "分析项目")
    private List<XRFDeviceSampleProjectReqVO> sampleProjects;
    
    /**
     * 是否为检查上传
     */
    @Schema(description = "是否为检查上传")
    private Boolean isCheck;
}
