package com.ruoyi.account.api.dto; import com.ruoyi.common.core.annotation.Excel; import io.swagger.annotations.ApiModel; import lombok.Data; import java.io.Serializable; import java.math.BigDecimal; /** * 充电卡 Excel 传输对象。 *

导入模板与导入解析只使用「导出导入」列(卡号/卡余额/启用状态); * 导出额外使用 type=EXPORT 的派生列(所属公司、所属车队、账户模式、可用余额、超额、账户状态), * 派生的公司/车队/余额字段仅供导出内部回填,不参与Excel读写。

*/ @Data @ApiModel(value = "充电卡导入导出数据") public class ChargingCardExcelDTO implements Serializable { private static final long serialVersionUID = 1L; @Excel(name = "卡号", sort = 1, width = 22, prompt = "必填,最多64个字符") private String cardNo; @Excel(name = "卡余额", sort = 2, width = 16, scale = 2, prompt = "选填,必须大于等于0") private BigDecimal balance; /** 所属公司(仅导出,按公司ID远程回填公司名称) */ @Excel(name = "所属公司", sort = 3, width = 24, type = Excel.Type.EXPORT) private String companyName; /** 所属车队(仅导出,按车队ID远程回填) */ @Excel(name = "所属车队", sort = 4, width = 16, type = Excel.Type.EXPORT) private String fleetName; /** 账户模式(仅导出,1=共享模式,2=分配模式) */ @Excel(name = "账户模式", sort = 5, width = 12, type = Excel.Type.EXPORT, readConverterExp = "1=共享模式,2=分配模式") private Integer accountMode; /** 可用余额(仅导出,共享模式=公司可用余额,分配模式=卡片自身余额) */ @Excel(name = "可用余额", sort = 6, width = 14, type = Excel.Type.EXPORT, scale = 2) private BigDecimal availableBalance; /** 超额(仅导出,可用余额为负时取其绝对值) */ @Excel(name = "超额", sort = 7, width = 14, type = Excel.Type.EXPORT, scale = 2) private BigDecimal overrun; /** 账户状态(仅导出,1=正常,2=欠款) */ @Excel(name = "账户状态", sort = 8, width = 12, type = Excel.Type.EXPORT, readConverterExp = "1=正常,2=欠款") private Integer accountStatus; @Excel(name = "启用状态", sort = 9, width = 14, readConverterExp = "1=启用,2=禁用", combo = {"启用", "禁用"}) private String status; /** 所属公司ID(仅导出内部使用,不落Excel) */ private Integer companyId; /** 所属车队ID(仅导出内部使用,不落Excel) */ private Integer fleetId; }