提交代码

new-dev
胡锐 1 year ago
parent b130339b93
commit d0e309cae1
  1. 4
      hai-service/src/main/java/com/hai/config/SpPrinterTemplate.java
  2. 4
      hai-service/src/main/java/com/hai/config/ZkcPrinterTemplate.java

@ -77,7 +77,7 @@ public class SpPrinterTemplate {
"------------------------------<BR>" + "------------------------------<BR>" +
"打印时间:" + DateUtil.date2String(new Date(), "yyyy-MM-dd HH:mm:ss") + "<BR>" + "打印时间:" + DateUtil.date2String(new Date(), "yyyy-MM-dd HH:mm:ss") + "<BR>" +
"支付时间:" + payTime + "<BR>" + "支付时间:" + payTime + "<BR>" +
"电话:" + phone.substring(0, 3) + "****" + phone.substring(7) + "<BR>" + "电话:" + (StringUtils.isNotBlank(phone)?phone.substring(0, 3) + "****" + phone.substring(7):"") + "<BR>" +
"来源:" + (StringUtils.isNotBlank(MapUtils.getString(receiptMap, "receiptSource"))?MapUtils.getString(receiptMap, "receiptSource"):"嗨森逛")+ "<BR>" + "来源:" + (StringUtils.isNotBlank(MapUtils.getString(receiptMap, "receiptSource"))?MapUtils.getString(receiptMap, "receiptSource"):"嗨森逛")+ "<BR>" +
"油枪:"+ gunNo + "号<BR>" + "油枪:"+ gunNo + "号<BR>" +
"油品:" + oilNo + "#<BR>" + "油品:" + oilNo + "#<BR>" +
@ -122,7 +122,7 @@ public class SpPrinterTemplate {
"------------------------------<BR>" + "------------------------------<BR>" +
"打印时间:" + DateUtil.date2String(new Date(), "yyyy-MM-dd HH:mm:ss") + "<BR>" + "打印时间:" + DateUtil.date2String(new Date(), "yyyy-MM-dd HH:mm:ss") + "<BR>" +
"支付时间:" + payTime + "<BR>" + "支付时间:" + payTime + "<BR>" +
"电话:" + phone.substring(0, 3) + "****" + phone.substring(7) + "<BR>" + "电话:" + (StringUtils.isNotBlank(phone)?phone.substring(0, 3) + "****" + phone.substring(7):"") + "<BR>" +
"来源:" + (StringUtils.isNotBlank(MapUtils.getString(receiptMap, "receiptSource"))?MapUtils.getString(receiptMap, "receiptSource"):"嗨森逛")+ "<BR>" + "来源:" + (StringUtils.isNotBlank(MapUtils.getString(receiptMap, "receiptSource"))?MapUtils.getString(receiptMap, "receiptSource"):"嗨森逛")+ "<BR>" +
"油枪:"+ gunNo + "号<BR>" + "油枪:"+ gunNo + "号<BR>" +
"油品:" + oilNo + "#<BR>" + "油品:" + oilNo + "#<BR>" +

@ -153,7 +153,7 @@ public class ZkcPrinterTemplate {
stream.write(("支付时间:" + payTime).getBytes("UTF-8")); stream.write(("支付时间:" + payTime).getBytes("UTF-8"));
stream.write(0x0A); stream.write(0x0A);
stream.write(("电话:" + phone.substring(0, 3) + "****" + phone.substring(7)).getBytes("UTF-8")); stream.write(("电话:" + (StringUtils.isNotBlank(phone)?phone.substring(0, 3) + "****" + phone.substring(7):"")).getBytes("UTF-8"));
stream.write(0x0A); stream.write(0x0A);
stream.write(("来源:" + (StringUtils.isNotBlank(MapUtils.getString(receiptMap, "receiptSource"))?MapUtils.getString(receiptMap, "receiptSource"):"嗨森逛")).getBytes("UTF-8")); stream.write(("来源:" + (StringUtils.isNotBlank(MapUtils.getString(receiptMap, "receiptSource"))?MapUtils.getString(receiptMap, "receiptSource"):"嗨森逛")).getBytes("UTF-8"));
@ -257,7 +257,7 @@ public class ZkcPrinterTemplate {
stream.write(("支付时间:" + payTime).getBytes("UTF-8")); stream.write(("支付时间:" + payTime).getBytes("UTF-8"));
stream.write(0x0A); stream.write(0x0A);
stream.write(("电话:" + phone.substring(0, 3) + "****" + phone.substring(7)).getBytes("UTF-8")); stream.write(("电话:" + (StringUtils.isNotBlank(phone)?phone.substring(0, 3) + "****" + phone.substring(7):"")).getBytes("UTF-8"));
stream.write(0x0A); stream.write(0x0A);
stream.write("来源:嗨森逛".getBytes("UTF-8")); stream.write("来源:嗨森逛".getBytes("UTF-8"));

Loading…
Cancel
Save