xiaoyi
2026-10-29 2af6d5d996786d9b6b859b748af2ab9b71ad23e1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
package cn.iocoder.yudao.module.mes.controller.admin.safety.vo.material;
 
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
 
import java.math.BigDecimal;
import java.time.LocalDate;
 
/**
 * 安全生产 - 物资台账新增/修改 Request VO
 *
 * @author 超级管理员
 */
@Schema(description = "管理后台 - 物资台账新增/修改 Request VO")
@Data
public class SafetyMaterialSaveReqVO {
 
    private Long id;
 
    @Schema(description = "物资编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "PM-001")
    @NotBlank(message = "物资编码不能为空")
    @Size(max = 64)
    private String code;
 
    @Schema(description = "物资名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "10kV 绝缘手套")
    @NotBlank(message = "物资名称不能为空")
    @Size(max = 100)
    private String name;
 
    @Schema(description = "类别", requiredMode = Schema.RequiredMode.REQUIRED, example = "INSULATING")
    @NotBlank(message = "物资类别不能为空")
    @Pattern(regexp = "INSULATING|HAZARD_CHEMICAL|FIRE|PPE|OTHER", message = "物资类别不合法")
    private String category;
 
    @Schema(description = "规格型号")
    @Size(max = 100)
    private String spec;
 
    @Schema(description = "计量单位", example = "双")
    @Size(max = 20)
    private String unit;
 
    @Schema(description = "当前库存数量")
    @DecimalMin(value = "0", message = "库存数量不能为负数")
    private BigDecimal stockQty;
 
    @Schema(description = "安全库存")
    @DecimalMin(value = "0", message = "安全库存不能为负数")
    private BigDecimal safeStock;
 
    @Schema(description = "存放位置")
    @Size(max = 100)
    private String storageLocation;
 
    @Schema(description = "有效期至")
    @DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
    private LocalDate expireDate;
 
    @Schema(description = "有效期月数")
    @Min(value = 0, message = "有效期月数不能为负数")
    private Integer validityMonths;
 
    @Schema(description = "保管人")
    @Size(max = 50)
    private String manager;
 
    @Schema(description = "状态:0-启用,1-停用", example = "0")
    @NotNull(message = "状态不能为空")
    private Integer status;
 
    @Schema(description = "备注")
    @Size(max = 500)
    private String remark;
 
}