Merge remote-tracking branch 'origin/master' into akun
正在显示
8 个修改的文件
包含
18 行增加
和
27 行删除
| @@ -120,7 +120,7 @@ class RemainDay extends Command | @@ -120,7 +120,7 @@ class RemainDay extends Command | ||
| 120 | //白帽版本的系统 | 120 | //白帽版本的系统 |
| 121 | if($deploy_build['seo_plan'] == 1){ | 121 | if($deploy_build['seo_plan'] == 1){ |
| 122 | if($deploy_build['seo_service_duration'] != 0){ | 122 | if($deploy_build['seo_service_duration'] != 0){ |
| 123 | - if(in_array($item['id'],$this->bm_projectId) || (strpos($item['level'], '19') !== false)){ | 123 | + if(in_array($item['id'],$this->bm_projectId) || (in_array( 19,$item['level']))){ |
| 124 | $compliance_day = (int)$item['bm_finish_remain_day']; | 124 | $compliance_day = (int)$item['bm_finish_remain_day']; |
| 125 | $seo_remain_day = $deploy_build['seo_service_duration'] - (int)$item['bm_finish_remain_day']; | 125 | $seo_remain_day = $deploy_build['seo_service_duration'] - (int)$item['bm_finish_remain_day']; |
| 126 | }else{ | 126 | }else{ |
| @@ -76,7 +76,7 @@ class TicketCount extends Command | @@ -76,7 +76,7 @@ class TicketCount extends Command | ||
| 76 | $date = Carbon::yesterday()->toDateString(); // 昨日时间 | 76 | $date = Carbon::yesterday()->toDateString(); // 昨日时间 |
| 77 | $ticketManageCountModel = new TicketDailyManageCount(); | 77 | $ticketManageCountModel = new TicketDailyManageCount(); |
| 78 | foreach ($manageList as $item){ | 78 | foreach ($manageList as $item){ |
| 79 | - $average_time = ''; | 79 | + $average_time = null; |
| 80 | $this->output('按人员统计:执行的人员名称/id:'.$item['name'].'/'.$item['manage_id']); | 80 | $this->output('按人员统计:执行的人员名称/id:'.$item['name'].'/'.$item['manage_id']); |
| 81 | $ticketLogModel = new TicketLog(); | 81 | $ticketLogModel = new TicketLog(); |
| 82 | $ticket_num = $ticketLogModel->counts(['engineer_id'=>$item['manage_id'],'is_engineer'=>1]); | 82 | $ticket_num = $ticketLogModel->counts(['engineer_id'=>$item['manage_id'],'is_engineer'=>1]); |
| @@ -88,6 +88,9 @@ class TicketCount extends Command | @@ -88,6 +88,9 @@ class TicketCount extends Command | ||
| 88 | } | 88 | } |
| 89 | //最快完成的时间 | 89 | //最快完成的时间 |
| 90 | $fastest_time = $ticketLogModel->formatQuery(['engineer_id'=>$item['manage_id'],'is_engineer'=>1,'end_at'=>['!=',null]])->min('end_time'); | 90 | $fastest_time = $ticketLogModel->formatQuery(['engineer_id'=>$item['manage_id'],'is_engineer'=>1,'end_at'=>['!=',null]])->min('end_time'); |
| 91 | + if(!$fastest_time){ | ||
| 92 | + $fastest_time = null; | ||
| 93 | + } | ||
| 91 | //超时工单数量 | 94 | //超时工单数量 |
| 92 | $timeout_num = $ticketLogModel->counts(['end_at'=>null,'engineer_id'=>$item['manage_id'],'is_engineer'=>1,'plan_end_at'=>['>',date('Y-m-d H:i:s')]]); | 95 | $timeout_num = $ticketLogModel->counts(['end_at'=>null,'engineer_id'=>$item['manage_id'],'is_engineer'=>1,'plan_end_at'=>['>',date('Y-m-d H:i:s')]]); |
| 93 | $complete_num = $ticketLogModel->counts(['end_at'=>['!=',null],'engineer_id'=>$item['manage_id'],'is_engineer'=>1]); | 96 | $complete_num = $ticketLogModel->counts(['end_at'=>['!=',null],'engineer_id'=>$item['manage_id'],'is_engineer'=>1]); |
| @@ -96,8 +99,8 @@ class TicketCount extends Command | @@ -96,8 +99,8 @@ class TicketCount extends Command | ||
| 96 | 'manage_id'=>$item['id'], | 99 | 'manage_id'=>$item['id'], |
| 97 | 'manage_name'=>$item['name'], | 100 | 'manage_name'=>$item['name'], |
| 98 | 'ticket_num'=>$ticket_num,//工单总数量 | 101 | 'ticket_num'=>$ticket_num,//工单总数量 |
| 99 | - 'average_time'=>$average_time ?? '',//平均完成工单时长 | ||
| 100 | - 'fastest_time'=>$fastest_time,//最快完成工单时间 | 102 | + 'average_time'=>$average_time ?? null,//平均完成工单时长 |
| 103 | + 'fastest_time'=>$fastest_time ?? null,//最快完成工单时间 | ||
| 101 | 'timeout_num'=>$timeout_num,//超时工单数量 | 104 | 'timeout_num'=>$timeout_num,//超时工单数量 |
| 102 | 'complete_num'=>$complete_num,//完成工单数量 | 105 | 'complete_num'=>$complete_num,//完成工单数量 |
| 103 | 'dept_id'=>$item['dept_id'] | 106 | 'dept_id'=>$item['dept_id'] |
| @@ -130,7 +133,7 @@ class TicketCount extends Command | @@ -130,7 +133,7 @@ class TicketCount extends Command | ||
| 130 | $ticketDailyDeptModel = new TicketDailyDeptCount(); | 133 | $ticketDailyDeptModel = new TicketDailyDeptCount(); |
| 131 | $date = Carbon::yesterday()->toDateString(); // "2025-08-07" | 134 | $date = Carbon::yesterday()->toDateString(); // "2025-08-07" |
| 132 | foreach ($groupList as $item){ | 135 | foreach ($groupList as $item){ |
| 133 | - $average_time = ''; | 136 | + $average_time = null; |
| 134 | $this->output('组统计:执行的组/id:'.$item['name'].'/'.$item['id']); | 137 | $this->output('组统计:执行的组/id:'.$item['name'].'/'.$item['id']); |
| 135 | $manageIdArr = $manageHrModel->selectField(['belong_group'=>$item['id'],'status'=>1,'dept_id'=>1],'manage_id'); | 138 | $manageIdArr = $manageHrModel->selectField(['belong_group'=>$item['id'],'status'=>1,'dept_id'=>1],'manage_id'); |
| 136 | $ticket_num = $ticketLogModel->counts(['engineer_id'=>['in',$manageIdArr],'is_engineer'=>1]); | 139 | $ticket_num = $ticketLogModel->counts(['engineer_id'=>['in',$manageIdArr],'is_engineer'=>1]); |
| @@ -143,7 +146,7 @@ class TicketCount extends Command | @@ -143,7 +146,7 @@ class TicketCount extends Command | ||
| 143 | 'dept_id'=>$item['id'], | 146 | 'dept_id'=>$item['id'], |
| 144 | 'dept_name'=>$item['name'], | 147 | 'dept_name'=>$item['name'], |
| 145 | 'ticket_num'=>$ticket_num ?? 0, | 148 | 'ticket_num'=>$ticket_num ?? 0, |
| 146 | - 'average_time'=>$average_time ?? '' | 149 | + 'average_time'=>$average_time ?? null |
| 147 | ]; | 150 | ]; |
| 148 | $deptInfo = $ticketDailyDeptModel->read(['date'=>$date,'dept_id'=>$item['id']],['id']); | 151 | $deptInfo = $ticketDailyDeptModel->read(['date'=>$date,'dept_id'=>$item['id']],['id']); |
| 149 | if($deptInfo === false){ | 152 | if($deptInfo === false){ |
| @@ -189,7 +192,7 @@ class TicketCount extends Command | @@ -189,7 +192,7 @@ class TicketCount extends Command | ||
| 189 | 'add_num'=>$add_num, | 192 | 'add_num'=>$add_num, |
| 190 | 'untreated_num'=>$untreated_num, | 193 | 'untreated_num'=>$untreated_num, |
| 191 | 'processed_num'=>$processed_num, | 194 | 'processed_num'=>$processed_num, |
| 192 | - 'average_time'=>$average_time ?? '', | 195 | + 'average_time'=>$average_time ?? null, |
| 193 | 'source'=>json_encode(['a'=>$submit_a_side,'b'=>$submit_b_side],true), | 196 | 'source'=>json_encode(['a'=>$submit_a_side,'b'=>$submit_b_side],true), |
| 194 | 'source_type'=>json_encode($dbResult,true) | 197 | 'source_type'=>json_encode($dbResult,true) |
| 195 | ]; | 198 | ]; |
| @@ -434,9 +434,6 @@ class WebTraffic extends Command | @@ -434,9 +434,6 @@ class WebTraffic extends Command | ||
| 434 | $query->whereNotIn('ip_area', $main_countries); | 434 | $query->whereNotIn('ip_area', $main_countries); |
| 435 | } | 435 | } |
| 436 | })->inRandomOrder()->first(); | 436 | })->inRandomOrder()->first(); |
| 437 | - if(!$ipdata){ | ||
| 438 | - continue; | ||
| 439 | - } | ||
| 440 | $ipdata = (array)$ipdata ?: []; | 437 | $ipdata = (array)$ipdata ?: []; |
| 441 | $ipdata['diff'] = $time_zones[$ipdata['ip_area']]; | 438 | $ipdata['diff'] = $time_zones[$ipdata['ip_area']]; |
| 442 | $data[] = $ipdata; | 439 | $data[] = $ipdata; |
| @@ -479,9 +479,6 @@ class WebTrafficRussia extends Command | @@ -479,9 +479,6 @@ class WebTrafficRussia extends Command | ||
| 479 | } | 479 | } |
| 480 | $ip_area = $this->get_rand($project_country); | 480 | $ip_area = $this->get_rand($project_country); |
| 481 | $res = DB::table('gl_xunpan_ipdata')->where('ip_area', $ip_area)->inRandomOrder()->first(); | 481 | $res = DB::table('gl_xunpan_ipdata')->where('ip_area', $ip_area)->inRandomOrder()->first(); |
| 482 | - if(!$res){ | ||
| 483 | - continue; | ||
| 484 | - } | ||
| 485 | $res = (array)$res ?: []; | 482 | $res = (array)$res ?: []; |
| 486 | $res['diff'] = $time_zones[$res['ip_area']]; | 483 | $res['diff'] = $time_zones[$res['ip_area']]; |
| 487 | $data[] = $res; | 484 | $data[] = $res; |
| @@ -470,9 +470,6 @@ class WebTrafficRussiaSpecial extends Command | @@ -470,9 +470,6 @@ class WebTrafficRussiaSpecial extends Command | ||
| 470 | } | 470 | } |
| 471 | $ip_area = $this->get_rand($project_country); | 471 | $ip_area = $this->get_rand($project_country); |
| 472 | $res = DB::table('gl_xunpan_ipdata')->where('ip_area', $ip_area)->inRandomOrder()->first(); | 472 | $res = DB::table('gl_xunpan_ipdata')->where('ip_area', $ip_area)->inRandomOrder()->first(); |
| 473 | - if(!$res){ | ||
| 474 | - continue; | ||
| 475 | - } | ||
| 476 | $res = (array)$res ?: []; | 473 | $res = (array)$res ?: []; |
| 477 | $res['diff'] = $time_zones[$res['ip_area']]; | 474 | $res['diff'] = $time_zones[$res['ip_area']]; |
| 478 | $data[] = $res; | 475 | $data[] = $res; |
| @@ -420,9 +420,6 @@ class WebTrafficSpecial extends Command | @@ -420,9 +420,6 @@ class WebTrafficSpecial extends Command | ||
| 420 | $query->whereNotIn('ip_area', $main_countries); | 420 | $query->whereNotIn('ip_area', $main_countries); |
| 421 | } | 421 | } |
| 422 | })->inRandomOrder()->first(); | 422 | })->inRandomOrder()->first(); |
| 423 | - if(!$ipdata){ | ||
| 424 | - continue; | ||
| 425 | - } | ||
| 426 | $ipdata = (array)$ipdata ?: []; | 423 | $ipdata = (array)$ipdata ?: []; |
| 427 | $ipdata['diff'] = $time_zones[$ipdata['ip_area']]; | 424 | $ipdata['diff'] = $time_zones[$ipdata['ip_area']]; |
| 428 | $data[] = $ipdata; | 425 | $data[] = $ipdata; |
| @@ -216,11 +216,11 @@ class FetchTicketProjects extends Command | @@ -216,11 +216,11 @@ class FetchTicketProjects extends Command | ||
| 216 | 216 | ||
| 217 | // 第一负责人 | 217 | // 第一负责人 |
| 218 | /** | 218 | /** |
| 219 | - * 5.0升级6.0的项目,白帽SEO的项目 都划给售后 | 219 | + * 5.0升级6.0的项目,白帽SEO, GEO的项目 都划给售后 |
| 220 | * 其他:建站中找项目经理,建站完成找杨长远,推广找售后服务经理 | 220 | * 其他:建站中找项目经理,建站完成找杨长远,推广找售后服务经理 |
| 221 | */ | 221 | */ |
| 222 | - if ($item->is_upgrade || $item->project_type == 1) | ||
| 223 | - $engineer_id = $assm_id; // V5升V6,白帽SEO,找售后服务经理 | 222 | + if ($item->is_upgrade || $item->project_type == 1 || $item->deploy_build->seo_plan > 0) |
| 223 | + $engineer_id = $assm_id; // V5升V6,白帽SEO,GEO,找售后服务经理 | ||
| 224 | elseif ($status == 1) | 224 | elseif ($status == 1) |
| 225 | $engineer_id = $pm_id; // 建站中找项目经理 | 225 | $engineer_id = $pm_id; // 建站中找项目经理 |
| 226 | elseif ($status == 2) | 226 | elseif ($status == 2) |
| @@ -345,6 +345,11 @@ class ProductLogic extends BaseLogic | @@ -345,6 +345,11 @@ class ProductLogic extends BaseLogic | ||
| 345 | }else{ | 345 | }else{ |
| 346 | $param['category_id'] = ''; | 346 | $param['category_id'] = ''; |
| 347 | } | 347 | } |
| 348 | + if(isset($param['og_image']) && !empty($param['og_image'])){ | ||
| 349 | + $param['og_image'] = str_replace_url($param['og_image'] ?? ''); | ||
| 350 | + }else{ | ||
| 351 | + $param['og_image'] = $param['gallery'][0]['url'] ?? ''; | ||
| 352 | + } | ||
| 348 | //产品图 | 353 | //产品图 |
| 349 | if(isset($param['gallery']) && !empty($param['gallery'])){ | 354 | if(isset($param['gallery']) && !empty($param['gallery'])){ |
| 350 | foreach ($param['gallery'] as $k => $v){ | 355 | foreach ($param['gallery'] as $k => $v){ |
| @@ -357,11 +362,6 @@ class ProductLogic extends BaseLogic | @@ -357,11 +362,6 @@ class ProductLogic extends BaseLogic | ||
| 357 | $param['thumb'] = Arr::a2s([]); | 362 | $param['thumb'] = Arr::a2s([]); |
| 358 | $param['gallery'] = Arr::a2s([]); | 363 | $param['gallery'] = Arr::a2s([]); |
| 359 | } | 364 | } |
| 360 | - if(isset($param['og_image']) && !empty($param['og_image'])){ | ||
| 361 | - $param['og_image'] = str_replace_url($param['og_image'] ?? ''); | ||
| 362 | - }else{ | ||
| 363 | - $param['og_image'] = $param['thumb']['url'] ?? ''; | ||
| 364 | - } | ||
| 365 | if(isset($param['files'])){ | 365 | if(isset($param['files'])){ |
| 366 | $param['files']['url'] = str_replace_url($param['files']['url'] ?? ''); | 366 | $param['files']['url'] = str_replace_url($param['files']['url'] ?? ''); |
| 367 | $param['files'] = Arr::a2s($param['files'] ?? []); | 367 | $param['files'] = Arr::a2s($param['files'] ?? []); |
-
请 注册 或 登录 后发表评论