排队小票问题

This commit is contained in:
2026-04-17 10:43:02 +08:00
parent 89e00d5e97
commit 8117e12108
2 changed files with 15 additions and 13 deletions

View File

@@ -32,6 +32,7 @@ import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.data.redis.core.StringRedisTemplate;
import java.io.ByteArrayOutputStream;
import java.time.LocalDateTime;
import java.util.*;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
@@ -218,7 +219,7 @@ public class CallTableServiceImpl extends ServiceImpl<CallTableMapper, CallTable
callQueue.setCallNum(getCallNumber(shopId, callTable));
callQueue.setShopId(shopId);
callQueue.setShopName(shopInfo.getShopName());
callQueue.setCreateTime(LocalDateTime.now());
callQueueService.save(callQueue);
CallTablePrintDTO callTablePrintDTO = new CallTablePrintDTO();
@@ -442,17 +443,17 @@ public class CallTableServiceImpl extends ServiceImpl<CallTableMapper, CallTable
}
}
List<CallQueue> current = callQueueService.queryChain()
.eq(CallQueue::getCallTableId, callQueue.getCallTableId())
.eq(CallQueue::getCreateDay, DateUtil.today())
.and(r -> {
r.eq(CallQueue::getState, 1)
.or(q -> {
q.eq(CallQueue::getState, 0);
});
})
.orderBy(CallQueue::getCreateTime, true)
.page(new Page<>(1, 1)).getRecords();
// List<CallQueue> current = callQueueService.queryChain()
// .eq(CallQueue::getCallTableId, callQueue.getCallTableId())
// .eq(CallQueue::getCreateDay, DateUtil.today())
// .and(r -> {
// r.eq(CallQueue::getState, 1)
// .or(q -> {
// q.eq(CallQueue::getState, 0);
// });
// })
// .orderBy(CallQueue::getCreateTime, true)
// .page(new Page<>(1, 1)).getRecords();
// wxMiniUtils.sendPassCallMsg(shopInfo.getShopName(), getStrByState(Integer.valueOf(updateCallQueueDTO.getState())),
// callQueue.getCallNum(), current.isEmpty() ? "" : current.get(0).getCallNum(), "即将过号", callQueue.getOpenId());
break;

View File

@@ -824,7 +824,8 @@ public interface PrinterImpl {
signLabelInfo.br +
getFormatLabel(printDTO.getCallUrl(), signLabelInfo.center, signLabelInfo.qr) +
signLabelInfo.br + getDividingLine() + signLabelInfo.br +
getFormatLabel(StrUtil.format("过号顺延{}桌 {}桌后需重新排号 谢谢理解!", callTable.getPostponeNum(), callTable.getPostponeNum()), signLabelInfo.s) +
getFormatLabel("描述:" + callTable.getNote(), signLabelInfo.s) +
getFormatLabel(StrUtil.format("过号顺延{}桌 {}桌后需重新排号", callTable.getPostponeNum(), callTable.getPostponeNum()), signLabelInfo.s) +
getFormatLabel(StrUtil.format("取号时间: {}", DateUtil.format(callQueue.getCreateTime(), "yyyy-MM-dd HH:mm:ss")), signLabelInfo.s) +
signLabelInfo.br +
signLabelInfo.getOut(150) + signLabelInfo.cut;