Commit cb9a2d1b by wubh

包活干V2.0.0-修改:服务项目订单统计不统计订单数为空的

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@28416 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 480f9e73
...@@ -217,16 +217,19 @@ public class CarOrderServiceImpl extends BaseOrderService implements CarOrderSer ...@@ -217,16 +217,19 @@ public class CarOrderServiceImpl extends BaseOrderService implements CarOrderSer
// 统计所有未取消的订单 // 统计所有未取消的订单
req.setStatusList(null); req.setStatusList(null);
List<SysOrder> allOrderList = this.carOrderMapper.selectList(req); List<SysOrder> allOrderList = this.carOrderMapper.selectList(req);
// 统计未取消且已完成的订单 // 判断当前服务项目是否有订单,有则统计
req.setStatusList(Collections.singletonList( if (CollectionUtils.isNotEmpty(allOrderList)) {
OrderActiveStatusEnum.ORDER_ACTIVE_STATUS_FINISH.getActiveStatus())); // 统计未取消且已完成的订单
List<SysOrder> finishedOrderList = this.carOrderMapper.selectList(req); req.setStatusList(Collections.singletonList(
Map<String, Object> statusCountMap = new HashMap<>(4); OrderActiveStatusEnum.ORDER_ACTIVE_STATUS_FINISH.getActiveStatus()));
statusCountMap.put("serviceCode", serviceItem.getServiceCode()); List<SysOrder> finishedOrderList = this.carOrderMapper.selectList(req);
statusCountMap.put("serviceName", serviceItem.getServiceName()); Map<String, Object> statusCountMap = new HashMap<>(4);
statusCountMap.put("all", allOrderList.size()); statusCountMap.put("serviceCode", serviceItem.getServiceCode());
statusCountMap.put("finished", finishedOrderList.size()); statusCountMap.put("serviceName", serviceItem.getServiceName());
statusCountList.add(statusCountMap); statusCountMap.put("all", allOrderList.size());
statusCountMap.put("finished", finishedOrderList.size());
statusCountList.add(statusCountMap);
}
} }
return statusCountList; return statusCountList;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!