添加退单打印
This commit is contained in:
@@ -66,10 +66,15 @@ public class PrinterUtils {
|
||||
* @param remark
|
||||
* @return
|
||||
*/
|
||||
public static String getPrintData(String pickupNumber,String date,String productName,Integer number,String remark) {
|
||||
public static String getPrintData(String type,String pickupNumber,String date,String productName,Integer number,String remark) {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
if("return".equals(type)){
|
||||
builder.append("<C><B>"+pickupNumber+"【退】</B></C><BR><BR>");
|
||||
}else {
|
||||
builder.append("<C><B>"+pickupNumber+"</B></C><BR><BR>");
|
||||
}
|
||||
|
||||
|
||||
builder.append("<C><B>"+pickupNumber+"</B></C><BR><BR>");
|
||||
builder.append("<S><L>时间: "+date+" </L></S><BR><BR><BR>");
|
||||
|
||||
if(productName.length()>4||remark.length()>4){
|
||||
@@ -211,7 +216,7 @@ public class PrinterUtils {
|
||||
* 打印票据
|
||||
* @throws Exception
|
||||
*/
|
||||
public static void printTickets(Integer actWay ,Integer cn,String devName,String data) {
|
||||
public static void printTickets(String voiceJson,Integer actWay ,Integer cn,String devName,String data) {
|
||||
//设备名称
|
||||
//行为方式 1:只打印数据 2:只播放信息 3:打印数据并播放信息
|
||||
// actWay = 3;
|
||||
@@ -219,8 +224,6 @@ public class PrinterUtils {
|
||||
// int cn = 1;
|
||||
//打印内容
|
||||
//播报语音数据体,字段参考文档IOT_XY_API11001
|
||||
|
||||
String voiceJson = "{\"bizType\":\"2\",\"content\":\"您有一笔新的订单,请及时处理\"}";
|
||||
String time = String.valueOf(System.currentTimeMillis());
|
||||
String uuid = UUID.randomUUID().toString();
|
||||
|
||||
@@ -299,8 +302,8 @@ public class PrinterUtils {
|
||||
detailList.add(detail4);
|
||||
OrderDetailPO detailPO=new OrderDetailPO("牛叉闪闪","普通打印","#365","DD20240306134718468","2024-03-06 15:00:00","【POS-1】001","79000.80","5049758.96","deposit","0",detailList,"变态辣");
|
||||
|
||||
|
||||
printTickets(1,1,"ZF544PG03W00002",getCashPrintData(detailPO,"结算单",""));
|
||||
String voiceJson = "{\"bizType\":\"2\",\"content\":\"您有一笔新的订单,请及时处理\"}";
|
||||
printTickets(voiceJson,1,1,"ZF544PG03W00002",getCashPrintData(detailPO,"结算单",""));
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user