2026-07-02 6e312c64c056acf479a6dd8393dd42a80b69b7d4
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
package cn.iocoder.yudao.module.crm.controller.admin.quotation.vo;
 
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
 
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
 
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
 
@Schema(description = "管理后台 - CRM 销售报价单创建/更新 Request VO")
@Data
public class CrmSaleQuotationSaveReqVO {
 
    @Schema(description = "报价单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430")
    private Long id;
 
    @Schema(description = "报价单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "报价单A")
    @NotNull(message = "报价单名称不能为空")
    private String name;
 
    @Schema(description = "客户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "18336")
    @NotNull(message = "客户编号不能为空")
    private Long customerId;
 
    @Schema(description = "商机编号", example = "10864")
    private Long businessId;
 
    @Schema(description = "联系人编号", example = "18546")
    private Long contactId;
 
    @Schema(description = "负责人的用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "17144")
    @NotNull(message = "负责人不能为空")
    private Long ownerUserId;
 
    @Schema(description = "报价日期")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime quotationTime;
 
    @Schema(description = "有效期至")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime validUntil;
 
    @Schema(description = "整单折扣", example = "10.00")
    private BigDecimal discountPercent;
 
    @Schema(description = "税率", example = "13.00")
    private BigDecimal taxRate;
 
    @Schema(description = "附件地址", example = "https://www.baidu.com")
    private String fileUrl;
 
    @Schema(description = "备注", example = "备注信息")
    private String remark;
 
    @Schema(description = "物料明细列表", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "物料明细不能为空")
    private List<Item> items;
 
    @Schema(description = "物料明细")
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class Item {
 
        @Schema(description = "编号", example = "888")
        private Long id;
 
        @Schema(description = "MDM 物料编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "20529")
        @NotNull(message = "物料编号不能为空")
        private Long itemId;
 
        @Schema(description = "报价单价", requiredMode = Schema.RequiredMode.REQUIRED, example = "123.00")
        @NotNull(message = "报价单价不能为空")
        private BigDecimal quotationPrice;
 
        @Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
        @NotNull(message = "数量不能为空")
        private BigDecimal count;
 
        @Schema(description = "税率", example = "13.00")
        private BigDecimal taxPercent;
 
        @Schema(description = "备注", example = "备注")
        private String remark;
 
    }
 
}