打印样式修改

This commit is contained in:
谭凯凯
2024-10-16 16:32:52 +08:00
committed by Tankaikai
parent 811fff8644
commit 875eb8fb02

View File

@@ -102,16 +102,17 @@ public class PrintConsumer {
Boolean isReturn = jsonObject.getBoolean("isReturn");
TbOrderInfo orderInfo = tbOrderInfoMapper.selectByPrimaryKey(orderId);
log.info("orderInfo-before: {}", JSON.toJSONString(orderInfo));
log.error("orderInfo-before: {}", JSON.toJSONString(orderInfo));
ThreadUtil.safeSleep(1000*3);
log.info("orderInfo-after: {}", JSON.toJSONString(orderInfo));
TbOrderInfo newOrderInfo = tbOrderInfoMapper.selectByPrimaryKey(orderId);
log.error("orderInfo-after: {}", JSON.toJSONString(orderInfo));
Utils.checkValueUnReturn(orderInfo, "订单信息不存在");
TbShopInfo shopInfo = tbShopInfoMapper.selectByPrimaryKey(Integer.valueOf(orderInfo.getShopId()));
Utils.checkValueUnReturn(shopInfo, "店铺信息不存在");
getPrintMachine(shopInfo.getId(), "cash", "normal", null).forEach(machine -> {
List<TbOrderDetail> tbOrderDetails = tbOrderDetailMapper.selectAllByOrderId(orderInfo.getId());
printerHandler.handleRequest(machine, isReturn, orderInfo, tbOrderDetails, null);
List<TbOrderDetail> tbOrderDetails = tbOrderDetailMapper.selectAllByOrderId(newOrderInfo.getId());
printerHandler.handleRequest(machine, isReturn, newOrderInfo, tbOrderDetails, null);
// printPlaceTicket(isReturn, machine, orderInfo, shopInfo);
});