排队桌型列表添加总人数
This commit is contained in:
@@ -307,23 +307,23 @@ public class TbCallServiceImpl implements TbCallService {
|
||||
}
|
||||
Page<TbCallTable> pageInfo = callTableService.page(new Page<>(page, size), query);
|
||||
ArrayList<Map<String, Object>> info = new ArrayList<>();
|
||||
pageInfo.getRecords().forEach(item -> {
|
||||
Long totalCount = 0L;
|
||||
for (TbCallTable item : pageInfo.getRecords()) {
|
||||
LambdaQueryChainWrapper<TbCallQueue> q = callQueueService.lambdaQuery()
|
||||
.eq(TbCallQueue::getCreateDay, DateUtil.today())
|
||||
.in(TbCallQueue::getState, 0, 1);
|
||||
if (state == null) {
|
||||
q.eq(TbCallQueue::getCallTableId, item.getId());
|
||||
|
||||
}
|
||||
Long count = q.count();
|
||||
|
||||
totalCount += count;
|
||||
|
||||
Map<String, Object> map = BeanUtil.beanToMap(item, false, false);
|
||||
map.put("totalCount", count);
|
||||
info.add(map);
|
||||
});
|
||||
}
|
||||
|
||||
Map<String, Object> toMap = BeanUtil.beanToMap(pageInfo);
|
||||
toMap.put("records", info);
|
||||
toMap.put("totalCount", totalCount);
|
||||
return toMap;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user