作者 刘锟

update

... ... @@ -66,28 +66,16 @@ class InquiryForwardLogic extends BaseLogic
{
$lists = $this->model->lists($map, $page, $row, $order, $filed);
//统计各个状态询盘总数
$un_count = $suc_count = $inv_count = 0;
if (isset($map['status'])) {
$all_count = $lists['total'];
switch ($map['status']) {
case 1:
$suc_count = $lists['total'];
break;
case 2:
$inv_count = $lists['total'];
break;
default:
$un_count = $lists['total'];
}
} else {
$all_count = $this->model->counts($map);
$map['status'] = InquiryInfo::STATUS_INIT;
$un_count = $this->model->counts($map);
$map['status'] = InquiryInfo::STATUS_FINISH;
$suc_count = $this->model->counts($map);
$map['status'] = InquiryInfo::STATUS_INVALID;
$inv_count = $this->model->counts($map);
unset($map['status']);
}
$all_count = $this->model->counts($map);
$map['status'] = InquiryInfo::STATUS_INIT;
$un_count = $this->model->counts($map);
$map['status'] = InquiryInfo::STATUS_FINISH;
$suc_count = $this->model->counts($map);
$map['status'] = InquiryInfo::STATUS_INVALID;
$inv_count = $this->model->counts($map);
$lists['count_stat'] = [
'all_count' => $all_count,
... ...