update
This commit is contained in:
parent
308348f883
commit
8bc05198d1
@ -60,55 +60,47 @@
|
|||||||
//投标项目状态明细表
|
//投标项目状态明细表
|
||||||
public function bid_project_status(): Json
|
public function bid_project_status(): Json
|
||||||
{
|
{
|
||||||
$status = [0 => '未启动投标', 1 => '参与投标', 2 => '未开标', 3 => '已中标', 4 => '未中标'];
|
$column = [0 => '未启动投标', 1 => '参与投标', 2 => '未开标', 3 => '已中标', 4 => '未中标'];
|
||||||
$data = [];
|
$data = [];
|
||||||
foreach ($status as $k => $v) {
|
foreach ($column as $k => $v) {
|
||||||
$count = MarketingBusinessOpportunity::field('id')->where('status', $k)->count();
|
$count = MarketingBusinessOpportunity::field('id')->where('status', $k)->count();
|
||||||
$data[] = [
|
$data[] = [
|
||||||
'name' => $v,
|
'name' => $v,
|
||||||
'value' => $count
|
'value' => $count
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
return $this->success('success', compact('status', 'data'));
|
return $this->success('success', compact('column', 'data'));
|
||||||
}
|
}
|
||||||
|
|
||||||
//投标项目数量明细表
|
//投标项目数量明细表
|
||||||
public function bid_project_number(): Json
|
public function bid_project_number(): Json
|
||||||
{
|
{
|
||||||
$column = [0 => '未启动投标', 1 => '参与投标', 2 => '未开标', 3 => '已中标', 4 => '未中标'];
|
$column = [0 => '未启动投标', 1 => '参与投标', 2 => '未开标', 3 => '已中标', 4 => '未中标'];
|
||||||
$series = [
|
$data = [];
|
||||||
'name' => '数量',
|
|
||||||
'data' => []
|
|
||||||
];
|
|
||||||
foreach ($column as $k => $v) {
|
foreach ($column as $k => $v) {
|
||||||
$series['data'][] = MarketingBusinessOpportunity::field('id')->where('status', $k)->count();
|
$data[] = [
|
||||||
}
|
'name' => $v,
|
||||||
$result = [
|
'value' => MarketingBusinessOpportunity::field('id')->where('status', $k)->count()
|
||||||
'column' => $column,
|
|
||||||
'series' => $series
|
|
||||||
];
|
];
|
||||||
return $this->success('success', $result);
|
}
|
||||||
|
return $this->success('success', compact('column', 'data'));
|
||||||
}
|
}
|
||||||
|
|
||||||
//投标项目分析
|
//投标项目分析
|
||||||
public function bid_project_analysis(): Json
|
public function bid_project_analysis(): Json
|
||||||
{
|
{
|
||||||
$column = DictData::where('type_value', 'cost_consultation_business_nature')->column('name', 'value');
|
$column = DictData::where('type_value', 'cost_consultation_business_nature')->column('name', 'value');
|
||||||
$series = [
|
$data = [];
|
||||||
'name' => '数量',
|
|
||||||
'data' => []
|
|
||||||
];
|
|
||||||
foreach ($column as $k => $v) {
|
foreach ($column as $k => $v) {
|
||||||
$business_opportunity_ids = MarketingBusinessOpportunity::where('business_nature', $k)->column('id');
|
$business_opportunity_ids = MarketingBusinessOpportunity::where('business_nature', $k)->column('id');
|
||||||
$bid_evaluation_ids = MarketingBidEvaluation::where('business_opportunity_id', 'in', $business_opportunity_ids)->column('id');
|
$bid_evaluation_ids = MarketingBidEvaluation::where('business_opportunity_id', 'in', $business_opportunity_ids)->column('id');
|
||||||
$bid_info_ids = MarketingBidInfo::where('bid_evaluation_id', 'in', $bid_evaluation_ids)->column('id');
|
$bid_info_ids = MarketingBidInfo::where('bid_evaluation_id', 'in', $bid_evaluation_ids)->column('id');
|
||||||
$series['data'][] = MarketingBidResult::field('id')->where('bid_info_id', 'in', $bid_info_ids)->where('bid_result', 0)->count();
|
$data[] = [
|
||||||
}
|
'name' => $v,
|
||||||
$result = [
|
'value' => MarketingBidResult::field('id')->where('bid_info_id', 'in', $bid_info_ids)->where('bid_result', 0)->count()
|
||||||
'column' => $column,
|
|
||||||
'series' => $series
|
|
||||||
];
|
];
|
||||||
return $this->success('success', $result);
|
}
|
||||||
|
return $this->success('success', compact('column', 'data'));
|
||||||
}
|
}
|
||||||
|
|
||||||
//行业投标分析
|
//行业投标分析
|
||||||
|
Loading…
x
Reference in New Issue
Block a user