操作员
This commit is contained in:
@@ -113,6 +113,7 @@ public interface PrinterImpl {
|
||||
String line = StrUtil.repeat("-", 32);
|
||||
return getFormatLabel(line, getSignLabelInfo().s);
|
||||
}
|
||||
|
||||
default String getDividingLine(Integer num) {
|
||||
int length = num == null ? 32 : num;
|
||||
String line = StrUtil.repeat("-", length);
|
||||
@@ -574,7 +575,7 @@ public interface PrinterImpl {
|
||||
builder.append(getDividingLine()).append(signLabelInfo.br);
|
||||
|
||||
// 操作员、打印时间
|
||||
builder.append(getFormatLabel(StrUtil.format("操作员: {}", record.getOperator()), signLabelInfo.s)).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(record.getPrintTime(), "yyyy/MM/dd HH:mm:ss")), signLabelInfo.s)).append(signLabelInfo.br);
|
||||
|
||||
// 结尾空行 + 切纸(和充值单保持一致)
|
||||
@@ -595,7 +596,7 @@ public interface PrinterImpl {
|
||||
|
||||
// 基础信息:打印时间、操作人、统计时间
|
||||
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.getOperator()), signLabelInfo.s)).append(signLabelInfo.br);
|
||||
builder.append(getFormatLabel(StrUtil.format("操作人: {}", StrUtil.isNotBlank(record.getOperator()) ? record.getOperator() : ""), signLabelInfo.s)).append(signLabelInfo.br);
|
||||
builder.append(getFormatLabel(StrUtil.format("时间: {}", record.getStatisticsTime()), signLabelInfo.s)).append(signLabelInfo.br).append(signLabelInfo.br);
|
||||
|
||||
// 营业总额
|
||||
@@ -663,7 +664,7 @@ public interface PrinterImpl {
|
||||
|
||||
// 基础信息:打印时间、操作人、统计时间
|
||||
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.getOperator()), signLabelInfo.s)).append(signLabelInfo.br);
|
||||
builder.append(getFormatLabel(StrUtil.format("操作人: {}", StrUtil.isNotBlank(record.getOperator()) ? record.getOperator() : ""), signLabelInfo.s)).append(signLabelInfo.br);
|
||||
builder.append(getFormatLabel(StrUtil.format("时间: {}", record.getStatisticsTime()), signLabelInfo.s)).append(signLabelInfo.br).append(signLabelInfo.br);
|
||||
|
||||
// 总计行:总计商品X件,实收金额X元
|
||||
@@ -738,7 +739,7 @@ public interface PrinterImpl {
|
||||
builder.append(getFormatLabel(leftRightAlign("已付金额:", record.getRechargeAmount().stripTrailingZeros().toPlainString(), 32), signLabelInfo.s)).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("操作员: {}", record.getOperator()), signLabelInfo.s)).append(signLabelInfo.br);
|
||||
builder.append(getFormatLabel(StrUtil.format("操作员: {}", StrUtil.isNotBlank(record.getOperator()) ? record.getOperator() : ""), signLabelInfo.s)).append(signLabelInfo.br);
|
||||
builder.append(getFormatLabel(StrUtil.format("充值编号: {}", record.getRechargeId()), signLabelInfo.s)).append(signLabelInfo.br);
|
||||
|
||||
// 结尾空行 + 切纸
|
||||
@@ -784,7 +785,7 @@ public interface PrinterImpl {
|
||||
|
||||
builder.append(getDividingLine()).append(signLabelInfo.br).append(signLabelInfo.br);
|
||||
// 操作员、打印时间
|
||||
builder.append(getFormatLabel(StrUtil.format("操作员: {}", record.getOperator()), signLabelInfo.s)).append(signLabelInfo.br);
|
||||
builder.append(getFormatLabel(StrUtil.format("操作员: {}", StrUtil.isNotBlank(record.getOperator()) ? record.getOperator() : ""), signLabelInfo.s)).append(signLabelInfo.br);
|
||||
// 打印时间:复用之前的DateUtil格式化,若DTO需补充printTime字段,可按需求添加
|
||||
builder.append(getFormatLabel(StrUtil.format("打印时间: {}", DateUtil.format(LocalDateTime.now(), "yyyy/MM/dd HH:mm:ss")), signLabelInfo.s)).append(signLabelInfo.br);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user