1.代客下单退款单打印
This commit is contained in:
@@ -297,7 +297,7 @@ public class PrintMechineConsumer {
|
||||
return;
|
||||
}
|
||||
|
||||
TbProductSkuWithBLOBs tbProductSkuWithBLOBs = tbProductSkuMapper.selectByPrimaryKey(it.getProductSkuId());
|
||||
TbProductSkuWithBLOBs tbProductSkuWithBLOBs = tbProductSkuMapper.selectByPrimaryKey(Integer.valueOf(it.getProductSkuId()));
|
||||
String remark = "";
|
||||
if (ObjectUtil.isNotEmpty(tbProductSkuWithBLOBs) && ObjectUtil.isNotEmpty(tbProductSkuWithBLOBs.getSpecSnap())) {
|
||||
remark = tbProductSkuWithBLOBs.getSpecSnap();
|
||||
@@ -306,19 +306,27 @@ public class PrintMechineConsumer {
|
||||
String data;
|
||||
String voiceJson;
|
||||
if (isReturn) {
|
||||
|
||||
data = PrinterUtils.getPrintData("return",
|
||||
orderInfo.getPayType().equals("wx_lite")? orderInfo.getTableName(): orderInfo.getMasterId(),
|
||||
StrUtil.isBlank(orderInfo.getTableName()) ? orderInfo.getMasterId() : orderInfo.getTableName(),
|
||||
DateUtils.getTime(new Date(orderInfo.getCreatedAt())), it.getProductName(), it.getNum(), remark);
|
||||
voiceJson = "{\"bizType\":\"2\",\"content\":\"您有一笔退款订单,请及时处理\"}";
|
||||
PrinterUtils.printTickets(voiceJson,3, 2, tbPrintMachineWithBLOBs.getAddress(), data);
|
||||
|
||||
}else {
|
||||
data = PrinterUtils.getPrintData("", orderInfo.getMasterId(),
|
||||
DateUtils.getTime(new Date(orderInfo.getCreatedAt())), it.getProductName(),
|
||||
it.getNum(), remark);
|
||||
voiceJson = "{\"bizType\":\"2\",\"content\":\"您有一笔新的订单,请及时处理\"}";
|
||||
PrinterUtils.printTickets(voiceJson,3, 1, tbPrintMachineWithBLOBs.getAddress(), data);
|
||||
|
||||
|
||||
}
|
||||
// PrinterUtils.printTickets(voiceJson,3, printerNum, tbPrintMachineWithBLOBs.getAddress(), data);
|
||||
|
||||
|
||||
|
||||
|
||||
PrinterUtils.printTickets(voiceJson,3, printerNum, tbPrintMachineWithBLOBs.getAddress(), data);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -388,6 +396,7 @@ public class PrintMechineConsumer {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 判断商品是否已打票
|
||||
* @return true 已打 false 未打
|
||||
|
||||
Reference in New Issue
Block a user