正在显示
1 个修改的文件
包含
21 行增加
和
0 行删除
| @@ -22,6 +22,7 @@ use App\Models\Project\Project; | @@ -22,6 +22,7 @@ use App\Models\Project\Project; | ||
| 22 | use App\Utils\HttpUtils; | 22 | use App\Utils\HttpUtils; |
| 23 | use GuzzleHttp\Exception\GuzzleException; | 23 | use GuzzleHttp\Exception\GuzzleException; |
| 24 | use Illuminate\Http\Request; | 24 | use Illuminate\Http\Request; |
| 25 | +use Illuminate\Support\Collection; | ||
| 25 | use Illuminate\Support\Facades\DB; | 26 | use Illuminate\Support\Facades\DB; |
| 26 | use Illuminate\Support\Facades\Http; | 27 | use Illuminate\Support\Facades\Http; |
| 27 | 28 | ||
| @@ -68,6 +69,26 @@ class AdsController extends BaseController | @@ -68,6 +69,26 @@ class AdsController extends BaseController | ||
| 68 | $item['requiry_num'] = ReInquiryDetail::where('task_id', $item['id'])->where('status', ReInquiryDetail::STATUS_SUCCESS)->count(); | 69 | $item['requiry_num'] = ReInquiryDetail::where('task_id', $item['id'])->where('status', ReInquiryDetail::STATUS_SUCCESS)->count(); |
| 69 | $item['form_num'] = ReInquiryForm::whereIn('ad_id', explode(',', $item['ad_id']))->count(); | 70 | $item['form_num'] = ReInquiryForm::whereIn('ad_id', explode(',', $item['ad_id']))->count(); |
| 70 | //关联网站是否有重复的 | 71 | //关联网站是否有重复的 |
| 72 | + if($item['fob_pro']){ | ||
| 73 | + $fb_projects = ReInquiryCount::getFobProjects(); | ||
| 74 | + foreach ($item['fob_pro'] as $k => $fob_pro){ | ||
| 75 | + $repeat = ReInquiryTask::where('fob_pro', 'like', '%'.$fob_pro.'%')->where('id', '<>', $item['id'])->first(); | ||
| 76 | + $fob_info = collect($fb_projects)->where('postid', $fob_pro)->first(); | ||
| 77 | + $item['fob_pro'][$k] = [ | ||
| 78 | + 'is_repeat' => $repeat ? 1 : 0, | ||
| 79 | + 'project' => $fob_info['company'] . '('.$fob_info['plan'].')' | ||
| 80 | + ]; | ||
| 81 | + } | ||
| 82 | + } | ||
| 83 | + if($item['shop_site']) { | ||
| 84 | + foreach ($item['shop_site'] as $k => $site) { | ||
| 85 | + $repeat = ReInquiryTask::where('target', 'like', '%' . $site . '%')->where('id', '<>', $item['id'])->first(); | ||
| 86 | + $item['shop_site'][$k] = [ | ||
| 87 | + 'is_repeat' => $repeat ? 1 : 0, | ||
| 88 | + 'url' => $site, | ||
| 89 | + ]; | ||
| 90 | + } | ||
| 91 | + } | ||
| 71 | foreach ($item['target'] as $k=>$target){ | 92 | foreach ($item['target'] as $k=>$target){ |
| 72 | $repeat = ReInquiryTask::where('target', 'like', '%'.$target['url'].'%')->where('id', '<>', $item['id'])->first(); | 93 | $repeat = ReInquiryTask::where('target', 'like', '%'.$target['url'].'%')->where('id', '<>', $item['id'])->first(); |
| 73 | $item['target'][$k]['is_repeat'] = $repeat ? 1 : 0; | 94 | $item['target'][$k]['is_repeat'] = $repeat ? 1 : 0; |
-
请 注册 或 登录 后发表评论