|
...
|
...
|
@@ -22,6 +22,7 @@ use App\Models\Project\Project; |
|
|
|
use App\Utils\HttpUtils;
|
|
|
|
use GuzzleHttp\Exception\GuzzleException;
|
|
|
|
use Illuminate\Http\Request;
|
|
|
|
use Illuminate\Support\Collection;
|
|
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
use Illuminate\Support\Facades\Http;
|
|
|
|
|
|
...
|
...
|
@@ -68,6 +69,26 @@ class AdsController extends BaseController |
|
|
|
$item['requiry_num'] = ReInquiryDetail::where('task_id', $item['id'])->where('status', ReInquiryDetail::STATUS_SUCCESS)->count();
|
|
|
|
$item['form_num'] = ReInquiryForm::whereIn('ad_id', explode(',', $item['ad_id']))->count();
|
|
|
|
//关联网站是否有重复的
|
|
|
|
if($item['fob_pro']){
|
|
|
|
$fb_projects = ReInquiryCount::getFobProjects();
|
|
|
|
foreach ($item['fob_pro'] as $k => $fob_pro){
|
|
|
|
$repeat = ReInquiryTask::where('fob_pro', 'like', '%'.$fob_pro.'%')->where('id', '<>', $item['id'])->first();
|
|
|
|
$fob_info = collect($fb_projects)->where('postid', $fob_pro)->first();
|
|
|
|
$item['fob_pro'][$k] = [
|
|
|
|
'is_repeat' => $repeat ? 1 : 0,
|
|
|
|
'project' => $fob_info['company'] . '('.$fob_info['plan'].')'
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if($item['shop_site']) {
|
|
|
|
foreach ($item['shop_site'] as $k => $site) {
|
|
|
|
$repeat = ReInquiryTask::where('target', 'like', '%' . $site . '%')->where('id', '<>', $item['id'])->first();
|
|
|
|
$item['shop_site'][$k] = [
|
|
|
|
'is_repeat' => $repeat ? 1 : 0,
|
|
|
|
'url' => $site,
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
foreach ($item['target'] as $k=>$target){
|
|
|
|
$repeat = ReInquiryTask::where('target', 'like', '%'.$target['url'].'%')->where('id', '<>', $item['id'])->first();
|
|
|
|
$item['target'][$k]['is_repeat'] = $repeat ? 1 : 0;
|
...
|
...
|
|