小票打印bug修复
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.chaozhanggui.system.cashierservice.util;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
@@ -137,7 +138,8 @@ public class PrinterUtils {
|
||||
data.append("<S>品名 数量 小计</S><BR>");
|
||||
data.append("<S>--------------------------------</S><BR>");
|
||||
for (OrderDetailPO.Detail detail : detailPO.getDetailList()) {
|
||||
String row = YunXiangYinUtil.getRow(detail.getProductName(), "", " " + detail.getNumber(), toPlainStr(detail.getAmount()), 20, 0, 4, 6);
|
||||
String number = Convert.toBigDecimal(detail.getNumber()).setScale(0).toPlainString();
|
||||
String row = YunXiangYinUtil.getRow(detail.getProductName(), "", " " + number, toPlainStr(detail.getAmount()), 20, 0, 4, 6);
|
||||
data.append(row);
|
||||
if (StrUtil.isNotBlank(detail.getSpec())) {
|
||||
data.append("<S>规格:").append(detail.getSpec()).append("</S><BR>");
|
||||
|
||||
Reference in New Issue
Block a user