no commit message

This commit is contained in:
annnj-company
2026-04-27 10:10:35 +08:00
parent 68a0b1ab22
commit 6fc3e6b64f
19 changed files with 1058 additions and 64 deletions

View File

@@ -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();
}