2026-07-01 6b5f7c66fc40d7f6099d561e31a34fbd50dd20d3
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.erp.controller.admin.purchase.vo.request;
 
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
 
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
 
@Schema(description = "管理后台 - ERP 采购申请新增/修改 Request VO")
@Data
public class ErpPurchaseRequestSaveReqVO {
 
    @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "17386")
    private Long id;
 
    @Schema(description = "申请时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "申请时间不能为空")
    private LocalDateTime requestTime;
 
    @Schema(description = "申请理由", example = "生产需要")
    private String requestReason;
 
    @Schema(description = "供应商编号(可选)", example = "1724")
    private Long supplierId;
 
    @Schema(description = "优惠率,百分比", example = "99.88")
    private BigDecimal discountPercent;
 
    @Schema(description = "附件地址", example = "https://www.iocoder.cn")
    private String fileUrl;
 
    @Schema(description = "备注", example = "你猜")
    private String remark;
 
    @Schema(description = "申请明细列表")
    @NotEmpty(message = "申请明细列表不能为空")
    @Valid
    private List<Item> items;
 
    @Data
    public static class Item {
 
        @Schema(description = "申请项编号", example = "11756")
        private Long id;
 
        @Schema(description = "产品编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "3113")
        @NotNull(message = "产品编号不能为空")
        private Long productId;
 
        @Schema(description = "产品单位编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "3113")
        @NotNull(message = "产品单位编号不能为空")
        private Long productUnitId;
 
        @Schema(description = "产品单价(参考价)", example = "100.00")
        private BigDecimal productPrice;
 
        @Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "100.00")
        @NotNull(message = "数量不能为空")
        private BigDecimal count;
 
        @Schema(description = "税率,百分比", example = "13.00")
        private BigDecimal taxPercent;
 
        @Schema(description = "需求日期", example = "2024-01-01")
        private LocalDate demandTime;
 
        @Schema(description = "备注", example = "随便")
        private String remark;
 
    }
 
}