超市报表

This commit is contained in:
zjf committed 2025-10-17 00:14:49 +08:00
1 parent b134b8d539
commit acf14450e9
11 files changed
+656

No files matched your search

@@ -0,0 +1,66 @@
package com.bsd.pjcloud.supermarket.dto.report;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;
import java.math.BigDecimal;
/**
* 进销存报表导出DTO
*
* @author pjcloud
* @date 2024-10-15
*/
@Data
@ContentRowHeight(20)
@HeadRowHeight(25)
@ColumnWidth(15)
public class InventoryInOutReportExcelDTO {
@ExcelProperty(value = "商品编码", index = 0)
@ColumnWidth(20)
private String productCode;
@ExcelProperty(value = "商品名称", index = 1)
@ColumnWidth(30)
private String productName;
@ExcelProperty(value = "分类", index = 2)
@ColumnWidth(15)
private String categoryName;
@ExcelProperty(value = "单位", index = 3)
@ColumnWidth(10)
private String unit;
@ExcelProperty(value = "期初数量", index = 4)
@ColumnWidth(15)
private Double openingQty;
@ExcelProperty(value = "入库数量", index = 5)
@ColumnWidth(15)
private Double inQty;
@ExcelProperty(value = "出库数量", index = 6)
@ColumnWidth(15)
private Double outQty;
@ExcelProperty(value = "期末数量", index = 7)
@ColumnWidth(15)
private Double closingQty;
@ExcelProperty(value = "入库金额(元)", index = 8)
@ColumnWidth(15)
private BigDecimal inAmount;
@ExcelProperty(value = "出库金额(元)", index = 9)
@ColumnWidth(15)
private BigDecimal outAmount;
}
@@ -0,0 +1,42 @@
package com.bsd.pjcloud.supermarket.dto.report;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDate;
import java.time.LocalDateTime;
@Data
@Schema(description = "进销存报表查询参数")
public class InventoryInOutReportQueryDTO {
@Schema(description = "开始日期(按天统计时使用)")
private LocalDate startDate;
@Schema(description = "结束日期(按天统计时使用)")
private LocalDate endDate;
@Schema(description = "开始时间(精确到时分秒,优先级高于日期)")
private LocalDateTime startTime;
@Schema(description = "结束时间(精确到时分秒,优先级高于日期)")
private LocalDateTime endTime;
@Schema(description = "商品名称模糊查询")
private String productName;
@Schema(description = "商品编码模糊查询")
private String productCode;
@Schema(description = "分类ID")
private Long categoryId;
@Schema(description = "是否仅显示有发生额的商品")
private Boolean onlyChanged;
@Schema(description = "返回Top N(可选)")
private Integer topLimit;
}
@@ -0,0 +1,128 @@
package com.bsd.pjcloud.supermarket.dto.report;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDate;
/**
* 进销存报表Excel导出DTO
*
* @author pjcloud
* @date 2025-10-16
*/
@Data
@ContentRowHeight(20)
@HeadRowHeight(25)
@ColumnWidth(15)
public class InventoryReportExcelDTO {
@ExcelProperty(value = "商品编码", index = 0)
@ColumnWidth(20)
private String productCode;
@ExcelProperty(value = "商品名称", index = 1)
@ColumnWidth(30)
private String productName;
@ExcelProperty(value = "分类", index = 2)
@ColumnWidth(15)
private String categoryName;
@ExcelProperty(value = "规格", index = 3)
@ColumnWidth(20)
private String spec;
@ExcelProperty(value = "单位", index = 4)
@ColumnWidth(10)
private String unit;
@ExcelProperty(value = "装数", index = 5)
@ColumnWidth(10)
private Integer packageNum;
@ExcelProperty(value = "参考进价(元)", index = 6)
@ColumnWidth(15)
private BigDecimal purchasePrice;
@ExcelProperty(value = "零售价(元)", index = 7)
@ColumnWidth(15)
private BigDecimal retailPrice;
@ExcelProperty(value = "期初库存", index = 8)
@ColumnWidth(15)
private Double openingQty;
@ExcelProperty(value = "期初金额(元)", index = 9)
@ColumnWidth(15)
private BigDecimal openingAmount;
@ExcelProperty(value = "采购入库数量", index = 10)
@ColumnWidth(15)
private Double purchaseInQty;
@ExcelProperty(value = "采购入库金额(元)", index = 11)
@ColumnWidth(18)
private BigDecimal purchaseInAmount;
@ExcelProperty(value = "采购退货数量", index = 12)
@ColumnWidth(15)
private Double purchaseReturnQty;
@ExcelProperty(value = "采购退货金额(元)", index = 13)
@ColumnWidth(18)
private BigDecimal purchaseReturnAmount;
@ExcelProperty(value = "销售数量", index = 14)
@ColumnWidth(15)
private Double salesQty;
@ExcelProperty(value = "销售金额(元)", index = 15)
@ColumnWidth(15)
private BigDecimal salesAmount;
@ExcelProperty(value = "销售退货数量", index = 16)
@ColumnWidth(15)
private Double salesReturnQty;
@ExcelProperty(value = "销售退货金额(元)", index = 17)
@ColumnWidth(18)
private BigDecimal salesReturnAmount;
@ExcelProperty(value = "实际销售数量", index = 18)
@ColumnWidth(15)
private Double actualSalesQty;
@ExcelProperty(value = "实际销售金额(元)", index = 19)
@ColumnWidth(18)
private BigDecimal actualSalesAmount;
@ExcelProperty(value = "销售成本(元)", index = 20)
@ColumnWidth(15)
private BigDecimal salesCost;
@ExcelProperty(value = "期末数量", index = 21)
@ColumnWidth(15)
private Double closingQty;
@ExcelProperty(value = "期末库存金额(元)", index = 22)
@ColumnWidth(18)
private BigDecimal closingAmount;
@ExcelProperty(value = "期末库存售额(元)", index = 23)
@ColumnWidth(18)
private BigDecimal closingRetailAmount;
@ExcelProperty(value = "销售毛利(元)", index = 24)
@ColumnWidth(15)
private BigDecimal grossProfit;
@ExcelProperty(value = "首次进货日", index = 25)
@ColumnWidth(15)
private LocalDate firstPurchaseDate;
}
@@ -0,0 +1,39 @@
package com.bsd.pjcloud.supermarket.dto.report;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDate;
/**
* 进销存报表查询条件DTO
*
* @author pjcloud
* @date 2025-10-16
*/
@Data
@Schema(description = "进销存报表查询条件")
public class InventoryReportQueryDTO {
@Schema(description = "商品名称(模糊查询)")
private String productName;
@Schema(description = "商品编码(模糊查询)")
private String productCode;
@Schema(description = "分类ID")
private Long categoryId;
@Schema(description = "供应商ID")
private Long supplierId;
@Schema(description = "开始日期")
private LocalDate startDate;
@Schema(description = "结束日期")
private LocalDate endDate;
@Schema(description = "只显示有变动的商品")
private Boolean onlyChanged;
}
@@ -0,0 +1,42 @@
package com.bsd.pjcloud.supermarket.dto.report;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDate;
import java.time.LocalDateTime;
@Data
@Schema(description = "盘存报表查询参数")
public class InventoryStocktakeReportQueryDTO {
@Schema(description = "开始日期(按天统计时使用)")
private LocalDate startDate;
@Schema(description = "结束日期(按天统计时使用)")
private LocalDate endDate;
@Schema(description = "开始时间(精确到时分秒,优先级高于日期)")
private LocalDateTime startTime;
@Schema(description = "结束时间(精确到时分秒,优先级高于日期)")
private LocalDateTime endTime;
@Schema(description = "商品名称模糊查询")
private String productName;
@Schema(description = "商品编码模糊查询")
private String productCode;
@Schema(description = "分类ID")
private Long categoryId;
@Schema(description = "仓库ID,可选")
private String warehouseId;
@Schema(description = "仅显示存在差异的商品")
private Boolean onlyDiff;
}
@@ -0,0 +1,75 @@
package com.bsd.pjcloud.supermarket.dto.report;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;
import java.math.BigDecimal;
/**
* 毛利报表Excel导出DTO
*
* @author pjcloud
* @date 2025-10-16
*/
@Data
@ContentRowHeight(20)
@HeadRowHeight(25)
@ColumnWidth(15)
public class ProfitReportExcelDTO {
@ExcelProperty(value = "商品编码", index = 0)
@ColumnWidth(20)
private String productCode;
@ExcelProperty(value = "商品名称", index = 1)
@ColumnWidth(30)
private String productName;
@ExcelProperty(value = "分类", index = 2)
@ColumnWidth(15)
private String categoryName;
@ExcelProperty(value = "规格", index = 3)
@ColumnWidth(20)
private String spec;
@ExcelProperty(value = "单位", index = 4)
@ColumnWidth(10)
private String unit;
@ExcelProperty(value = "销售数量", index = 5)
@ColumnWidth(15)
private Double salesQty;
@ExcelProperty(value = "销售金额(元)", index = 6)
@ColumnWidth(15)
private BigDecimal salesAmount;
@ExcelProperty(value = "销售单价(元)", index = 7)
@ColumnWidth(15)
private BigDecimal salesPrice;
@ExcelProperty(value = "成本单价(元)", index = 8)
@ColumnWidth(15)
private BigDecimal costPrice;
@ExcelProperty(value = "销售成本(元)", index = 9)
@ColumnWidth(15)
private BigDecimal salesCost;
@ExcelProperty(value = "销售毛利(元)", index = 10)
@ColumnWidth(15)
private BigDecimal grossProfit;
@ExcelProperty(value = "毛利率(%)", index = 11)
@ColumnWidth(12)
private BigDecimal profitMargin;
@ExcelProperty(value = "销售笔数", index = 12)
@ColumnWidth(12)
private Integer salesCount;
}
@@ -0,0 +1,42 @@
package com.bsd.pjcloud.supermarket.dto.report;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDate;
/**
* 毛利报表查询条件DTO
*
* @author pjcloud
* @date 2025-10-16
*/
@Data
@Schema(description = "毛利报表查询条件")
public class ProfitReportQueryDTO {
@Schema(description = "商品名称(模糊查询)")
private String productName;
@Schema(description = "商品编码(模糊查询)")
private String productCode;
@Schema(description = "分类ID")
private Long categoryId;
@Schema(description = "供应商ID")
private Long supplierId;
@Schema(description = "开始日期")
private LocalDate startDate;
@Schema(description = "结束日期")
private LocalDate endDate;
@Schema(description = "排序方式:profit-按毛利降序,margin-按毛利率降序")
private String sortBy;
@Schema(description = "只显示有销售的商品")
private Boolean onlyWithSales;
}
@@ -0,0 +1,75 @@
package com.bsd.pjcloud.supermarket.dto.report;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;
import java.math.BigDecimal;
/**
* 销售报表Excel导出DTO
*
* @author pjcloud
* @date 2025-10-16
*/
@Data
@ContentRowHeight(20)
@HeadRowHeight(25)
@ColumnWidth(15)
public class SalesReportExcelDTO {
@ExcelProperty(value = "商品编码", index = 0)
@ColumnWidth(20)
private String productCode;
@ExcelProperty(value = "商品名称", index = 1)
@ColumnWidth(30)
private String productName;
@ExcelProperty(value = "分类", index = 2)
@ColumnWidth(15)
private String categoryName;
@ExcelProperty(value = "规格", index = 3)
@ColumnWidth(20)
private String spec;
@ExcelProperty(value = "单位", index = 4)
@ColumnWidth(10)
private String unit;
@ExcelProperty(value = "销售数量", index = 5)
@ColumnWidth(15)
private Double salesQty;
@ExcelProperty(value = "销售金额(元)", index = 6)
@ColumnWidth(15)
private BigDecimal salesAmount;
@ExcelProperty(value = "销售单价(元)", index = 7)
@ColumnWidth(15)
private BigDecimal salesPrice;
@ExcelProperty(value = "销售笔数", index = 8)
@ColumnWidth(12)
private Integer salesCount;
@ExcelProperty(value = "退货数量", index = 9)
@ColumnWidth(15)
private Double returnQty;
@ExcelProperty(value = "退货金额(元)", index = 10)
@ColumnWidth(15)
private BigDecimal returnAmount;
@ExcelProperty(value = "实际销售数量", index = 11)
@ColumnWidth(15)
private Double actualSalesQty;
@ExcelProperty(value = "实际销售金额(元)", index = 12)
@ColumnWidth(18)
private BigDecimal actualSalesAmount;
}
@@ -0,0 +1,36 @@
package com.bsd.pjcloud.supermarket.dto.report;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDate;
/**
* 销售报表查询条件DTO
*
* @author pjcloud
* @date 2025-10-16
*/
@Data
@Schema(description = "销售报表查询条件")
public class SalesReportQueryDTO {
@Schema(description = "商品名称(模糊查询)")
private String productName;
@Schema(description = "商品编码(模糊查询)")
private String productCode;
@Schema(description = "分类ID")
private Long categoryId;
@Schema(description = "开始日期")
private LocalDate startDate;
@Schema(description = "结束日期")
private LocalDate endDate;
@Schema(description = "排序方式:amount-按销售额降序,qty-按销售数量降序")
private String sortBy;
}
@@ -0,0 +1,72 @@
package com.bsd.pjcloud.supermarket.dto.report;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDate;
/**
* 盘存报表Excel导出DTO
*
* @author pjcloud
* @date 2025-10-16
*/
@Data
@ContentRowHeight(20)
@HeadRowHeight(25)
@ColumnWidth(15)
public class StocktakeReportExcelDTO {
@ExcelProperty(value = "盘点单号", index = 0)
@ColumnWidth(20)
private String stocktakeCode;
@ExcelProperty(value = "盘点日期", index = 1)
@ColumnWidth(15)
private LocalDate stocktakeDate;
@ExcelProperty(value = "商品编码", index = 2)
@ColumnWidth(20)
private String productCode;
@ExcelProperty(value = "商品名称", index = 3)
@ColumnWidth(30)
private String productName;
@ExcelProperty(value = "分类", index = 4)
@ColumnWidth(15)
private String categoryName;
@ExcelProperty(value = "规格", index = 5)
@ColumnWidth(20)
private String spec;
@ExcelProperty(value = "单位", index = 6)
@ColumnWidth(10)
private String unit;
@ExcelProperty(value = "账面数量", index = 7)
@ColumnWidth(15)
private Double bookQty;
@ExcelProperty(value = "实盘数量", index = 8)
@ColumnWidth(15)
private Double physicalQty;
@ExcelProperty(value = "差异数量", index = 9)
@ColumnWidth(15)
private Double diffQty;
@ExcelProperty(value = "差异金额(元)", index = 10)
@ColumnWidth(15)
private BigDecimal diffAmount;
@ExcelProperty(value = "备注", index = 11)
@ColumnWidth(30)
private String remark;
}
@@ -0,0 +1,39 @@
package com.bsd.pjcloud.supermarket.dto.report;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDate;
/**
* 盘存报表查询条件DTO
*
* @author pjcloud
* @date 2025-10-16
*/
@Data
@Schema(description = "盘存报表查询条件")
public class StocktakeReportQueryDTO {
@Schema(description = "商品名称(模糊查询)")
private String productName;
@Schema(description = "商品编码(模糊查询)")
private String productCode;
@Schema(description = "分类ID")
private Long categoryId;
@Schema(description = "盘点单号")
private String stocktakeCode;
@Schema(description = "开始日期")
private LocalDate startDate;
@Schema(description = "结束日期")
private LocalDate endDate;
@Schema(description = "差异类型:surplus-盘盈,shortage-盘亏,all-全部")
private String diffType;
}