作者 刘锟

update

@@ -66,28 +66,16 @@ class InquiryForwardLogic extends BaseLogic @@ -66,28 +66,16 @@ 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 - $un_count = $suc_count = $inv_count = 0;  
70 if (isset($map['status'])) { 69 if (isset($map['status'])) {
71 - $all_count = $lists['total'];  
72 - switch ($map['status']) {  
73 - case 1:  
74 - $suc_count = $lists['total'];  
75 - break;  
76 - case 2:  
77 - $inv_count = $lists['total'];  
78 - break;  
79 - default:  
80 - $un_count = $lists['total'];  
81 - }  
82 - } else {  
83 - $all_count = $this->model->counts($map);  
84 - $map['status'] = InquiryInfo::STATUS_INIT;  
85 - $un_count = $this->model->counts($map);  
86 - $map['status'] = InquiryInfo::STATUS_FINISH;  
87 - $suc_count = $this->model->counts($map);  
88 - $map['status'] = InquiryInfo::STATUS_INVALID;  
89 - $inv_count = $this->model->counts($map); 70 + unset($map['status']);
90 } 71 }
  72 + $all_count = $this->model->counts($map);
  73 + $map['status'] = InquiryInfo::STATUS_INIT;
  74 + $un_count = $this->model->counts($map);
  75 + $map['status'] = InquiryInfo::STATUS_FINISH;
  76 + $suc_count = $this->model->counts($map);
  77 + $map['status'] = InquiryInfo::STATUS_INVALID;
  78 + $inv_count = $this->model->counts($map);
91 79
92 $lists['count_stat'] = [ 80 $lists['count_stat'] = [
93 'all_count' => $all_count, 81 'all_count' => $all_count,