作者 刘锟

update

... ... @@ -66,12 +66,18 @@ class InquiryForwardLogic extends BaseLogic
{
$lists = $this->model->lists($map, $page, $row, $order, $filed);
//统计各个状态询盘总数
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' => $this->formatQuery($map,new InquiryInfo())->count(),
'un_count' => $this->formatQuery($map,new InquiryInfo())->where('status', InquiryInfo::STATUS_INIT)->count(),
'suc_count' => $this->formatQuery($map,new InquiryInfo())->where('status', InquiryInfo::STATUS_FINISH)->count(),
'inv_count' => $this->formatQuery($map,new InquiryInfo())->where('status', InquiryInfo::STATUS_INVALID)->count(),
'all_count' => $all_count,
'un_count' => $un_count,
'suc_count' => $suc_count,
'inv_count' => $inv_count,
];
return $this->success($lists);
... ...