no commit message
This commit is contained in:
@@ -44,6 +44,56 @@ class Pending extends Base
|
||||
return $this->buildSuccess(['count' => $count]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取报告制作数量(status=9)
|
||||
* @return \think\Response
|
||||
*/
|
||||
public function getReportPendingCount()
|
||||
{
|
||||
$Inquiry = new Inquiry();
|
||||
|
||||
// 查询 status = 9 的数量
|
||||
$count = $Inquiry->where('status', 9)->count();
|
||||
|
||||
return $this->buildSuccess(['count' => $count]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有预估状态数量
|
||||
* @return \think\Response
|
||||
*/
|
||||
public function getEstimatePendingCount()
|
||||
{
|
||||
$Inquiry = new Inquiry();
|
||||
|
||||
// 待制作:status=9
|
||||
$pendingCount = $Inquiry->where('status', 9)->count();
|
||||
|
||||
// 二审待制作:status=10 且 estimate_status=2
|
||||
$secondReviewCount = $Inquiry->where('status', 10)
|
||||
->where('estimate_status', '=', '2', false)
|
||||
->count();
|
||||
|
||||
// 三审待制作:status=10 且 estimate_status=3
|
||||
$thirdReviewCount = $Inquiry->where('status', 10)
|
||||
->where('estimate_status', '=', '3', false)
|
||||
->count();
|
||||
|
||||
// 待签章:status=11
|
||||
$signCount = $Inquiry->where('status', 11)->count();
|
||||
|
||||
// 总和
|
||||
$total = $pendingCount + $secondReviewCount + $thirdReviewCount + $signCount;
|
||||
|
||||
return $this->buildSuccess([
|
||||
'pending' => $pendingCount,
|
||||
'secondReview' => $secondReviewCount,
|
||||
'thirdReview' => $thirdReviewCount,
|
||||
'sign' => $signCount,
|
||||
'total' => $total
|
||||
]);
|
||||
}
|
||||
|
||||
//询价编号前缀 - 住宅
|
||||
const INQUERY_NUMBER_RESIDENCE_PREFIX = "GZ01";
|
||||
|
||||
@@ -3687,6 +3737,9 @@ class Pending extends Base
|
||||
return $this->buildFailed("确认回价失败");
|
||||
}
|
||||
|
||||
// 推送预估数量更新到前端
|
||||
fetchAndPushEstimatePendingCount();
|
||||
|
||||
return $this->buildSuccess();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user