多余数据 不需要
This commit is contained in:
@@ -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())) {
|
||||
|
||||
Reference in New Issue
Block a user