厨房小票二维码打印开关
This commit is contained in:
@@ -292,6 +292,10 @@ public class ShopInfoEditDTO {
|
|||||||
* 数签子
|
* 数签子
|
||||||
*/
|
*/
|
||||||
private Integer isCountStick;
|
private Integer isCountStick;
|
||||||
|
/**
|
||||||
|
* 后厨单菜二维码
|
||||||
|
*/
|
||||||
|
private Integer isKitchenCode;
|
||||||
/**
|
/**
|
||||||
* 退菜退库存模式 1跟随商品分类 2 跟随单商品
|
* 退菜退库存模式 1跟随商品分类 2 跟随单商品
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -135,6 +135,10 @@ public class ShopConfig implements Serializable {
|
|||||||
* 数签子
|
* 数签子
|
||||||
*/
|
*/
|
||||||
private Integer isCountStick;
|
private Integer isCountStick;
|
||||||
|
/**
|
||||||
|
* 后厨单菜二维码
|
||||||
|
*/
|
||||||
|
private Integer isKitchenCode;
|
||||||
/**
|
/**
|
||||||
* 退菜退库存模式 1跟随商品分类 2 跟随单商品
|
* 退菜退库存模式 1跟随商品分类 2 跟随单商品
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -361,6 +361,11 @@ public class ShopInfo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@Column(ignore = true)
|
@Column(ignore = true)
|
||||||
private Integer isCountStick;
|
private Integer isCountStick;
|
||||||
|
/**
|
||||||
|
* 后厨单菜二维码
|
||||||
|
*/
|
||||||
|
@Column(ignore = true)
|
||||||
|
private Integer isKitchenCode;
|
||||||
/**
|
/**
|
||||||
* 退菜退库存模式 1跟随商品分类 2 跟随单商品
|
* 退菜退库存模式 1跟随商品分类 2 跟随单商品
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -60,8 +60,8 @@ public class FeiPrinter extends PrinterHandler implements PrinterImpl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onlyKitchenPrint(OrderInfo orderInfo, OrderDetail orderDetail, PrintMachine machine) {
|
protected void onlyKitchenPrint(Integer isCode, OrderInfo orderInfo, OrderDetail orderDetail, PrintMachine machine) {
|
||||||
String buildDishPrintData = buildOnlyKitchenPrintData(getPickupNum(orderInfo), orderDetail);
|
String buildDishPrintData = buildOnlyKitchenPrintData(isCode, getPickupNum(orderInfo), orderDetail);
|
||||||
String voiceJson = "{\"bizType\":\"2\",\"content\":\"\"}";
|
String voiceJson = "{\"bizType\":\"2\",\"content\":\"\"}";
|
||||||
if (1 == machine.getVolumeSwitch()) {
|
if (1 == machine.getVolumeSwitch()) {
|
||||||
voiceJson = "{\"bizType\":\"2\",\"content\":\"新单来了,请注意查看\"}";
|
voiceJson = "{\"bizType\":\"2\",\"content\":\"新单来了,请注意查看\"}";
|
||||||
|
|||||||
@@ -155,7 +155,8 @@ public class PrintConfig implements ApplicationRunner {
|
|||||||
machine.setVolumeSwitch(0);
|
machine.setVolumeSwitch(0);
|
||||||
}
|
}
|
||||||
isNotice = false;
|
isNotice = false;
|
||||||
FunUtils.safeRunVoid(() -> printer.onlyKitchenPrint(orderInfo, item, machine),
|
ShopInfo shopInfo = shopInfoService.getById(orderInfo.getShopId());
|
||||||
|
FunUtils.safeRunVoid(() -> printer.onlyKitchenPrint(shopInfo.getIsKitchenCode(), orderInfo, item, machine),
|
||||||
"订单id:{} ,后厨分单打印失败", orderInfo.getId());
|
"订单id:{} ,后厨分单打印失败", orderInfo.getId());
|
||||||
// 保存已打印信息
|
// 保存已打印信息
|
||||||
redisService.set(RedisCst.kitchenOnly(orderInfo.getId(), machine.getId(), item.getId()), "", 20);
|
redisService.set(RedisCst.kitchenOnly(orderInfo.getId(), machine.getId(), item.getId()), "", 20);
|
||||||
|
|||||||
@@ -337,7 +337,7 @@ public abstract class PrinterHandler {
|
|||||||
/**
|
/**
|
||||||
* 后厨 菜品打印
|
* 后厨 菜品打印
|
||||||
*/
|
*/
|
||||||
protected abstract void onlyKitchenPrint(OrderInfo orderInfo, OrderDetail orderDetail, PrintMachine machine);
|
protected abstract void onlyKitchenPrint(Integer isCode, OrderInfo orderInfo, OrderDetail orderDetail, PrintMachine machine);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 后厨 退菜整单打印
|
* 后厨 退菜整单打印
|
||||||
|
|||||||
@@ -468,7 +468,7 @@ public interface PrinterImpl {
|
|||||||
* @param pickupNumber 取餐号
|
* @param pickupNumber 取餐号
|
||||||
* @return 元数据
|
* @return 元数据
|
||||||
*/
|
*/
|
||||||
default String buildOnlyKitchenPrintData(String pickupNumber, OrderDetail orderDetail) {
|
default String buildOnlyKitchenPrintData(Integer isCode, String pickupNumber, OrderDetail orderDetail) {
|
||||||
PrintSignLabel signLabelInfo = getSignLabelInfo();
|
PrintSignLabel signLabelInfo = getSignLabelInfo();
|
||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
builder.append(formatLabel(pickupNumber, signLabelInfo.centerBold))
|
builder.append(formatLabel(pickupNumber, signLabelInfo.centerBold))
|
||||||
@@ -527,6 +527,10 @@ public interface PrinterImpl {
|
|||||||
builder.append(formatLabel("【加急】", signLabelInfo.center, signLabelInfo.bold))
|
builder.append(formatLabel("【加急】", signLabelInfo.center, signLabelInfo.bold))
|
||||||
.append(signLabelInfo.br);
|
.append(signLabelInfo.br);
|
||||||
}
|
}
|
||||||
|
if (1 == isCode) {
|
||||||
|
builder.append(formatLabel("UP_ORDER_DETAIL:" + orderDetail.getId(), signLabelInfo.center, signLabelInfo.qr))
|
||||||
|
.append(signLabelInfo.br);
|
||||||
|
}
|
||||||
builder.append(signLabelInfo.br)
|
builder.append(signLabelInfo.br)
|
||||||
.append(signLabelInfo.getOut(150))
|
.append(signLabelInfo.getOut(150))
|
||||||
.append(signLabelInfo.cut);
|
.append(signLabelInfo.cut);
|
||||||
|
|||||||
@@ -55,8 +55,8 @@ public class YxyPrinter extends PrinterHandler implements PrinterImpl {
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onlyKitchenPrint(OrderInfo orderInfo, OrderDetail orderDetail, PrintMachine machine) {
|
protected void onlyKitchenPrint(Integer isCode, OrderInfo orderInfo, OrderDetail orderDetail, PrintMachine machine) {
|
||||||
String buildDishPrintData = buildOnlyKitchenPrintData(getPickupNum(orderInfo), orderDetail);
|
String buildDishPrintData = buildOnlyKitchenPrintData(isCode, getPickupNum(orderInfo), orderDetail);
|
||||||
String voiceJson = "{\"bizType\":\"2\",\"content\":\"\"}";
|
String voiceJson = "{\"bizType\":\"2\",\"content\":\"\"}";
|
||||||
if (1 == machine.getVolumeSwitch()) {
|
if (1 == machine.getVolumeSwitch()) {
|
||||||
voiceJson = "{\"bizType\":\"2\",\"content\":\"新单来了,请注意查看\"}";
|
voiceJson = "{\"bizType\":\"2\",\"content\":\"新单来了,请注意查看\"}";
|
||||||
@@ -253,6 +253,7 @@ public class YxyPrinter extends PrinterHandler implements PrinterImpl {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 签名Token
|
* 签名Token
|
||||||
|
*
|
||||||
* @param timestamp 时间戳,13位
|
* @param timestamp 时间戳,13位
|
||||||
* @param requestId 请求ID,自定义
|
* @param requestId 请求ID,自定义
|
||||||
* @return token信息
|
* @return token信息
|
||||||
|
|||||||
Reference in New Issue
Block a user