即时销售报表
This commit is contained in:
1 parent
aadefd2981
commit
90a9de87d8
4 files changed
+805
No files matched your search
+72
@@ -0,0 +1,72 @@
|
||||
package com.bsd.pjcloud.supermarket.dto.inventoryrecords;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 即时销售数据查询DTO
|
||||
*
|
||||
* @author zjf
|
||||
* @date 2025-02-14 15:30:00
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "即时销售数据查询DTO")
|
||||
public class InstantSaleQueryDTO {
|
||||
|
||||
/**
|
||||
* 单据编号
|
||||
*/
|
||||
@Schema(description = "单据编号")
|
||||
private String inventoryCode;
|
||||
|
||||
/**
|
||||
* 开始日期
|
||||
*/
|
||||
@Schema(description = "开始日期")
|
||||
private LocalDate startDate;
|
||||
|
||||
/**
|
||||
* 结束日期
|
||||
*/
|
||||
@Schema(description = "结束日期")
|
||||
private LocalDate endDate;
|
||||
|
||||
/**
|
||||
* 经办人id
|
||||
*/
|
||||
@Schema(description = "经办人id")
|
||||
private Long handlerUserId;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
@Schema(description = "审核状态")
|
||||
private String checkStatus;
|
||||
|
||||
/**
|
||||
* 货商id
|
||||
*/
|
||||
@Schema(description = "货商id")
|
||||
private Long supplierId;
|
||||
|
||||
/**
|
||||
* 商品id
|
||||
*/
|
||||
@Schema(description = "商品id")
|
||||
private Long erpSpuId;
|
||||
|
||||
/**
|
||||
* 商品名称(模糊查询)
|
||||
*/
|
||||
@Schema(description = "商品名称(模糊查询)")
|
||||
private String productName;
|
||||
|
||||
/**
|
||||
* 仓库id
|
||||
*/
|
||||
@Schema(description = "仓库id")
|
||||
private String warehouseId;
|
||||
}
|
||||
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
package com.bsd.pjcloud.supermarket.dto.realtime;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 即时销售报表查询DTO
|
||||
*
|
||||
* @author pjcloud
|
||||
* @date 2025-01-27 10:00:00
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "即时销售报表查询DTO")
|
||||
public class RealtimeSalesReportQueryDTO {
|
||||
|
||||
/**
|
||||
* 查询类型:hour-按小时, day-按天, month-按月
|
||||
*/
|
||||
@Schema(description = "查询类型:hour-按小时, day-按天, month-按月", example = "day")
|
||||
private String queryType;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@Schema(description = "开始时间")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@Schema(description = "结束时间")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
/**
|
||||
* 开始日期(用于按日查询)
|
||||
*/
|
||||
@Schema(description = "开始日期")
|
||||
private LocalDate startDate;
|
||||
|
||||
/**
|
||||
* 结束日期(用于按日查询)
|
||||
*/
|
||||
@Schema(description = "结束日期")
|
||||
private LocalDate endDate;
|
||||
|
||||
/**
|
||||
* 商品分类ID
|
||||
*/
|
||||
@Schema(description = "商品分类ID")
|
||||
private Long categoryId;
|
||||
|
||||
/**
|
||||
* 商品名称(模糊查询)
|
||||
*/
|
||||
@Schema(description = "商品名称(模糊查询)")
|
||||
private String productName;
|
||||
|
||||
/**
|
||||
* 销售员ID
|
||||
*/
|
||||
@Schema(description = "销售员ID")
|
||||
private Long salespersonId;
|
||||
|
||||
/**
|
||||
* 仓库ID
|
||||
*/
|
||||
@Schema(description = "仓库ID")
|
||||
private String warehouseId;
|
||||
|
||||
/**
|
||||
* 排名数量限制(用于畅销品/滞销品排名)
|
||||
*/
|
||||
@Schema(description = "排名数量限制", example = "10")
|
||||
private Integer topLimit;
|
||||
|
||||
/**
|
||||
* 是否包含实时数据
|
||||
*/
|
||||
@Schema(description = "是否包含实时数据", example = "true")
|
||||
private Boolean includeRealtime;
|
||||
|
||||
/**
|
||||
* 是否按分钟更新
|
||||
*/
|
||||
@Schema(description = "是否按分钟更新", example = "false")
|
||||
private Boolean updateByMinute;
|
||||
}
|
||||
+220
@@ -0,0 +1,220 @@
|
||||
package com.bsd.pjcloud.supermarket.vo.inventoryrecord;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 即时销售数据VO
|
||||
*
|
||||
* @author zjf
|
||||
* @date 2025-02-14 15:30:00
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "即时销售数据VO")
|
||||
public class InstantSaleVo {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@Schema(description = "主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 单据编号(规则生成,出入库编号)
|
||||
*/
|
||||
@Schema(description = "单据编号")
|
||||
private String inventoryCode;
|
||||
|
||||
/**
|
||||
* 单据日期
|
||||
*/
|
||||
@Schema(description = "单据日期")
|
||||
private LocalDate inventoryDate;
|
||||
|
||||
/**
|
||||
* 单据类型(字典inventory_type)采购入库、采购退货、盘点入库等
|
||||
*/
|
||||
@Schema(description = "单据类型")
|
||||
private String inventoryType;
|
||||
|
||||
/**
|
||||
* 经办人id
|
||||
*/
|
||||
@Schema(description = "经办人id")
|
||||
private Long handlerUserId;
|
||||
|
||||
/**
|
||||
* 经办人名称
|
||||
*/
|
||||
@Schema(description = "经办人名称")
|
||||
private String handlerUserName;
|
||||
|
||||
/**
|
||||
* 仓库id
|
||||
*/
|
||||
@Schema(description = "仓库id")
|
||||
private String warehouseId;
|
||||
|
||||
/**
|
||||
* 货商
|
||||
*/
|
||||
@Schema(description = "货商")
|
||||
private Long supplierId;
|
||||
|
||||
/**
|
||||
* 货商名称
|
||||
*/
|
||||
@Schema(description = "货商名称")
|
||||
private String supplierName;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 订单类型(1入库 2出库)
|
||||
*/
|
||||
@Schema(description = "订单类型")
|
||||
private String orderType;
|
||||
|
||||
/**
|
||||
* 入库总金额
|
||||
*/
|
||||
@Schema(description = "入库总金额")
|
||||
private Integer totalAmount;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
@Schema(description = "审核状态")
|
||||
private String checkStatus;
|
||||
|
||||
/**
|
||||
* 审核人id
|
||||
*/
|
||||
@Schema(description = "审核人id")
|
||||
private String checkUserId;
|
||||
|
||||
/**
|
||||
* 审核日期
|
||||
*/
|
||||
@Schema(description = "审核日期")
|
||||
private LocalDateTime checkTime;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
@Schema(description = "设备类型")
|
||||
private Integer deviceType;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@Schema(description = "创建人")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 即时销售商品明细列表
|
||||
*/
|
||||
@Schema(description = "即时销售商品明细列表")
|
||||
private List<InstantSaleItemVo> items;
|
||||
|
||||
/**
|
||||
* 即时销售商品明细VO
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "即时销售商品明细VO")
|
||||
public static class InstantSaleItemVo {
|
||||
|
||||
/**
|
||||
* 明细ID
|
||||
*/
|
||||
@Schema(description = "明细ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 商品id
|
||||
*/
|
||||
@Schema(description = "商品id")
|
||||
private Long erpSpuId;
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
@Schema(description = "商品名称")
|
||||
private String productName;
|
||||
|
||||
/**
|
||||
* 包装单位id
|
||||
*/
|
||||
@Schema(description = "包装单位id")
|
||||
private Long unitId;
|
||||
|
||||
/**
|
||||
* 包装单位名称
|
||||
*/
|
||||
@Schema(description = "包装单位名称")
|
||||
private String unitName;
|
||||
|
||||
/**
|
||||
* 销售数量
|
||||
*/
|
||||
@Schema(description = "销售数量")
|
||||
private Double quantity;
|
||||
|
||||
/**
|
||||
* 销售单价(分)
|
||||
*/
|
||||
@Schema(description = "销售单价(分)")
|
||||
private Integer unitPrice;
|
||||
|
||||
/**
|
||||
* 总金额(分)
|
||||
*/
|
||||
@Schema(description = "总金额(分)")
|
||||
private Integer totalAmount;
|
||||
|
||||
/**
|
||||
* 税率%
|
||||
*/
|
||||
@Schema(description = "税率%")
|
||||
private Integer taxRate;
|
||||
|
||||
/**
|
||||
* 税前金额(分)
|
||||
*/
|
||||
@Schema(description = "税前金额(分)")
|
||||
private Integer taxAmount;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 规格
|
||||
*/
|
||||
@Schema(description = "规格")
|
||||
private String spec;
|
||||
|
||||
/**
|
||||
* 内装数
|
||||
*/
|
||||
@Schema(description = "内装数")
|
||||
private Integer packageNum;
|
||||
}
|
||||
}
|
||||
|
||||
+423
@@ -0,0 +1,423 @@
|
||||
package com.bsd.pjcloud.supermarket.vo.realtime;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 即时销售报表VO
|
||||
*
|
||||
* @author pjcloud
|
||||
* @date 2025-01-27 10:00:00
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "即时销售报表VO")
|
||||
public class RealtimeSalesReportVO {
|
||||
|
||||
/**
|
||||
* 报表生成时间
|
||||
*/
|
||||
@Schema(description = "报表生成时间")
|
||||
private LocalDateTime reportTime;
|
||||
|
||||
/**
|
||||
* 查询时间段
|
||||
*/
|
||||
@Schema(description = "查询时间段")
|
||||
private String timeRange;
|
||||
|
||||
/**
|
||||
* 销售汇总信息
|
||||
*/
|
||||
@Schema(description = "销售汇总信息")
|
||||
private SalesSummaryVO salesSummary;
|
||||
|
||||
/**
|
||||
* 时段销售数据(按小时/天/月)
|
||||
*/
|
||||
@Schema(description = "时段销售数据")
|
||||
private List<TimePeriodSalesVO> timePeriodSales;
|
||||
|
||||
/**
|
||||
* 畅销品排名
|
||||
*/
|
||||
@Schema(description = "畅销品排名")
|
||||
private List<ProductRankingVO> topSellingProducts;
|
||||
|
||||
/**
|
||||
* 滞销品排名
|
||||
*/
|
||||
@Schema(description = "滞销品排名")
|
||||
private List<ProductRankingVO> slowSellingProducts;
|
||||
|
||||
/**
|
||||
* 客单价分析
|
||||
*/
|
||||
@Schema(description = "客单价分析")
|
||||
private CustomerAnalysisVO customerAnalysis;
|
||||
|
||||
/**
|
||||
* 销售趋势数据
|
||||
*/
|
||||
@Schema(description = "销售趋势数据")
|
||||
private List<SalesTrendVO> salesTrend;
|
||||
|
||||
/**
|
||||
* 销售汇总信息VO
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "销售汇总信息VO")
|
||||
public static class SalesSummaryVO {
|
||||
|
||||
/**
|
||||
* 总销售额(元)
|
||||
*/
|
||||
@Schema(description = "总销售额(元)")
|
||||
private BigDecimal totalSalesAmount;
|
||||
|
||||
/**
|
||||
* 总销售笔数
|
||||
*/
|
||||
@Schema(description = "总销售笔数")
|
||||
private Integer totalSalesCount;
|
||||
|
||||
/**
|
||||
* 平均客单价(元)
|
||||
*/
|
||||
@Schema(description = "平均客单价(元)")
|
||||
private BigDecimal averageCustomerValue;
|
||||
|
||||
/**
|
||||
* 销售商品种类数
|
||||
*/
|
||||
@Schema(description = "销售商品种类数")
|
||||
private Integer productVarietyCount;
|
||||
|
||||
/**
|
||||
* 总销售数量
|
||||
*/
|
||||
@Schema(description = "总销售数量")
|
||||
private Double totalSalesQuantity;
|
||||
|
||||
/**
|
||||
* 同比销售额增长率(%)
|
||||
*/
|
||||
@Schema(description = "同比销售额增长率(%)")
|
||||
private BigDecimal salesGrowthRate;
|
||||
|
||||
/**
|
||||
* 环比销售额增长率(%)
|
||||
*/
|
||||
@Schema(description = "环比销售额增长率(%)")
|
||||
private BigDecimal salesGrowthRateMonth;
|
||||
|
||||
/**
|
||||
* 实时销售状态
|
||||
*/
|
||||
@Schema(description = "实时销售状态:HIGH-高, MEDIUM-中, LOW-低")
|
||||
private String realtimeStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* 时段销售数据VO
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "时段销售数据VO")
|
||||
public static class TimePeriodSalesVO {
|
||||
|
||||
/**
|
||||
* 时间段标识(如:09:00, 2025-01-27)
|
||||
*/
|
||||
@Schema(description = "时间段标识")
|
||||
private String timeLabel;
|
||||
|
||||
/**
|
||||
* 销售额(元)
|
||||
*/
|
||||
@Schema(description = "销售额(元)")
|
||||
private BigDecimal salesAmount;
|
||||
|
||||
/**
|
||||
* 销售笔数
|
||||
*/
|
||||
@Schema(description = "销售笔数")
|
||||
private Integer salesCount;
|
||||
|
||||
/**
|
||||
* 客单价(元)
|
||||
*/
|
||||
@Schema(description = "客单价(元)")
|
||||
private BigDecimal customerValue;
|
||||
|
||||
/**
|
||||
* 销售数量
|
||||
*/
|
||||
@Schema(description = "销售数量")
|
||||
private Double salesQuantity;
|
||||
|
||||
/**
|
||||
* 销售增长率(%)
|
||||
*/
|
||||
@Schema(description = "销售增长率(%)")
|
||||
private BigDecimal growthRate;
|
||||
|
||||
/**
|
||||
* 商品详情列表
|
||||
*/
|
||||
@Schema(description = "商品详情列表")
|
||||
private List<TimePeriodProductDetailVO> productDetails;
|
||||
|
||||
/**
|
||||
* 时段销售商品详情VO
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "时段销售商品详情VO")
|
||||
public static class TimePeriodProductDetailVO {
|
||||
|
||||
/**
|
||||
* 商品ID
|
||||
*/
|
||||
@Schema(description = "商品ID")
|
||||
private Long productId;
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
@Schema(description = "商品名称")
|
||||
private String productName;
|
||||
|
||||
/**
|
||||
* 商品编码
|
||||
*/
|
||||
@Schema(description = "商品编码")
|
||||
private String productCode;
|
||||
|
||||
/**
|
||||
* 商品分类ID
|
||||
*/
|
||||
@Schema(description = "商品分类ID")
|
||||
private Long categoryId;
|
||||
|
||||
/**
|
||||
* 商品分类名称
|
||||
*/
|
||||
@Schema(description = "商品分类名称")
|
||||
private String categoryName;
|
||||
|
||||
/**
|
||||
* 包装单位
|
||||
*/
|
||||
@Schema(description = "包装单位")
|
||||
private String unit;
|
||||
|
||||
/**
|
||||
* 包装单位名称
|
||||
*/
|
||||
@Schema(description = "包装单位名称")
|
||||
private String unitName;
|
||||
|
||||
/**
|
||||
* 销售数量
|
||||
*/
|
||||
@Schema(description = "销售数量")
|
||||
private Double quantity;
|
||||
|
||||
/**
|
||||
* 销售单价(元)
|
||||
*/
|
||||
@Schema(description = "销售单价(元)")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
/**
|
||||
* 销售总金额(元)
|
||||
*/
|
||||
@Schema(description = "销售总金额(元)")
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
/**
|
||||
* 销售笔数
|
||||
*/
|
||||
@Schema(description = "销售笔数")
|
||||
private Integer salesCount;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品排名VO
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "商品排名VO")
|
||||
public static class ProductRankingVO {
|
||||
|
||||
/**
|
||||
* 排名
|
||||
*/
|
||||
@Schema(description = "排名")
|
||||
private Integer ranking;
|
||||
|
||||
/**
|
||||
* 商品ID
|
||||
*/
|
||||
@Schema(description = "商品ID")
|
||||
private Long productId;
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
@Schema(description = "商品名称")
|
||||
private String productName;
|
||||
|
||||
/**
|
||||
* 商品编码
|
||||
*/
|
||||
@Schema(description = "商品编码")
|
||||
private String productCode;
|
||||
|
||||
/**
|
||||
* 销售额(元)
|
||||
*/
|
||||
@Schema(description = "销售额(元)")
|
||||
private BigDecimal salesAmount;
|
||||
|
||||
/**
|
||||
* 销售数量
|
||||
*/
|
||||
@Schema(description = "销售数量")
|
||||
private Double salesQuantity;
|
||||
|
||||
/**
|
||||
* 销售笔数
|
||||
*/
|
||||
@Schema(description = "销售笔数")
|
||||
private Integer salesCount;
|
||||
|
||||
/**
|
||||
* 平均单价(元)
|
||||
*/
|
||||
@Schema(description = "平均单价(元)")
|
||||
private BigDecimal averagePrice;
|
||||
|
||||
/**
|
||||
* 库存数量
|
||||
*/
|
||||
@Schema(description = "库存数量")
|
||||
private Double stockQuantity;
|
||||
|
||||
/**
|
||||
* 库存状态:SUFFICIENT-充足, LOW-不足, OUT-缺货
|
||||
*/
|
||||
@Schema(description = "库存状态")
|
||||
private String stockStatus;
|
||||
|
||||
/**
|
||||
* 销售增长率(%)
|
||||
*/
|
||||
@Schema(description = "销售增长率(%)")
|
||||
private BigDecimal growthRate;
|
||||
}
|
||||
|
||||
/**
|
||||
* 客单价分析VO
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "客单价分析VO")
|
||||
public static class CustomerAnalysisVO {
|
||||
|
||||
/**
|
||||
* 平均客单价(元)
|
||||
*/
|
||||
@Schema(description = "平均客单价(元)")
|
||||
private BigDecimal averageCustomerValue;
|
||||
|
||||
/**
|
||||
* 最高客单价(元)
|
||||
*/
|
||||
@Schema(description = "最高客单价(元)")
|
||||
private BigDecimal maxCustomerValue;
|
||||
|
||||
/**
|
||||
* 最低客单价(元)
|
||||
*/
|
||||
@Schema(description = "最低客单价(元)")
|
||||
private BigDecimal minCustomerValue;
|
||||
|
||||
/**
|
||||
* 客单价中位数(元)
|
||||
*/
|
||||
@Schema(description = "客单价中位数(元)")
|
||||
private BigDecimal medianCustomerValue;
|
||||
|
||||
/**
|
||||
* 高客单价订单占比(%)
|
||||
*/
|
||||
@Schema(description = "高客单价订单占比(%)")
|
||||
private BigDecimal highValueOrderRatio;
|
||||
|
||||
/**
|
||||
* 客单价分布区间
|
||||
*/
|
||||
@Schema(description = "客单价分布区间")
|
||||
private List<CustomerValueRangeVO> valueRanges;
|
||||
}
|
||||
|
||||
/**
|
||||
* 客单价分布区间VO
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "客单价分布区间VO")
|
||||
public static class CustomerValueRangeVO {
|
||||
|
||||
/**
|
||||
* 区间范围(如:0-50元)
|
||||
*/
|
||||
@Schema(description = "区间范围")
|
||||
private String rangeLabel;
|
||||
|
||||
/**
|
||||
* 订单数量
|
||||
*/
|
||||
@Schema(description = "订单数量")
|
||||
private Integer orderCount;
|
||||
|
||||
/**
|
||||
* 占比(%)
|
||||
*/
|
||||
@Schema(description = "占比(%)")
|
||||
private BigDecimal percentage;
|
||||
}
|
||||
|
||||
/**
|
||||
* 销售趋势VO
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "销售趋势VO")
|
||||
public static class SalesTrendVO {
|
||||
|
||||
/**
|
||||
* 时间点
|
||||
*/
|
||||
@Schema(description = "时间点")
|
||||
private String timePoint;
|
||||
|
||||
/**
|
||||
* 销售额(元)
|
||||
*/
|
||||
@Schema(description = "销售额(元)")
|
||||
private BigDecimal salesAmount;
|
||||
|
||||
/**
|
||||
* 销售笔数
|
||||
*/
|
||||
@Schema(description = "销售笔数")
|
||||
private Integer salesCount;
|
||||
|
||||
/**
|
||||
* 客单价(元)
|
||||
*/
|
||||
@Schema(description = "客单价(元)")
|
||||
private BigDecimal customerValue;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user