餐位费问题
This commit is contained in:
@@ -761,15 +761,20 @@ public abstract class PrinterHandler {
|
|||||||
? orderInfo.getDiscountAllAmount().toPlainString()
|
? orderInfo.getDiscountAllAmount().toPlainString()
|
||||||
: "0.00");
|
: "0.00");
|
||||||
|
|
||||||
if(StrUtil.isNotBlank(orderInfo.getDineMode())){
|
printInfoDTO.setSeatNum(orderInfo.getSeatNum() == null ? "" : orderInfo.getSeatNum().toString());
|
||||||
switch (orderInfo.getDineMode()){
|
if (orderInfo.getSeatNum() != null && orderInfo.getSeatAmount().compareTo(BigDecimal.ZERO) > 0) {
|
||||||
|
printInfoDTO.setSeatAmount(orderInfo.getSeatAmount().divide(BigDecimal.valueOf(orderInfo.getSeatNum()), 2, RoundingMode.DOWN).toPlainString());
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotBlank(orderInfo.getDineMode())) {
|
||||||
|
switch (orderInfo.getDineMode()) {
|
||||||
case "dine-in" -> printInfoDTO.setPrintType("收银-堂食");
|
case "dine-in" -> printInfoDTO.setPrintType("收银-堂食");
|
||||||
case "take-out" -> printInfoDTO.setPrintType("收银-外带");
|
case "take-out" -> printInfoDTO.setPrintType("收银-外带");
|
||||||
case "take-away" -> printInfoDTO.setPrintType("收银-外卖");
|
case "take-away" -> printInfoDTO.setPrintType("收银-外卖");
|
||||||
}
|
}
|
||||||
|
if ("dine-in".equals(orderInfo.getDineMode())) {
|
||||||
|
orderInfo.setSeatAmount(BigDecimal.ZERO);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (orderInfo.getStaffId() != null) {
|
if (orderInfo.getStaffId() != null) {
|
||||||
ShopStaff detail = shopStaffService.getOne(new QueryWrapper().eq(ShopStaff::getId, orderInfo.getStaffId()).eq(ShopStaff::getShopId, orderInfo.getShopId()));
|
ShopStaff detail = shopStaffService.getOne(new QueryWrapper().eq(ShopStaff::getId, orderInfo.getStaffId()).eq(ShopStaff::getShopId, orderInfo.getShopId()));
|
||||||
if (detail != null) {
|
if (detail != null) {
|
||||||
@@ -780,10 +785,6 @@ public abstract class PrinterHandler {
|
|||||||
} else {
|
} else {
|
||||||
printInfoDTO.setOperator("");
|
printInfoDTO.setOperator("");
|
||||||
}
|
}
|
||||||
printInfoDTO.setSeatNum(orderInfo.getSeatNum() == null ? "" : orderInfo.getSeatNum().toString());
|
|
||||||
if (orderInfo.getSeatNum() != null && orderInfo.getSeatAmount().compareTo(BigDecimal.ZERO) > 0) {
|
|
||||||
printInfoDTO.setSeatAmount(orderInfo.getSeatAmount().divide(BigDecimal.valueOf(orderInfo.getSeatNum()), 2, RoundingMode.DOWN).toPlainString());
|
|
||||||
}
|
|
||||||
if ("结算单".equals(printTitle)) {
|
if ("结算单".equals(printTitle)) {
|
||||||
if (StrUtil.isNotBlank(orderInfo.getPayType())) {
|
if (StrUtil.isNotBlank(orderInfo.getPayType())) {
|
||||||
switch (orderInfo.getPayType()) {
|
switch (orderInfo.getPayType()) {
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ public interface PrinterImpl {
|
|||||||
.append(getFormatLabel("交班小票", signLabelInfo.s, signLabelInfo.center)).append(signLabelInfo.br)
|
.append(getFormatLabel("交班小票", signLabelInfo.s, signLabelInfo.center)).append(signLabelInfo.br)
|
||||||
.append(getFormatLabel("交班时间: " + DateUtil.format(handoverRecord.getHandoverTime(), "yyyy/MM/dd HH:mm:ss"), signLabelInfo.s)).append(signLabelInfo.br)
|
.append(getFormatLabel("交班时间: " + DateUtil.format(handoverRecord.getHandoverTime(), "yyyy/MM/dd HH:mm:ss"), signLabelInfo.s)).append(signLabelInfo.br)
|
||||||
.append(getFormatLabel("收银员: " + handoverRecord.getStaffName(), signLabelInfo.s)).append(signLabelInfo.br)
|
.append(getFormatLabel("收银员: " + handoverRecord.getStaffName(), signLabelInfo.s)).append(signLabelInfo.br)
|
||||||
.append(getFormatLabel("周期:" + DateUtil.format(handoverRecord.getLoginTime(), "MM/dd HH:mm") + "-" +
|
.append(getFormatLabel("周期: " + DateUtil.format(handoverRecord.getLoginTime(), "MM/dd HH:mm") + " - " +
|
||||||
DateUtil.format(handoverRecord.getHandoverTime(), "MM/dd HH:mm"), signLabelInfo.s)).append(signLabelInfo.br)
|
DateUtil.format(handoverRecord.getHandoverTime(), "MM/dd HH:mm"), signLabelInfo.s)).append(signLabelInfo.br)
|
||||||
|
|
||||||
.append(signLabelInfo.br)
|
.append(signLabelInfo.br)
|
||||||
@@ -222,8 +222,7 @@ public interface PrinterImpl {
|
|||||||
builder
|
builder
|
||||||
.append(getFormatLabel("打印时间: " + DateUtil.format(DateUtil.date(), "yyyy/MM/dd HH:mm:ss"), signLabelInfo.s)).append(signLabelInfo.br)
|
.append(getFormatLabel("打印时间: " + DateUtil.format(DateUtil.date(), "yyyy/MM/dd HH:mm:ss"), signLabelInfo.s)).append(signLabelInfo.br)
|
||||||
.append(signLabelInfo.getOut(180))
|
.append(signLabelInfo.getOut(180))
|
||||||
.append(signLabelInfo.cut)
|
.append(signLabelInfo.cut);
|
||||||
;
|
|
||||||
return builder.toString();
|
return builder.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user