package com.yuanchu.limslaboratory.pojo.vo; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; import java.io.Serializable; import java.util.Date; //新增检验单 @Data public class InspectionVo implements Serializable { //如果是原材料则id是选择原材料报检库中的id;如果是委托则id是选择委托报检库中委托样品的id @JsonSerialize private Integer id; /** * 检验类型 0:原材料;1:产品;2:半成品; **/ @JsonSerialize @NotNull(message = "检验类型不能为空") private Integer type; /** * 来料日期 **/ @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @NotNull(message = "来料日期不能为空") private Date formTime; /** * 供应商 **/ @JsonSerialize @NotBlank(message = "供应商不能为空") private String supplier; /** * 物料编码 **/ @JsonSerialize @NotBlank(message = "样品编码不能为空") private String mcode; /** * 物料名称 **/ @JsonSerialize @NotBlank(message = "样品名称不能为空") private String name; /** * 规格名称-型号名称 **/ @JsonSerialize @NotBlank(message = "规格型号不能为空") private String specifications; /** * 单位 **/ @JsonSerialize private String unit; /** * 报检数量-物料数量 **/ @JsonSerialize @NotNull(message = "报检数量不能为空") private Integer num; /** * 检验开始日期 **/ @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @NotNull(message = "检验开始时间不能为空") private Date startTime; /** * 检验结束日期 **/ @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @NotNull(message = "检验结束时间不能为空") private Date endTime; //试验项目(委托专属) @JsonSerialize private String experiment; //版本(委托专属) @JsonSerialize @NotNull(message = "检验项目版本不能为空") private Integer version; /** * 型号id */ private String specificationId; /** * 备注 */ private String notes; }