|
...
|
...
|
@@ -589,29 +589,42 @@ class ProjectController extends BaseController |
|
|
|
$query->where('company', 'like', '%' . $company . '%');
|
|
|
|
}
|
|
|
|
})->orderBy('id', 'desc')->paginate($size)->toArray();
|
|
|
|
$list = [];
|
|
|
|
foreach ($data['list'] as $item){
|
|
|
|
$item['type_text'] = Project::typeMap()[$item['type']] ?? '';
|
|
|
|
$item['plan_text'] = Project::planMap()[$item['deploy_build']['plan']] ?? '';
|
|
|
|
$item['start_date'] = $item['deploy_optimize']['start_date'] ?? '';
|
|
|
|
$item['domain'] = $item['deploy_optimize']['domain'] ?? '';
|
|
|
|
$item['test_domain'] = $item['deploy_build']['test_domain'] ?? '';
|
|
|
|
$item['online_time'] = $item['online_check']['qa_check_time'] ?? '';
|
|
|
|
$param = [
|
|
|
|
"id" => $item['id'],
|
|
|
|
"title" => $item['title'],
|
|
|
|
"type" => $item['type'],
|
|
|
|
"type_text" => Project::typeMap()[$item['type']] ?? '',
|
|
|
|
"channel" => $item['channel'],
|
|
|
|
"created_at" => $item['created_at'],
|
|
|
|
"updated_at" => $item['updated_at'],
|
|
|
|
"post_id" => $item['post_id'],
|
|
|
|
"from_order_id" => $item['from_order_id'],
|
|
|
|
"remain_day" => $item['remain_day'],
|
|
|
|
"last_inquiry_time" => $item['last_inquiry_time'],
|
|
|
|
"online_check" => $item['remain_day'],
|
|
|
|
"plan" => $item['deploy_build']['plan'] ?: 0,
|
|
|
|
"plan_text" => Project::planMap()[$item['deploy_build']['plan']] ?? '',
|
|
|
|
"start_date" => $item['deploy_optimize']['start_date'] ?? '',
|
|
|
|
"domain" => $item['deploy_optimize']['domain'] ?? '',
|
|
|
|
"test_domain" => $item['deploy_build']['test_domain'] ?? '',
|
|
|
|
"online_time" => $item['online_check']['qa_check_time'] ?? '',
|
|
|
|
];
|
|
|
|
if ($item['type'] == 3) {
|
|
|
|
$item['is_compliance'] = RankData::where('project_id', $item['id'])->where('lang', '')->value('is_compliance') ?: 0;
|
|
|
|
$param['is_compliance'] = RankData::where('project_id', $item['id'])->where('lang', '')->value('is_compliance') ?: 0;
|
|
|
|
} else {
|
|
|
|
$item['is_compliance'] = 1;
|
|
|
|
$param['is_compliance'] = 1;
|
|
|
|
}
|
|
|
|
$yesterday_count = Count::where('project_id', $item['id'])->where('date', date('Y-m-d', strtotime('-1 day')))->first();
|
|
|
|
$today_count = Count::where('project_id', $item['id'])->where('date', date('Y-m-d'))->first();
|
|
|
|
$item['yesterday_ip_count'] = $yesterday_count['ip_num'] ?? 0;
|
|
|
|
$item['to_ip_count'] = $today_count['ip_num'] ?? 0;
|
|
|
|
$item['inquiry_num'] = $today_count['inquiry_num'] ?? 0;
|
|
|
|
$param['yesterday_ip_count'] = $yesterday_count['ip_num'] ?? 0;
|
|
|
|
$param['to_ip_count'] = $today_count['ip_num'] ?? 0;
|
|
|
|
$param['inquiry_num'] = $today_count['inquiry_num'] ?? 0;
|
|
|
|
|
|
|
|
unset($item['deploy_build']);
|
|
|
|
unset($item['deploy_optimize']);
|
|
|
|
unset($item['online_check']);
|
|
|
|
$list[] = $param;
|
|
|
|
}
|
|
|
|
|
|
|
|
$this->response('success',Code::SUCCESS, $data);
|
|
|
|
$this->response('success',Code::SUCCESS, $list);
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|