fix: 订单路线多选,路线字段调整,多个用逗号分隔

This commit is contained in:
chenxiky 2025-07-13 11:06:14 +08:00
parent 930fec0c57
commit 94a164213b
2 changed files with 3 additions and 3 deletions

View File

@ -61,9 +61,9 @@ public class OrderMain extends BaseEntity {
private String customerName; private String customerName;
/** /**
* 路线ID * 路线ID,多个用逗号分隔
*/ */
private Long routeId; private String routeIds;
/** /**
* 订单金额 * 订单金额

View File

@ -413,7 +413,7 @@ public class OrderAnalysisServiceImpl implements OrderAnalysisService {
// 遍历所有订单统计各路线的订单数量 // 遍历所有订单统计各路线的订单数量
for (OrderMain order : orders) { for (OrderMain order : orders) {
Long routeId = order.getRouteId(); Long routeId =0L; // TODO 这里路线可能存在多个
String routeName = cpRouteMapper.getNameById(routeId); String routeName = cpRouteMapper.getNameById(routeId);
if (routeName != null) { if (routeName != null) {
routeDistribution.put(routeName, routeDistribution.getOrDefault(routeName, 0L) + 1); routeDistribution.put(routeName, routeDistribution.getOrDefault(routeName, 0L) + 1);