fix配件车型占比 饼图,车型分组
This commit is contained in:
@@ -210,14 +210,19 @@ public class CarReservationInfoServiceImpl extends ServiceImpl<CarReservationInf
|
||||
//按车系组装数据
|
||||
for (Accessory acc : listByAccId) {
|
||||
Integer accValue = accNumList.get(acc.getId());
|
||||
if (accValue != null) {
|
||||
mergeMap.merge(acc.getMerId(), accValue, Integer::sum);
|
||||
} else {
|
||||
mergeMap.put(acc.getMerId(), 0);
|
||||
if (acc.getModelId() != null) {
|
||||
if (accValue != null) {
|
||||
mergeMap.merge(acc.getModelId(), accValue, Integer::sum);
|
||||
} else {
|
||||
mergeMap.put(acc.getModelId(), 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
Set<Integer> set = mergeMap.keySet();
|
||||
Map<Integer, CarModel> carModelMap = carModelService.getMapByIds(set);
|
||||
if (carModelMap == null) {
|
||||
return CollUtil.newArrayList();
|
||||
}
|
||||
List<PieChartResponse> resp = new ArrayList<>(set.size());
|
||||
for (Integer i : set) {
|
||||
PieChartResponse pie = new PieChartResponse();
|
||||
|
||||
Reference in New Issue
Block a user