台桌统计导出数据处理tableId为null的问题

This commit is contained in:
GYJ
2024-10-31 11:20:00 +08:00
parent c717d0f2c2
commit 5ef762f670
2 changed files with 14 additions and 5 deletions

View File

@@ -477,12 +477,14 @@ public class SummaryServiceImpl implements SummaryService {
shopTableSaleInfoDto.getShopId(), shopTableSaleInfoDto.getShopId(),
start, end); start, end);
Map<String, List<TbOrderSalesCountByTable>> ctMap = countByTables.stream() if (countByTables != null && !countByTables.isEmpty()) {
.collect(Collectors.groupingBy(TbOrderSalesCountByTable::getTableId)); Map<String, List<TbOrderSalesCountByTable>> ctMap = countByTables.stream()
.collect(Collectors.groupingBy(TbOrderSalesCountByTable::getTableId));
ctMap.forEach((k, v) -> { ctMap.forEach((k, v) -> {
countByTableMap.put(dateKey + "-" + k, v); countByTableMap.put(dateKey + "-" + k, v);
}); });
}
for (ShopTableSaleInfoVo infoVo : infoVos) { for (ShopTableSaleInfoVo infoVo : infoVos) {
tableCodeSet.add(infoVo.getTableCode()); tableCodeSet.add(infoVo.getTableCode());

View File

@@ -61,4 +61,11 @@ public class TbOrderSalesCountByTable {
salesNum=salesNum-refNum; salesNum=salesNum-refNum;
salesAmount=salesAmount.subtract(refAmount); salesAmount=salesAmount.subtract(refAmount);
} }
public String getTableId() {
if (tableId == null) {
return "";
}
return tableId;
}
} }