diff --git a/cash-service/order-service/src/main/java/com/czg/service/order/print/PrinterImpl.java b/cash-service/order-service/src/main/java/com/czg/service/order/print/PrinterImpl.java index a7990fadc..9ccf8acd2 100644 --- a/cash-service/order-service/src/main/java/com/czg/service/order/print/PrinterImpl.java +++ b/cash-service/order-service/src/main/java/com/czg/service/order/print/PrinterImpl.java @@ -551,7 +551,7 @@ public interface PrinterImpl { builder.append(getFormatLabel(StrUtil.format("IN".equals(record.getType()) ? "入库时间: {}" : "出库时间: {}", DateUtil.format(record.getInStockTime(), "yyyy/MM/dd HH:mm:ss")), signLabelInfo.s)).append(signLabelInfo.br); builder.append(getDividingLine()).append(signLabelInfo.br); builder.append(getFormatLabel(key4("耗材名称", "库存单位", "IN".equals(record.getType()) ? "入库数量" : "出库数量", "金额", - 14, 6, 6), signLabelInfo.s)).append(signLabelInfo.br); + 10, 8, 8), signLabelInfo.s)).append(signLabelInfo.br); // 遍历耗材明细,逐行打印 List items = record.getItems(); @@ -560,7 +560,7 @@ public interface PrinterImpl { String stockNumber = item.getStockNumber().stripTrailingZeros().toPlainString(); String amount = item.getAmount().stripTrailingZeros().toPlainString(); // 左对齐排版,保证列对齐 - String itemLine = key4(item.getConsName(), item.getUnit(), stockNumber, amount, 14, 6, 6); + String itemLine = key4(item.getConsName(), item.getUnit(), stockNumber, amount, 10, 9, 9); builder.append(getFormatLabel(itemLine, signLabelInfo.s)).append(signLabelInfo.br); } } @@ -570,7 +570,7 @@ public interface PrinterImpl { String stockNumberCountStr = "数量" + record.getStockNumberCount(); String amountCountStr = "金额" + record.getAmountCount(); - String totalLine = key4("总计", consCountStr, stockNumberCountStr, amountCountStr, 8, 8, 8); + String totalLine = key4("总计", consCountStr, stockNumberCountStr, amountCountStr, 6, 9, 7); builder.append(getFormatLabel(totalLine, signLabelInfo.s)).append(signLabelInfo.br); builder.append(getDividingLine()).append(signLabelInfo.br); @@ -733,13 +733,14 @@ public interface PrinterImpl { if (record.getGiftCoupon() != null && record.getGiftCoupon() > 0) { builder.append(getFormatLabel(leftRightAlign("赠送优惠券:", record.getGiftCoupon() + "", 32), signLabelInfo.s)).append(signLabelInfo.br); } - builder.append(getFormatLabel(leftRightAlign(" 充值后余额:", record.getBalance().stripTrailingZeros().toPlainString(), 32), signLabelInfo.s)).append(signLabelInfo.br); + builder.append(getFormatLabel(leftRightAlign("充值后余额:", record.getBalance().stripTrailingZeros().toPlainString(), 32), signLabelInfo.s)).append(signLabelInfo.br); builder.append(getDividingLine()).append(signLabelInfo.br); // 支付信息 builder.append(getFormatLabel(leftRightAlign("已付金额:", record.getRechargeAmount().stripTrailingZeros().toPlainString(), 16), signLabelInfo.f)).append(signLabelInfo.br); builder.append(getFormatLabel(leftRightAlign("支付方式:", record.getPayType(), 32), signLabelInfo.s)).append(signLabelInfo.br); builder.append(getDividingLine()).append(signLabelInfo.br); builder.append(getFormatLabel(StrUtil.format("操作员: {}", StrUtil.isNotBlank(record.getOperator()) ? record.getOperator() : ""), signLabelInfo.s)).append(signLabelInfo.br); + builder.append(getFormatLabel(StrUtil.format("打印时间: {}", DateUtil.format(LocalDateTime.now(), "yyyy/MM/dd HH:mm:ss")), signLabelInfo.s)).append(signLabelInfo.br); builder.append(getFormatLabel(StrUtil.format("充值编号: {}", record.getRechargeId()), signLabelInfo.s)).append(signLabelInfo.br); // 结尾空行 + 切纸 diff --git a/cash-service/product-service/src/main/java/com/czg/service/product/service/impl/ConsStockFlowServiceImpl.java b/cash-service/product-service/src/main/java/com/czg/service/product/service/impl/ConsStockFlowServiceImpl.java index 4e8365af3..4a63e8dc7 100644 --- a/cash-service/product-service/src/main/java/com/czg/service/product/service/impl/ConsStockFlowServiceImpl.java +++ b/cash-service/product-service/src/main/java/com/czg/service/product/service/impl/ConsStockFlowServiceImpl.java @@ -156,6 +156,7 @@ public class ConsStockFlowServiceImpl extends ServiceImpl items = new ArrayList<>();