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 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; } }