作者 刘锟

update

@@ -66,13 +66,28 @@ class InquiryForwardLogic extends BaseLogic @@ -66,13 +66,28 @@ class InquiryForwardLogic extends BaseLogic
66 { 66 {
67 $lists = $this->model->lists($map, $page, $row, $order, $filed); 67 $lists = $this->model->lists($map, $page, $row, $order, $filed);
68 //统计各个状态询盘总数 68 //统计各个状态询盘总数
69 - $all_count = $this->model->counts($map);  
70 - $map['status'] = InquiryInfo::STATUS_INIT;  
71 - $un_count = $this->model->counts($map);  
72 - $map['status'] = InquiryInfo::STATUS_FINISH;  
73 - $suc_count = $this->model->counts($map);  
74 - $map['status'] = InquiryInfo::STATUS_INVALID;  
75 - $inv_count = $this->model->counts($map); 69 + $all_count = $un_count = $suc_count = $inv_count = 0;
  70 + if(isset($map['status'])){
  71 + switch ($map['status']){
  72 + case 1:
  73 + $suc_count = $lists['total'];
  74 + break;
  75 + case 2:
  76 + $inv_count = $lists['total'];
  77 + break;
  78 + default:
  79 + $un_count = $lists['total'];
  80 + }
  81 + }else{
  82 + $all_count = $this->model->counts($map);
  83 + $map['status'] = InquiryInfo::STATUS_INIT;
  84 + $un_count = $this->model->counts($map);
  85 + $map['status'] = InquiryInfo::STATUS_FINISH;
  86 + $suc_count = $this->model->counts($map);
  87 + $map['status'] = InquiryInfo::STATUS_INVALID;
  88 + $inv_count = $this->model->counts($map);
  89 + }
  90 +
76 $lists['count_stat'] = [ 91 $lists['count_stat'] = [
77 'all_count' => $all_count, 92 'all_count' => $all_count,
78 'un_count' => $un_count, 93 'un_count' => $un_count,