gaoluyang
昨天 90b3ad820eea45d021835197eac5bc3ad55b12ed
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
package cn.iocoder.yudao.module.finance.controller.admin.ledger.vo;
 
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
import cn.iocoder.yudao.module.finance.enums.DictTypeConstants;
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.LocalDate;
 
@Schema(description = "管理后台 - 总账/明细账行 Response VO")
@Data
@ExcelIgnoreUnannotated
public class FinLedgerRespVO {
 
    @Schema(description = "行类型:opening 期初余额、entry 明细、monthly_total 本月合计、yearly_total 本年累计",
            requiredMode = Schema.RequiredMode.REQUIRED, example = "entry")
    private String rowType;
 
    /**
     * 行类型的中文名,专供 Excel 导出。
     * rowType 存的是枚举码(opening/entry/monthly_total/yearly_total),EasyExcel 会原样写进单元格,
     * 所以导出的「行类型」列必须由另一个字段承载中文;rowType 本身仍保留在 JSON 里,前端靠它做标签映射。
     */
    @Schema(description = "行类型名称", example = "明细")
    @ExcelProperty("行类型")
    private String rowTypeName;
 
    @Schema(description = "所属期间,格式 yyyy-MM", example = "2026-10")
    @ExcelProperty("期间")
    private String period;
 
    @Schema(description = "日期", example = "2026-10-12")
    @ExcelProperty("日期")
    private LocalDate date;
 
    @Schema(description = "凭证字号", example = "记2026100001")
    @ExcelProperty("凭证字号")
    private String voucherNo;
 
    @Schema(description = "科目编码", example = "1001")
    @ExcelProperty("科目编码")
    private String subjectCode;
 
    @Schema(description = "科目名称", example = "库存现金")
    @ExcelProperty("科目名称")
    private String subjectName;
 
    @Schema(description = "摘要", example = "收到货款")
    @ExcelProperty("摘要")
    private String summary;
 
    @Schema(description = "借方金额", example = "1000.00")
    @ExcelProperty("借方金额")
    private BigDecimal debit;
 
    @Schema(description = "贷方金额", example = "0.00")
    @ExcelProperty("贷方金额")
    private BigDecimal credit;
 
    @Schema(description = "余额方向", example = "1")
    @ExcelProperty(value = "余额方向", converter = DictConvert.class)
    @DictFormat(DictTypeConstants.BALANCE_DIRECTION)
    private Integer direction;
 
    @Schema(description = "余额,借方为正、贷方为负", example = "1000.00")
    @ExcelProperty("余额")
    private BigDecimal balance;
 
}