作者 ZhengBing He

合并分支 'workorder' 到 'master'

plan



查看合并请求 !2299
... ... @@ -234,10 +234,12 @@ class FetchTicketProjects extends Command
}
foreach ($items as $item) {
$uuid = md5("AICC{$item['id']}");
$project = TicketProject::where('uuid', $uuid)->first();
foreach ($item['plans'] as $plan)
{
// 判断套餐是超迹还是域途, 如果 $item['plans'][0]['name'] 包含 '超迹' 则为超迹,否则为域途
$project_cate = Str::contains($item['plans'][0]['name'], '超迹') ? 3 : 4;
$project_cate = Str::contains($plan['name'], '超迹') ? 3 : 4;
$uuid = md5("AICC{$item['id']}{$project_cate}");
$project = TicketProject::where('uuid', $uuid)->first();
if ($project_cate == 3)
{
// 售后服务经理
... ... @@ -262,7 +264,7 @@ class FetchTicketProjects extends Command
$fields = [
'company_name' => $item['company'],
'title' => $item['company'] . " - " . $item['plan'],
'title' => $item['company'] . " - " . $plan['name'],
'assm_id' => $assm_id,
'seom_id' => $seom_id,
'engineer_id' => $engineer_id,
... ... @@ -299,6 +301,7 @@ class FetchTicketProjects extends Command
$lastid = $item['id'];
echo now() . " | INFO | AICC: {$item['id']} {$item['company']} fetch ok \n";
}
}
}catch (\Exception $exception){
echo now() . " | ERROR | " . $exception->getMessage() . "\n" . $exception->getTraceAsString() . "\n";
break;
... ...