取号打票
This commit is contained in:
@@ -6,6 +6,7 @@ import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.extra.qrcode.QrCodeUtil;
|
||||
import cn.hutool.extra.qrcode.QrConfig;
|
||||
import cn.ysk.cashier.cons.RedisConstant;
|
||||
import cn.ysk.cashier.dto.CallNumPrintDTO;
|
||||
import cn.ysk.cashier.dto.calltable.*;
|
||||
import cn.ysk.cashier.exception.BadRequestException;
|
||||
import cn.ysk.cashier.mybatis.entity.TbCallConfig;
|
||||
@@ -20,12 +21,14 @@ import cn.ysk.cashier.pojo.shop.TbShopInfo;
|
||||
import cn.ysk.cashier.pojo.shop.TbShopUser;
|
||||
import cn.ysk.cashier.repository.shop.TbShopInfoRepository;
|
||||
import cn.ysk.cashier.service.app.TbCallService;
|
||||
import cn.ysk.cashier.utils.RabbitMsgUtils;
|
||||
import cn.ysk.cashier.utils.Utils;
|
||||
import cn.ysk.cashier.utils.WxMiniUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -35,9 +38,11 @@ import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class TbCallServiceImpl implements TbCallService {
|
||||
|
||||
@Value("${wx.mini.page.call}")
|
||||
private String callPageUrl;
|
||||
|
||||
private final TbCallTableService callTableService;
|
||||
private final TbCallQueueService callQueueService;
|
||||
private final TbShopUserMapper shopUserMapper;
|
||||
@@ -46,6 +51,19 @@ public class TbCallServiceImpl implements TbCallService {
|
||||
private final TbCallQueueMapper tbCallQueueMapper;
|
||||
private final WxMiniUtils wxMiniUtils;
|
||||
private final TbCallConfigService tbCallConfigService;
|
||||
private final RabbitMsgUtils rabbitMsgUtils;
|
||||
|
||||
public TbCallServiceImpl(TbCallTableService callTableService, TbCallQueueService callQueueService, TbShopUserMapper shopUserMapper, TbShopInfoRepository shopInfoRepository, StringRedisTemplate redisTemplate, TbCallQueueMapper tbCallQueueMapper, WxMiniUtils wxMiniUtils, TbCallConfigService tbCallConfigService, RabbitMsgUtils rabbitMsgUtils) {
|
||||
this.callTableService = callTableService;
|
||||
this.callQueueService = callQueueService;
|
||||
this.shopUserMapper = shopUserMapper;
|
||||
this.shopInfoRepository = shopInfoRepository;
|
||||
this.redisTemplate = redisTemplate;
|
||||
this.tbCallQueueMapper = tbCallQueueMapper;
|
||||
this.wxMiniUtils = wxMiniUtils;
|
||||
this.tbCallConfigService = tbCallConfigService;
|
||||
this.rabbitMsgUtils = rabbitMsgUtils;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object add(CallTableDTO addCallTableDTO) {
|
||||
@@ -186,6 +204,10 @@ public class TbCallServiceImpl implements TbCallService {
|
||||
callQueue.setShopName(shopInfo.getShopName());
|
||||
|
||||
callQueueService.save(callQueue);
|
||||
|
||||
// 打印排号票信息
|
||||
rabbitMsgUtils.printCallNumTicket(callQueue.getId(), callQueue.getShopId());
|
||||
|
||||
HashMap<String, Object> data = new HashMap<>();
|
||||
data.put("tableName", callTable.getName());
|
||||
data.put("tableNote", callTable.getNote());
|
||||
|
||||
Reference in New Issue
Block a user