排队小票问题

This commit is contained in:
2026-04-17 10:21:05 +08:00
parent b854c9bc0f
commit 021fd32228
8 changed files with 91 additions and 63 deletions

View File

@@ -13,6 +13,7 @@ import com.czg.config.RabbitPublisher;
import com.czg.config.RedisCst;
import com.czg.constants.ParamCodeCst;
import com.czg.exception.CzgException;
import com.czg.print.CallTablePrintDTO;
import com.czg.resp.CzgResult;
import com.czg.service.RedisService;
import com.czg.service.account.mapper.CallQueueMapper;
@@ -220,6 +221,21 @@ public class CallTableServiceImpl extends ServiceImpl<CallTableMapper, CallTable
callQueueService.save(callQueue);
CallTablePrintDTO callTablePrintDTO = new CallTablePrintDTO();
callTablePrintDTO.setCallQueue(callQueue);
callTablePrintDTO.setCallTable(callTable);
String callUrl = sysParamsService.getSysParamValue(ParamCodeCst.System.CALL_PAGE_URL);
if (StrUtil.isNotBlank(callUrl)) {
callTablePrintDTO.setCallUrl(StrUtil.format(callUrl, callQueue.getShopId(), callQueue.getId()));
} else {
callTablePrintDTO.setCallUrl("未配置页面");
}
long count = callQueueService.count(new QueryWrapper()
.eq(CallQueue::getShopId, callQueue.getShopId())
.eq(CallQueue::getCallTableId, callQueue.getCallTableId())
.lt(CallQueue::getId, callQueue.getId())
.in(CallQueue::getState, 0, 1));
callTablePrintDTO.setPreNum(count);
// 打印排号票信息
rabbitPublisher.sendOtherPrintMsg(callQueue.getShopId(), callQueue, "CALL");