多余数据 不需要

This commit is contained in:
2026-04-20 16:52:12 +08:00
parent 660226d133
commit e8fcf1bdd6
2 changed files with 5 additions and 70 deletions

View File

@@ -24,70 +24,6 @@ public class OrderDetailPrintDTO implements Serializable {
private Long id;
private String productName;
/**
* 商品类型:单规格商品 single 多规格商品 sku 套餐商品 package 称重商品 weigh 团购券 coupon
*/
private String productType;
private String skuName;
/**
* 原价
*/
private BigDecimal price;
/**
* 临时改价/临时菜价
*/
private BigDecimal discountSaleAmount;
/**
* 最终单价
*/
private BigDecimal unitPrice;
/**
* 是否赠送 0否 1是
*/
private Integer isGift;
private boolean isUrgent;
/**
* 数量
*/
private BigDecimal num;
/**
* 退菜数量(不管价格)
*/
private BigDecimal returnNum;
/**
* 当前下单次数
*/
private Integer placeNum;
private BigDecimal returnAmount;
/**
* 是否等叫
*/
private Integer isWaitCall;
/**
* 是否是临时菜品
*/
private Integer isTemporary;
/**
* 套餐商品选择信息
*/
private String proGroupInfo;
/**
* 备注
*/
private String remark;
/**
* 退款备注
*/
private String refundRemark;
}

View File

@@ -118,7 +118,7 @@ public class PrintConfig implements ApplicationRunner {
orderDetailService.list(new QueryWrapper().eq(OrderDetail::getOrderId, orderInfo.getId()));
default -> orderDetailList;
};
sendOrderPrintMsg(orderInfo.getShopId(), orderInfo.getId(), placeNum, printTypeEnum + "", orderDetailList, "");
sendOrderPrintMsg(orderInfo.getShopId(), orderInfo.getId(), placeNum, printTypeEnum + "", null, "");
for (PrintMachine machine : getPrintMachine(orderInfo.getShopId(), printTypeEnum)) {
PrinterHandler printer = getPrinter(machine.getBrand());
switch (printTypeEnum) {
@@ -139,7 +139,7 @@ public class PrintConfig implements ApplicationRunner {
if (!"after-pay".equals(orderInfo.getPayMode()) && (OrderStatusEnums.UNPAID.getCode().equals(orderInfo.getStatus()) || OrderStatusEnums.CANCELLED.getCode().equals(orderInfo.getStatus()))) {
log.warn("此订单未支付, 订单信息: {}", orderInfo.getId());
}
List<OrderDetail> tbOrderDetailList = getCanPrintOrderDetails(machine, orderInfo.getId(), orderDetailList);
List<OrderDetail> tbOrderDetailList = getCanPrintOrderDetails(machine, orderDetailList);
if (CollUtil.isEmpty(tbOrderDetailList)) {
log.info("此订单无打印菜品, 订单信息: {}", orderInfo.getId());
break;
@@ -165,7 +165,7 @@ public class PrintConfig implements ApplicationRunner {
if (!"after-pay".equals(orderInfo.getPayMode()) && (OrderStatusEnums.UNPAID.getCode().equals(orderInfo.getStatus()) || OrderStatusEnums.CANCELLED.getCode().equals(orderInfo.getStatus()))) {
log.warn("此订单未支付, 订单信息: {}", orderInfo.getId());
}
List<OrderDetail> allOrderDetailList = getCanPrintOrderDetails(machine, orderInfo.getId(), orderDetailList);
List<OrderDetail> allOrderDetailList = getCanPrintOrderDetails(machine, orderDetailList);
if (CollUtil.isEmpty(allOrderDetailList)) {
log.info("此订单无打印菜品, 订单信息: {}", orderInfo.getId());
break;
@@ -260,13 +260,12 @@ public class PrintConfig implements ApplicationRunner {
*/
public void refundOrderHandler(String printTitle, String operator, String refundAmount, String refundReason, String refundType,
OrderInfo orderInfo, List<OrderDetail> detailList) {
sendOrderPrintMsg(orderInfo.getShopId(), orderInfo.getId(), null, PrinterHandler.PrintTypeEnum.RETURN_ORDER + "", detailList, operator);
//前台退菜单
if ("退菜单".equals(printTitle)) {
sendOrderPrintMsg(orderInfo.getShopId(), orderInfo.getId(), null, PrinterHandler.PrintTypeEnum.RETURN_ORDER + "", detailList, operator);
getPrintMachine(orderInfo.getShopId(), PrinterHandler.PrintTypeEnum.RETURN_ORDER).forEach(machine ->
getPrinter(machine.getBrand()).returnOrderPrint(printTitle, operator, refundAmount, refundReason, refundType, orderInfo, machine, detailList));
} else if ("退款单".equals(printTitle)) {
sendOrderPrintMsg(orderInfo.getShopId(), orderInfo.getId(), null, PrinterHandler.PrintTypeEnum.REFUND_ORDER + "", detailList, operator);
getPrintMachine(orderInfo.getShopId(), PrinterHandler.PrintTypeEnum.REFUND_ORDER).forEach(machine ->
getPrinter(machine.getBrand()).returnOrderPrint(printTitle, operator, refundAmount, refundReason, refundType, orderInfo, machine, detailList));
} else {
@@ -275,7 +274,7 @@ public class PrintConfig implements ApplicationRunner {
}
protected List<OrderDetail> getCanPrintOrderDetails(PrintMachine machine, Long orderId, List<OrderDetail> tbOrderDetailList) {
protected List<OrderDetail> getCanPrintOrderDetails(PrintMachine machine, List<OrderDetail> tbOrderDetailList) {
Set<Long> canPrintProSet = new HashSet<>();
boolean partPrint = false;
if ("1".equals(machine.getClassifyPrint())) {