更新统计相关内容

This commit is contained in:
xuyuncong 2025-11-04 15:55:28 +08:00
parent 3dbb29ea39
commit 9f0f577b53

View File

@ -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;
}
}