打印数据
This commit is contained in:
@@ -12,6 +12,7 @@ import jakarta.validation.constraints.DecimalMin;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -32,11 +33,12 @@ public interface MkShopRechargeService extends IService<MkShopRecharge> {
|
||||
|
||||
/**
|
||||
* 充值
|
||||
*
|
||||
* @param isNoJoin 是否没有执行 加入会员的方法
|
||||
* 会员如果是条件开通 则 需要统计
|
||||
* 会员如果是条件开通 则 需要统计
|
||||
*/
|
||||
void recharge(Long shopId, Long shopUserId, Long rechargeDetailId, BigDecimal amount, Long paymentId,
|
||||
String payType, ShopUserFlowBizEnum bizEnum, boolean isNoJoin);
|
||||
String payType, LocalDateTime payTime, ShopUserFlowBizEnum bizEnum, boolean isNoJoin, String operator);
|
||||
|
||||
List<RechargeListVO> getList(long loginIdAsLong);
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
|
||||
package com.czg.order.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.experimental.Accessors;
|
||||
import java.io.Serial;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 数据打印表 实体类。
|
||||
*
|
||||
* @author ww
|
||||
* @since 2026-04-16
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
public class SysPrintDataDTO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 打印数据 Json格式
|
||||
*/
|
||||
private String data;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.czg.order.entity;
|
||||
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import java.io.Serializable;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 数据打印表 实体类。
|
||||
*
|
||||
* @author ww
|
||||
* @since 2026-04-16
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Table("sys_print_data")
|
||||
public class SysPrintData implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id(keyType = KeyType.Auto)
|
||||
private Long id;
|
||||
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 打印类型
|
||||
*
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 打印数据 Json格式
|
||||
*/
|
||||
private String data;
|
||||
|
||||
}
|
||||
@@ -56,4 +56,9 @@ public class SaleSummaryCountParam implements Serializable {
|
||||
* 店铺id
|
||||
*/
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 操作人
|
||||
*/
|
||||
private String operator;
|
||||
}
|
||||
|
||||
@@ -23,22 +23,30 @@ public interface ShopProdStatisticService extends IService<ShopProdStatistic> {
|
||||
*/
|
||||
SaleSummaryCountVo summaryCount(SaleSummaryCountParam param);
|
||||
|
||||
/**
|
||||
* 打印 商品交易数据
|
||||
*/
|
||||
void summaryPrint(SaleSummaryCountParam param);
|
||||
|
||||
|
||||
/**
|
||||
* 获取某一段时间的商品交易数据
|
||||
* shopId 店铺id
|
||||
* rangeType 时间范围类型
|
||||
* TODAY, // 今天
|
||||
* YESTERDAY, // 昨天
|
||||
* LAST_7_DAYS, // 最近7天
|
||||
* LAST_30_DAYS,// 最近30天
|
||||
* THIS_WEEK, // 本周
|
||||
* THIS_MONTH // 本月
|
||||
* CUSTOM // 自定义时间范围
|
||||
* start 开始时间 格式yyyy-MM-dd 今天/昨天不用传
|
||||
* end 结束时间 格式yyyy-MM-dd 今天/昨天不用传
|
||||
* shopId 店铺id
|
||||
* rangeType 时间范围类型
|
||||
* TODAY, // 今天
|
||||
* YESTERDAY, // 昨天
|
||||
* LAST_7_DAYS, // 最近7天
|
||||
* LAST_30_DAYS,// 最近30天
|
||||
* THIS_WEEK, // 本周
|
||||
* THIS_MONTH // 本月
|
||||
* CUSTOM // 自定义时间范围
|
||||
* start 开始时间 格式yyyy-MM-dd 今天/昨天不用传
|
||||
* end 结束时间 格式yyyy-MM-dd 今天/昨天不用传
|
||||
*
|
||||
* @return 商品数据
|
||||
*/
|
||||
List<ShopProdStatistic> getArchiveTradeData(SaleSummaryCountParam param);
|
||||
|
||||
List<ShopProdStatistic> getArchiveTradeDataBy10(Long shopId, Integer day);
|
||||
|
||||
//------------------------------------------------------------下列为 后台使用------------------------------------------------------------
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.czg.order.service;
|
||||
|
||||
import com.mybatisflex.core.service.IService;
|
||||
import com.czg.order.entity.SysPrintData;
|
||||
|
||||
/**
|
||||
* 数据打印表 服务层。
|
||||
*
|
||||
* @author ww
|
||||
* @since 2026-04-16
|
||||
*/
|
||||
public interface SysPrintDataService extends IService<SysPrintData> {
|
||||
|
||||
}
|
||||
@@ -5,7 +5,6 @@ import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 商品报表打印实体
|
||||
@@ -50,9 +49,39 @@ public class ProductReportPrintDTO {
|
||||
* 商品明细列表
|
||||
* 分类名称,商品集合
|
||||
*/
|
||||
private Map<String, List<ProductItem>> items;
|
||||
private List<CategoryItem> items;
|
||||
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public static class CategoryItem {
|
||||
|
||||
/**
|
||||
* 商品名称(第二列商品名称)
|
||||
*/
|
||||
private String categoryName;
|
||||
|
||||
/**
|
||||
* 数量(第三列数量)
|
||||
*/
|
||||
private BigDecimal number;
|
||||
|
||||
/**
|
||||
* 实收(第四列)
|
||||
*/
|
||||
private BigDecimal actualAmount;
|
||||
|
||||
/**
|
||||
* 销售额(第五列)
|
||||
*/
|
||||
private BigDecimal salesAmount;
|
||||
|
||||
/**
|
||||
* 商品明细列表
|
||||
*/
|
||||
private List<ProductItem> productItems;
|
||||
}
|
||||
|
||||
public ProductItem createProductItem(String productName, BigDecimal number, BigDecimal actualAmount, BigDecimal salesAmount) {
|
||||
ProductItem item = new ProductItem();
|
||||
item.setProductName(productName);
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.time.LocalDateTime;
|
||||
public class RechargePrintDTO {
|
||||
//店铺名称
|
||||
private String shopName;
|
||||
private String userId;
|
||||
private Long userId;
|
||||
private String userName;
|
||||
private String userPhone;
|
||||
//支付时间
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.mybatisflex.core.service.IService;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 店铺商品分类
|
||||
@@ -26,15 +27,22 @@ public interface ShopProdCategoryService extends IService<ShopProdCategory> {
|
||||
|
||||
/**
|
||||
* 获取店铺商品分类列表
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return 店铺商品分类列表
|
||||
*/
|
||||
List<ShopProdCategoryDTO> getShopProdCategoryList(ShopProdCategoryDTO param);
|
||||
|
||||
/**
|
||||
* 根据店铺id获取分类id和名称的映射
|
||||
*/
|
||||
Map<Long, String> getCategoryIdNameMap(Long shopId);
|
||||
|
||||
void exportShopProdCategory(ShopProdCategoryDTO param, HttpServletResponse response);
|
||||
|
||||
/**
|
||||
* 获取店铺商品分类详情
|
||||
*
|
||||
* @param id id
|
||||
* @return 店铺商品分类详情
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user