gaoluyang
3 天以前 d39e4f7d839167c16425086dfa2f8747bccfdff9
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
96
97
package cn.iocoder.yudao.module.crm.controller.admin.invoice.vo.invoice;
 
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
 
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
 
@Schema(description = "管理后台 - CRM 开票新增/修改 Request VO")
@Data
public class CrmInvoiceSaveReqVO {
 
    @Schema(description = "编号", example = "25787")
    private Long id;
 
    @Schema(description = "开票编号", example = "31177")
    private String no;
 
    @Schema(description = "客户编号", example = "2")
    private Long customerId; // 该字段不通过前端传递,而是 contractId 查询出来设置进去
 
    @Schema(description = "合同编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
    @NotNull(message = "合同编号不能为空")
    private Long contractId;
 
    @Schema(description = "关联销售订单")
    private Long saleOrderId;
 
    @Schema(description = "关联出库单")
    private Long saleOutId;
 
    @Schema(description = "出库单号(后端按 saleOutId 回填,前端无需传递)", hidden = true)
    private String saleOutCode;
 
    @Schema(description = "负责人编号", example = "25682")
    private Long ownerUserId;
 
    @Schema(description = "发票类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "发票类型不能为空")
    private Integer invoiceType;
 
    @Schema(description = "发票号码", example = "02564178")
    private String invoiceNo;
 
    @Schema(description = "发票抬头", example = "XX科技有限公司")
    private String invoiceTitle;
 
    @Schema(description = "开票金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "9000")
    @NotNull(message = "开票金额不能为空")
    private BigDecimal price;
 
    @Schema(description = "合同金额")
    private BigDecimal contractAmount;
 
    @Schema(description = "预付款金额")
    private BigDecimal prepaymentAmount;
 
    @Schema(description = "到货款金额")
    private BigDecimal deliveryAmount;
 
    @Schema(description = "验收款金额")
    private BigDecimal acceptanceAmount;
 
    @Schema(description = "开票日期", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024-02-02")
    @NotNull(message = "开票日期不能为空")
    private LocalDateTime invoiceTime;
 
    @Schema(description = "备注", example = "备注")
    private String remark;
 
    @Schema(description = "发票附件 BlobId 列表")
    private List<Long> blobIds;
 
    @Schema(description = "收款节点(合同款/预付款/到货款/验收款/质保金)")
    private List<PaymentNode> paymentNodes;
 
    @Schema(description = "收款节点")
    @Data
    public static class PaymentNode {
 
        @Schema(description = "阶段:1合同款 2预付款 3到货款 4验收款 5质保金", requiredMode = Schema.RequiredMode.REQUIRED)
        private Integer stage;
 
        @Schema(description = "金额", requiredMode = Schema.RequiredMode.REQUIRED)
        private BigDecimal amount;
 
        @Schema(description = "计划回款时间", requiredMode = Schema.RequiredMode.REQUIRED)
        private LocalDateTime returnTime;
 
        @Schema(description = "备注")
        private String remark;
 
    }
 
}