打印简化

This commit is contained in:
2024-09-28 10:49:25 +08:00
parent ea21e97e29
commit b1f88d9932

View File

@@ -87,12 +87,18 @@ public class PrinterUtils {
if (productName.length() > 4 || remark.length() > 4) {
builder.append("<CS:32>").append(productName).append(" ").append(number).append("</CS><BR>");
builder.append("<CS:32>").append(remark).append(" </CS><BR>");
if (StrUtil.isNotBlank(remark)) {
builder.append("<CS:32>").append(remark).append(" </CS><BR>");
}
} else {
builder.append("<B>").append(productName).append(" ").append(number).append("</B><BR>");
builder.append("<B>").append(remark).append(" </B><BR>");
if (StrUtil.isNotBlank(remark)) {
builder.append("<B>").append(remark).append(" </B><BR>");
}
}
if (StrUtil.isNotBlank(note)) {
builder.append("<S><L>备注: ").append(note == null ? "" : note).append(" </L></S><BR>");
}
builder.append("<S><L>备注: ").append(note == null ? "" : note).append(" </L></S><BR>");
builder.append("<OUT:150>");
builder.append("<PCUT>");
return builder.toString();