交班问题

This commit is contained in:
2026-04-16 18:14:58 +08:00
parent 5e40f91bea
commit b854c9bc0f
3 changed files with 6 additions and 4 deletions

View File

@@ -85,7 +85,7 @@ public class PrintMqListener {
String printTypeEnum = jsonObject.getString("printTypeEnum");
JSONObject data2 = jsonObject.getJSONObject("data");
PrinterHandler.PrintTypeEnum typeEnum = PrinterHandler.PrintTypeEnum.valueOf(printTypeEnum);
if (typeEnum == PrinterHandler.PrintTypeEnum.HANDOVER) {
if (typeEnum != PrinterHandler.PrintTypeEnum.HANDOVER) {
SysPrintData sysPrintData = new SysPrintData();
sysPrintData.setShopId(shopId);
sysPrintData.setData(data2.toJSONString());

View File

@@ -99,6 +99,7 @@ public class HandoverRecordServiceImpl extends ServiceImpl<HandoverRecordMapper,
if (handoverRecord != null) {
data.setTurnover(NumberUtil.add(data.getTurnover(), handoverRecord.getRecharge()));
data.setRefundAmount(NumberUtil.add(data.getRefundAmount(), handoverRecord.getRefundAmount()));
data.setRecharge(handoverRecord.getRecharge());
}
data.setReturnDishCount(orderInfoRpcService.countReturnDish(shopId, loginTimeStr, handoverTimeStr));
return data;

View File

@@ -164,12 +164,13 @@ public interface PrinterImpl {
.append(getFormatLabel(leftRightAlign(" 退款金额:", bigDecimalToString(handoverRecord.getRefundAmount()), 32), signLabelInfo.s)).append(signLabelInfo.br)
.append(getFormatLabel(leftRightAlign(" 退菜数量:", bigDecimalToString(handoverRecord.getReturnDishCount()), 32), signLabelInfo.s)).append(signLabelInfo.br)
.append(getDividingLine()).append(signLabelInfo.br)
.append(getFormatLabel(leftRightAlign("订单数量/订单总额", handoverRecord.getOrderCount() + "/" + handoverRecord.getOrderTurnover(), 32), signLabelInfo.s)).append(signLabelInfo.br)
.append(getFormatLabel("----------- 销售数据 -----------", signLabelInfo.s)).append(signLabelInfo.br)
.append(getFormatLabel(key3("商品分类", "数量", "总计", 14, 8), signLabelInfo.s))
.append(getFormatLabel(leftRightAlign("订单数量/订单总额", handoverRecord.getOrderCount() + "/" + bigDecimalToString(handoverRecord.getOrderTurnover()), 32), signLabelInfo.s))
.append(signLabelInfo.br);
if (StrUtil.isNotBlank(handoverRecord.getCategoryData())) {
builder.append(getFormatLabel("----------- 销售数据 -----------", signLabelInfo.s)).append(signLabelInfo.br)
.append(getFormatLabel(key3("商品分类", "数量", "总计", 14, 8), signLabelInfo.s))
.append(signLabelInfo.br);
JSONArray.parseArray(handoverRecord.getCategoryData()).forEach(item -> {
JSONObject info = (JSONObject) item;
String categoryName = info.getString("categoryName");