打印样式修改

This commit is contained in:
谭凯凯
2024-10-15 09:29:33 +08:00
committed by Tankaikai
parent 8bf493e03d
commit 8d54e4971c

View File

@@ -3,6 +3,7 @@ package com.chaozhanggui.system.cashierservice.util;
import cn.hutool.core.text.UnicodeUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
@@ -119,11 +120,11 @@ public class FeieyunPrintUtil {
builder.append("<L>时间: " + date + " </L><BR><BR><BR>");
if (productName.length() > 4 || remark.length() > 4) {
builder.append("<B><BOLD>" + productName + " " + number + "</BOLD></B><BR><BR>");
builder.append("<B><BOLD>" + remark + " </BOLD></B><BR>");
builder.append("<B><BOLD>" + productName + " x " + number + "</BOLD></B><BR><BR>");
builder.append("<B><BOLD>" + StrUtil.emptyToDefault(remark,"") + " </BOLD></B><BR>");
} else {
builder.append("<B><BOLD>" + productName + " " + number + "</BOLD></B><BR><BR>");
builder.append("<B><BOLD>" + remark + " </BOLD></B><BR>");
builder.append("<B><BOLD>" + productName + " x " + number + "</BOLD></B><BR><BR>");
builder.append("<B><BOLD>" + StrUtil.emptyToDefault(remark,"") + " </BOLD></B><BR>");
}