|
|
@@ -797,16 +797,24 @@ public class LawyerConsultationOrderServiceImpl extends ServiceImpl<LawyerConsul
|
|
|
queryWrapper.groupBy("lco.order_status");
|
|
|
List<Map<String, Object>> statisticsInfo = consultationOrderMapper.getLawyerStatisticsInfo(queryWrapper);
|
|
|
|
|
|
-// // 统计进行中订单数量
|
|
|
-// int inProgressCount = statisticsInfo.containsKey("2")?Integer.parseInt(statisticsInfo.get("2").toString()): 0;
|
|
|
-// resultMap.put("lawyerInProgressOrderCount", inProgressCount);
|
|
|
-//
|
|
|
-// // 统计已完成订单数量
|
|
|
-// int completeCount = statisticsInfo.containsKey("3")?Integer.parseInt(statisticsInfo.get("3").toString()): 0;
|
|
|
-// resultMap.put("lawyerCompleteOrderCount", completeCount);
|
|
|
-//
|
|
|
-// // 统计订单总数
|
|
|
-// resultMap.put("lawyerOrderCount", inProgressCount + completeCount);
|
|
|
+ Map<Integer, Integer> statusCountMap = new HashMap<>();
|
|
|
+ for (Map<String, Object> map : statisticsInfo) {
|
|
|
+ Integer status = (Integer) map.get("status");
|
|
|
+ Long countLong = (Long) map.get("count"); // COUNT(*) 返回类型可能是Long
|
|
|
+ statusCountMap.put(status, countLong.intValue());
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ // 统计进行中订单数量
|
|
|
+ int inProgressCount = statusCountMap.containsKey(2)?Integer.parseInt(statisticsInfo.get(2).toString()): 0;
|
|
|
+ resultMap.put("lawyerInProgressOrderCount", inProgressCount);
|
|
|
+
|
|
|
+ // 统计已完成订单数量
|
|
|
+ int completeCount = statusCountMap.containsKey(3)?Integer.parseInt(statisticsInfo.get(3).toString()): 0;
|
|
|
+ resultMap.put("lawyerCompleteOrderCount", completeCount);
|
|
|
+
|
|
|
+ // 统计订单总数
|
|
|
+ resultMap.put("lawyerOrderCount", inProgressCount + completeCount);
|
|
|
|
|
|
// 设置订单列表
|
|
|
List<LawyerConsultationOrderVO> orderList = voPage != null && voPage.getRecords() != null
|