消息日志
结算单打印 不管前端打不打
This commit is contained in:
@@ -66,7 +66,6 @@ public class PrintMqListener {
|
|||||||
if (StrUtil.isBlank(orderIdStr)) {
|
if (StrUtil.isBlank(orderIdStr)) {
|
||||||
throw new RuntimeException("订单打印失败,未传递orderId");
|
throw new RuntimeException("订单打印失败,未传递orderId");
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] split = orderIdStr.split("_");
|
String[] split = orderIdStr.split("_");
|
||||||
if (split.length < 3) {
|
if (split.length < 3) {
|
||||||
throw new CzgException("订单ID格式不正确:" + orderIdStr);
|
throw new CzgException("订单ID格式不正确:" + orderIdStr);
|
||||||
@@ -78,9 +77,9 @@ public class PrintMqListener {
|
|||||||
//订单状态 0未完成/1完成
|
//订单状态 0未完成/1完成
|
||||||
Integer orderStatus = Integer.parseInt(split[2]);
|
Integer orderStatus = Integer.parseInt(split[2]);
|
||||||
//该字段表示 网络打印机是否打印订单 本地传参来的
|
//该字段表示 网络打印机是否打印订单 本地传参来的
|
||||||
Boolean printOrder = jsonObject.getBoolean("printOrder");
|
// Boolean printOrder = jsonObject.getBoolean("printOrder");
|
||||||
redisService.runFunAndCheckKey(() -> {
|
redisService.runFunAndCheckKey(() -> {
|
||||||
if (printOrder && orderStatus == 1) {
|
if (orderStatus == 1) {
|
||||||
printConfig.orderHandler(orderId, PrinterHandler.PrintTypeEnum.ORDER, null);
|
printConfig.orderHandler(orderId, PrinterHandler.PrintTypeEnum.ORDER, null);
|
||||||
}
|
}
|
||||||
if (payType == 1 || orderStatus == 0) {
|
if (payType == 1 || orderStatus == 0) {
|
||||||
|
|||||||
@@ -60,9 +60,8 @@ public class RabbitPublisher {
|
|||||||
* @param printOrder 是否打印结算单
|
* @param printOrder 是否打印结算单
|
||||||
*/
|
*/
|
||||||
public void sendOrderPrintMsg(Long orderId, Integer before, Integer status, Integer placeNum, boolean printOrder, String source) {
|
public void sendOrderPrintMsg(Long orderId, Integer before, Integer status, Integer placeNum, boolean printOrder, String source) {
|
||||||
log.info("开始发送订单打印消息, orderId: {}, {}, : {}, 第: {}次下单, 通知本地: {}, source: {}",
|
log.info("订单打印消息, orderId:{},{},{},第:{}次下单,通知本地:{},source:{}",
|
||||||
orderId, before == 0 ? "后付" : "先付", status == 0 ? "未完成" : "完成", placeNum, printOrder, source);
|
orderId, before == 0 ? "后付" : "先付", status == 0 ? "未完成" : "完成", placeNum, printOrder, source);
|
||||||
log.info("订单打印消息, orderId: {}, printOrder: {}, source: {}", orderId, printOrder, source);
|
|
||||||
String sendOrderId = orderId + "_" + before + "_" + status + "_" + placeNum;
|
String sendOrderId = orderId + "_" + before + "_" + status + "_" + placeNum;
|
||||||
//本地打印机 消息通知
|
//本地打印机 消息通知
|
||||||
if (printOrder) {
|
if (printOrder) {
|
||||||
|
|||||||
Reference in New Issue
Block a user