更新统计相关内容
This commit is contained in:
parent
3dbb29ea39
commit
9f0f577b53
@ -729,6 +729,7 @@ public class RepairStatisticsServiceImpl implements RepairStatisticsService {
|
||||
newOrderNode.put("selectType", "jinchang");
|
||||
newOrderNode.put("total", workerStat.get("ticketCount"));
|
||||
statsList.add(newOrderNode);
|
||||
respMap.put("count", workerStat.get("ticketCount"));
|
||||
|
||||
// 添加维修中统计
|
||||
Map<String, Object> workingNode = new HashMap<>();
|
||||
@ -762,6 +763,18 @@ public class RepairStatisticsServiceImpl implements RepairStatisticsService {
|
||||
}
|
||||
}
|
||||
|
||||
// 排序:根据 count 字段降序
|
||||
resp.sort((a, b) -> {
|
||||
Object countA = a.get("count");
|
||||
Object countB = b.get("count");
|
||||
|
||||
if (countA == null) return 1;
|
||||
if (countB == null) return -1;
|
||||
|
||||
int valA = Integer.parseInt(countA.toString());
|
||||
int valB = Integer.parseInt(countB.toString());
|
||||
return Integer.compare(valB, valA); // 降序
|
||||
});
|
||||
return resp;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user