package com.ruoyi.business.vo;
|
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.ruoyi.common.annotation.Excel;
|
import lombok.Data;
|
|
import java.math.BigDecimal;
|
import java.time.LocalDate;
|
import java.util.HashMap;
|
import java.util.Map;
|
|
@Data
|
public class OfficialInventoryExportVo {
|
|
/**
|
* 供货商
|
*/
|
@Excel(name = "供货商")
|
private String supplierName;
|
|
/**
|
* 煤种
|
*/
|
@Excel(name = "煤种")
|
private String coal;
|
/**
|
* 单位
|
*/
|
@Excel(name = "单位")
|
private String unit;
|
/**
|
* 库存数量
|
*/
|
@Excel(name = "库存数量")
|
private BigDecimal inventoryQuantity;
|
/**
|
* 单价(含税)
|
*/
|
@Excel(name = "单价(含税)")
|
private BigDecimal priceIncludingTax;
|
/**
|
* 总价(含税)
|
*/
|
@Excel(name = "总价(含税)")
|
private BigDecimal totalPriceIncludingTax;
|
/**
|
* 不含税单价
|
*/
|
@Excel(name = "不含税单价")
|
private BigDecimal priceExcludingTax;
|
/**
|
* 不含税总价
|
*/
|
@Excel(name = "不含税总价")
|
private BigDecimal totalPriceExcludingTax;
|
/**
|
* 待补库
|
*/
|
@Excel(name = "待补库")
|
private BigDecimal pendingReplenishment;
|
/**
|
* 登记人
|
*/
|
@Excel(name = "登记人")
|
private String registrant;
|
|
/**
|
* 登记日期
|
*/
|
@Excel(name = "登记日期")
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
private LocalDate registrationDate;
|
|
/**
|
* 动态煤质属性(存储所有煤质子表头数据)
|
*/
|
// 动态字段容器(不参与导出)
|
private transient Map<String, String> coalQualityProperties;
|
|
// 动态字段访问方法
|
public String getDynamicProperty(String fieldName) {
|
return coalQualityProperties != null ?
|
coalQualityProperties.getOrDefault(fieldName, "-") : "-";
|
}
|
|
// 初始化方法(在convertToExportVo中调用)
|
public void initDynamicFields() {
|
// 确保map不为null
|
if (this.coalQualityProperties == null) {
|
this.coalQualityProperties = new HashMap<>();
|
}
|
}
|
|
}
|