Compare commits
2 Commits
15920ce384
...
5874571200
| Author | SHA1 | Date | |
|---|---|---|---|
| 5874571200 | |||
| 1d85cb67e1 |
@@ -1,13 +1,8 @@
|
||||
package com.czg.account.dto.print;
|
||||
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author Administrator
|
||||
*/
|
||||
@@ -94,4 +89,9 @@ public class PrinterAddDTO {
|
||||
private String printType;
|
||||
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 媒体音开关 0-关 1-开
|
||||
*/
|
||||
private Integer volumeSwitch;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.czg.account.dto.print;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
@@ -90,4 +89,9 @@ public class PrinterEditDTO {
|
||||
* 打印机状态 online在线
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 媒体音开关 0-关 1-开
|
||||
*/
|
||||
private Integer volumeSwitch;
|
||||
}
|
||||
|
||||
@@ -118,5 +118,9 @@ public class PrintMachine implements Serializable {
|
||||
* 打印类型,JSON数组 refund-确认退款单 handover-交班单 queue-排队取号
|
||||
*/
|
||||
private String printType;
|
||||
/**
|
||||
* 媒体音开关 0-关 1-开
|
||||
*/
|
||||
private Integer volumeSwitch;
|
||||
|
||||
}
|
||||
|
||||
@@ -158,7 +158,10 @@ public class FeiPrinter extends PrinterHandler implements PrinterImpl {
|
||||
|
||||
@Override
|
||||
protected void callNumPrint(PrintMachine machine, String callNum, String shopName, String tableName, String tableNote, String preNum, String codeUrl, LocalDateTime takeTime, String shopNote) {
|
||||
String voiceJson = "{\"bizType\":\"2\",\"content\":\"您有一条新的排号记录\"}";
|
||||
String voiceJson = "{\"bizType\":\"2\",\"content\":\"\"}";
|
||||
if (1 == machine.getVolumeSwitch()) {
|
||||
voiceJson = "{\"bizType\":\"2\",\"content\":\"您有一条新的排号记录\"}";
|
||||
}
|
||||
String data = buildCallTicketData(shopName, tableName, callNum, preNum, codeUrl, shopNote, takeTime);
|
||||
String resp = sendPrintRequest(machine.getAddress(), data, voiceJson, "1");
|
||||
printMachineLogService.save(machine, "叫号单", data, resp);
|
||||
|
||||
@@ -106,8 +106,10 @@ public class YxyPrinter extends PrinterHandler implements PrinterImpl {
|
||||
protected void normalDishesPrint(OrderInfo orderInfo, OrderDetail orderDetail, PrintMachine machine) {
|
||||
String buildDishPrintData = buildDishPrintData(false, getPickupNum(orderInfo), DateUtil.format(orderDetail.getCreateTime(), "yyyy-MM-dd HH:mm:ss"), orderDetail.getProductName(), orderDetail.getSkuName(),
|
||||
orderDetail.getNum(), orderDetail.getRemark(), orderDetail.getProGroupInfo(), orderDetail.getId(), orderDetail.isUrgent());
|
||||
// String voiceJson = "{\"bizType\":\"2\",\"content\":\"您有一笔新的订单,请及时处理\"}";
|
||||
String voiceJson = "{\"bizType\":\"2\",\"content\":\"\"}";
|
||||
if (1 == machine.getVolumeSwitch()) {
|
||||
voiceJson = "{\"bizType\":\"2\",\"content\":\"您有一笔新的订单,请及时处理\"}";
|
||||
}
|
||||
String resp = sendPrintRequest(machine.getAddress(), buildDishPrintData, voiceJson, "1");
|
||||
printMachineLogService.save(orderInfo.getId(), machine, "新订单", buildDishPrintData, resp);
|
||||
|
||||
@@ -139,7 +141,10 @@ public class YxyPrinter extends PrinterHandler implements PrinterImpl {
|
||||
: "0.00");
|
||||
|
||||
String data = buildOrderPrintData(printInfoDTO, detailList);
|
||||
String voiceJson = "{\"PbizType\":\"2\",\"content\":\"您有一笔新的订单,请及时处理\"}";
|
||||
String voiceJson = "{\"bizType\":\"2\",\"content\":\"\"}";
|
||||
if (1 == machine.getVolumeSwitch()) {
|
||||
voiceJson = "{\"bizType\":\"2\",\"content\":\"您有一笔新的订单,请及时处理\"}";
|
||||
}
|
||||
String printerNum = "1";
|
||||
if (StrUtil.isNotBlank(machine.getPrintQty())) {
|
||||
printerNum = machine.getPrintQty().split("\\^")[1];
|
||||
@@ -202,7 +207,10 @@ public class YxyPrinter extends PrinterHandler implements PrinterImpl {
|
||||
|
||||
String data = buildOrderPrintData(printInfoDTO, detailList);
|
||||
|
||||
String voiceJson = "{\"PbizType\":\"2\",\"content\":\"您有一笔新的订单,请及时处理\"}";
|
||||
String voiceJson = "{\"bizType\":\"2\",\"content\":\"\"}";
|
||||
if (1 == machine.getVolumeSwitch()) {
|
||||
voiceJson = "{\"bizType\":\"2\",\"content\":\"您有一笔新的订单,请及时处理\"}";
|
||||
}
|
||||
String printerNum = "1";
|
||||
if (StrUtil.isNotBlank(machine.getPrintQty())) {
|
||||
printerNum = machine.getPrintQty().split("\\^")[1];
|
||||
|
||||
Reference in New Issue
Block a user