✨ 应收账单列表增加筛选导出
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
package com.bms.ar.domain.vo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.bms.ar.domain.ArBill;
|
||||
import com.bms.ar.enums.ArBillStatus;
|
||||
import com.bms.common.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
/** 应收账单列表 Excel 导出行。 */
|
||||
@Data
|
||||
public class ArBillListExportRow implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Excel(name = "账单号", sort = 0, width = 22)
|
||||
private String billNo;
|
||||
|
||||
@Excel(name = "账单名称", sort = 1, width = 24)
|
||||
private String billName;
|
||||
|
||||
@Excel(name = "客户名称", sort = 2, width = 24)
|
||||
private String customerName;
|
||||
|
||||
@Excel(name = "客户编码", sort = 3, width = 16)
|
||||
private String customerCode;
|
||||
|
||||
@Excel(name = "账单截止日", sort = 4, dateFormat = "yyyy-MM-dd", width = 16)
|
||||
private Date billPeriodEnd;
|
||||
|
||||
@Excel(name = "订单数", sort = 5, width = 12)
|
||||
private Integer orderCount;
|
||||
|
||||
@Excel(name = "应收总额", sort = 6, scale = 2, width = 16)
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
@Excel(name = "已核销", sort = 7, scale = 2, width = 16)
|
||||
private BigDecimal writtenOffAmount;
|
||||
|
||||
@Excel(name = "未核销", sort = 8, scale = 2, width = 16)
|
||||
private BigDecimal unwrittenAmount;
|
||||
|
||||
@Excel(name = "状态", sort = 9, width = 14)
|
||||
private String status;
|
||||
|
||||
@Excel(name = "账单日期", sort = 10, dateFormat = "yyyy-MM-dd", width = 16)
|
||||
private Date billDate;
|
||||
|
||||
public static ArBillListExportRow from(ArBill bill) {
|
||||
ArBillListExportRow row = new ArBillListExportRow();
|
||||
row.setBillNo(bill.getBillNo());
|
||||
row.setBillName(bill.getBillName());
|
||||
row.setCustomerName(bill.getCustomerName());
|
||||
row.setCustomerCode(bill.getCustomerCode());
|
||||
row.setBillPeriodEnd(bill.getBillPeriodEnd());
|
||||
row.setOrderCount(bill.getOrderCount());
|
||||
row.setTotalAmount(bill.getTotalAmount());
|
||||
row.setWrittenOffAmount(bill.getWrittenOffAmount());
|
||||
row.setUnwrittenAmount(bill.getUnwrittenAmount());
|
||||
ArBillStatus billStatus = ArBillStatus.of(bill.getStatus());
|
||||
row.setStatus(billStatus == null ? bill.getStatus() : billStatus.getLabel());
|
||||
row.setBillDate(bill.getBillDate());
|
||||
return row;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user