1.排队取号 排号列表修改
This commit is contained in:
@@ -25,8 +25,10 @@ import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
@Service
|
||||
@@ -113,7 +115,20 @@ public class TbCallServiceImpl implements TbCallService {
|
||||
|
||||
@Override
|
||||
public Object getAllInfo(Integer shopId) {
|
||||
return callTableService.lambdaQuery().eq(TbCallTable::getShopId, shopId).eq(TbCallTable::getState, 1).list();
|
||||
ArrayList<Map<String, Object>> infoList = new ArrayList<>();
|
||||
List<TbCallTable> list = callTableService.lambdaQuery()
|
||||
.eq(TbCallTable::getShopId, shopId).list();
|
||||
list.forEach(item -> {
|
||||
Map<String, Object> map = BeanUtil.beanToMap(item, false, false);
|
||||
Integer count = callQueueService.lambdaQuery()
|
||||
.eq(TbCallQueue::getCallTableId, item.getId())
|
||||
.eq(TbCallQueue::getShopId, shopId)
|
||||
.in(TbCallQueue::getState, 0, 1).count();
|
||||
map.put("waitingCount", count);
|
||||
map.put("waitTime", count * item.getWaitTime());
|
||||
infoList.add(map);
|
||||
});
|
||||
return infoList;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user