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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
package cn.iocoder.yudao.module.crm.controller.admin.invoice.vo.invoice;
 
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
import cn.iocoder.yudao.module.crm.controller.admin.contract.vo.contract.CrmContractRespVO;
import cn.iocoder.yudao.module.crm.enums.DictTypeConstants;
import cn.iocoder.yudao.module.system.api.storage.dto.StorageBlobRespDTO;
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
 
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
 
@Schema(description = "管理后台 - CRM 开票 Response VO")
@Data
@ExcelIgnoreUnannotated
public class CrmInvoiceRespVO {
 
    @Schema(description = "编号", example = "25787")
    @ExcelProperty("编号")
    private Long id;
 
    @Schema(description = "开票编号", example = "31177")
    @ExcelProperty("开票编号")
    private String no;
 
    @Schema(description = "发票类型", example = "1")
    @ExcelProperty(value = "发票类型", converter = DictConvert.class)
    @DictFormat(DictTypeConstants.CRM_INVOICE_TYPE)
    private Integer invoiceType;
 
    @Schema(description = "发票号码", example = "02564178")
    @ExcelProperty("发票号码")
    private String invoiceNo;
 
    @Schema(description = "发票抬头", example = "XX科技有限公司")
    @ExcelProperty("发票抬头")
    private String invoiceTitle;
 
    @Schema(description = "开票金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "9000")
    @ExcelProperty("开票金额")
    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")
    @ExcelProperty("开票日期")
    private LocalDateTime invoiceTime;
 
    @Schema(description = "客户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private Long customerId;
    @Schema(description = "客户名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "test")
    @ExcelProperty("客户名字")
    private String customerName;
 
    @Schema(description = "合同编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @ExcelProperty("合同编号")
    private Long contractId;
    @Schema(description = "关联销售订单")
    private Long saleOrderId;
    @Schema(description = "关联出库单")
    private Long saleOutId;
    @Schema(description = "出库单号", example = "SL20261029001")
    private String saleOutCode;
    @Schema(description = "发票录入状态:0待录入 10已录入", example = "0")
    private Integer entryStatus;
    @Schema(description = "发票录入人")
    private Long entryUserId;
    @Schema(description = "发票录入时间")
    private LocalDateTime entryTime;
 
    @Schema(description = "收款节点")
    private List<PaymentNode> paymentNodes;
 
    @Schema(description = "收款节点")
    @Data
    public static class PaymentNode {
 
        @Schema(description = "回款计划编号")
        private Long id;
        @Schema(description = "阶段:1合同款 2预付款 3到货款 4验收款 5质保金")
        private Integer stage;
        @Schema(description = "计划回款金额")
        private BigDecimal amount;
        @Schema(description = "计划回款时间")
        private LocalDateTime returnTime;
        @Schema(description = "实际回款时间")
        private LocalDateTime actualTime;
        @Schema(description = "已回款金额")
        private BigDecimal receiptedPrice;
        @Schema(description = "状态:0未回款 10部分回款 20已回清")
        private Integer status;
        @Schema(description = "备注")
        private String remark;
 
    }
 
    @Schema(description = "合同信息")
    private CrmContractRespVO contract;
 
    @Schema(description = "负责人的用户编号", example = "25682")
    private Long ownerUserId;
    @Schema(description = "负责人名字", example = "25682")
    @ExcelProperty("负责人名字")
    private String ownerUserName;
    @Schema(description = "负责人部门")
    @ExcelProperty("负责人部门")
    private String ownerUserDeptName;
 
    @Schema(description = "工作流编号", example = "1043")
    @ExcelProperty("工作流编号")
    private String processInstanceId;
 
    @Schema(description = "审批状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
    @ExcelProperty(value = "审批状态", converter = DictConvert.class)
    @DictFormat(DictTypeConstants.CRM_AUDIT_STATUS)
    private Integer auditStatus;
 
    @Schema(description = "备注", example = "备注")
    @ExcelProperty("备注")
    private String remark;
 
    @Schema(description = "发票附件列表")
    private List<StorageBlobRespDTO> attachmentList;
 
    @Schema(description = "是否已上传发票附件", example = "true")
    private Boolean hasAttachment;
 
    @Schema(description = "剩余可回款金额,等于 开票金额 - 该开票已回款金额(草稿+审批中+审批通过)", example = "1000.00")
    private BigDecimal remainingInvoicePrice;
 
    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;
 
    @Schema(description = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("更新时间")
    private LocalDateTime updateTime;
 
    @Schema(description = "创建人", example = "25682")
    private String creator;
    @Schema(description = "创建人名字", example = "test")
    @ExcelProperty("创建人名字")
    private String creatorName;
 
}