diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/rabbit/PrintMechineConsumer.java b/src/main/java/com/chaozhanggui/system/cashierservice/rabbit/PrintMechineConsumer.java index ac493a2..ee4f5e3 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/rabbit/PrintMechineConsumer.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/rabbit/PrintMechineConsumer.java @@ -621,7 +621,7 @@ public class PrintMechineConsumer { } } if (ObjectUtil.isNotEmpty(detailList) && detailList.size() > 0) { - OrderDetailPO detailPO = new OrderDetailPO(shopInfo.getShopName(), "普通打印", orderInfo.getOrderType().equals("miniapp") ? orderInfo.getTableName() : orderInfo.getMasterId(), orderInfo.getOrderNo(), DateUtils.getTime(new Date(orderInfo.getCreatedAt())), "【POS-1】001", orderInfo.getOrderAmount().toPlainString(), balance, (ObjectUtil.isEmpty(orderInfo.getPayType()) || ObjectUtil.isNull(orderInfo.getPayType()) ? "" : orderInfo.getPayType()), "0", detailList, orderInfo.getRemark(), null, null); + OrderDetailPO detailPO = new OrderDetailPO(shopInfo.getShopName(), "普通打印", orderInfo.getOrderType().equals("miniapp") ? orderInfo.getTableName() : orderInfo.getMasterId(), orderInfo.getOrderNo(), DateUtils.getTime(new Date(orderInfo.getCreatedAt())), "【POS-1】001", orderInfo.getOrderAmount().toPlainString(), balance, (ObjectUtil.isEmpty(orderInfo.getPayType()) || ObjectUtil.isNull(orderInfo.getPayType()) ? "" : orderInfo.getPayType()), "0", detailList, orderInfo.getRemark(), orderInfo.getDiscountAmount() == null ? null : orderInfo.getDiscountAmount().toPlainString(), orderInfo.getDiscountRatio() == null ? null : orderInfo.getDiscountRatio().toPlainString()); String printType = "结算单"; if ("return".equals(orderInfo.getOrderType())) { diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/rabbit/print/FeiPrinter.java b/src/main/java/com/chaozhanggui/system/cashierservice/rabbit/print/FeiPrinter.java index 4c7d63f..290807d 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/rabbit/print/FeiPrinter.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/rabbit/print/FeiPrinter.java @@ -67,7 +67,7 @@ public class FeiPrinter extends PrinterHandler { orderInfo.getOrderNo(), DateUtils.getTime(new Date(orderInfo.getCreatedAt())), "【POS-1】001", orderInfo.getOrderAmount().toPlainString(), balance, (ObjectUtil.isEmpty(orderInfo.getPayType()) || ObjectUtil.isNull(orderInfo.getPayType()) ? "" : orderInfo.getPayType()), - "0", detailList, orderInfo.getRemark(), null, null); + "0", detailList, orderInfo.getRemark(), orderInfo.getDiscountAmount() == null ? null : orderInfo.getDiscountAmount().toPlainString(), orderInfo.getDiscountRatio() == null ? null : orderInfo.getDiscountRatio().toPlainString()); String printType = "退款单"; String[] resp = FeieyunPrintUtil.getCashPrintData(detailPO, machine.getAddress(), printType, printType); shopPrintLogService.save(machine, "退款单", resp[0], resp[1]); @@ -81,7 +81,7 @@ public class FeiPrinter extends PrinterHandler { orderInfo.getOrderNo(), DateUtils.getTime(new Date(orderInfo.getCreatedAt())), "【POS-1】001", orderInfo.getOrderAmount().toPlainString(), balance, (ObjectUtil.isEmpty(orderInfo.getPayType()) || ObjectUtil.isNull(orderInfo.getPayType()) ? "" : orderInfo.getPayType()), - "0", detailList, orderInfo.getRemark(), orderInfo.getDiscountAmount()==null?null:orderInfo.getDiscountAmount().toPlainString(), orderInfo.getDiscountRatio()==null?null:orderInfo.getDiscountRatio().toPlainString()); + "0", detailList, orderInfo.getRemark(), orderInfo.getDiscountAmount() == null ? null : orderInfo.getDiscountAmount().toPlainString(), orderInfo.getDiscountRatio() == null ? null : orderInfo.getDiscountRatio().toPlainString()); String printType = "结算单"; String[] resp = FeieyunPrintUtil.getCashPrintData(detailPO, machine.getAddress(), printType, printType); shopPrintLogService.save(machine, "结算单", resp[0], resp[1]);