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

@@ -2848,6 +2848,55 @@ EOF;
return $page;
}
/**
* 获取报告制作数量统计
* @return \think\response\Json
*/
public function getReportProduceCount() {
$pendingCount = Db::name('report')
->alias('r')
->join('inquiry i', 'r.quot_id = i.id', 'LEFT')
->where('r.report_source', 1)
->where('r.status', 1)
->where('r.create_time', 'gt', '2025-02-01 00:00:00');
$pending = $pendingCount->count();
// 二审待制作:以 pg_report 为主表review_status=1 且 status=2关联 pg_inquiry
$secondReviewCount = Db::name('report')
->alias('r')
->join('inquiry i', 'r.quot_id = i.id', 'LEFT')
->where('r.report_source', 1)
->where('r.review_status', 1)
->where('r.status', 2)
->where('r.create_time', 'gt', '2025-02-01 00:00:00')
->where('i.status', 7)
->group('r.quot_id');
$secondReview = $secondReviewCount->count();
// 三审待制作:以 pg_report 为主表review_status=2 且 review2_status=1 且 status=2关联 pg_inquiry
$thirdReviewCount = Db::name('report')
->alias('r')
->join('inquiry i', 'r.quot_id = i.id', 'LEFT')
->where('r.report_source', 1)
->where('r.review_status', 2)
->where('r.review2_status', 1)
->where('r.create_time', 'gt', '2025-02-01 00:00:00')
->where('r.status', 2);
$thirdReview = $thirdReviewCount->count();
// 计算总数
$total = $pending + $secondReview + $thirdReview;
return $this->buildSuccess([
'pending' => $pending,
'secondReview' => $secondReview,
'thirdReview' => $thirdReview,
'total' => $total
]);
}
public function cancelAntiCounterfeitCode()
{
$reportid = $this->request->post("reportid");