作者 ZhengBing He

合并分支 'workorder' 到 'master'

plan



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