作者 赵彬吉
@@ -85,7 +85,7 @@ class HyStockData extends Command @@ -85,7 +85,7 @@ class HyStockData extends Command
85 // 解析响应结果 85 // 解析响应结果
86 $responseResult = json_decode($response, true); 86 $responseResult = json_decode($response, true);
87 if ($responseResult) { 87 if ($responseResult) {
88 - $data = $responseResult['result'][0]['data']; 88 + $data = $responseResult['result'][0]['data'] ?? [];
89 if ($data) { 89 if ($data) {
90 //获取最近一条 90 //获取最近一条
91 $stock = StockData::orderBy('id', 'desc')->first(); 91 $stock = StockData::orderBy('id', 'desc')->first();
@@ -241,14 +241,17 @@ class FetchTicketProjects extends Command @@ -241,14 +241,17 @@ class FetchTicketProjects extends Command
241 //todo::建站或同时为v6版本+GEO的,建站中项目给项目经理 241 //todo::建站或同时为v6版本+GEO的,建站中项目给项目经理
242 if(($status == 1) && ($item->deploy_build->plan > 0) && ($item->deploy_build->seo_plan > 0)){ 242 if(($status == 1) && ($item->deploy_build->plan > 0) && ($item->deploy_build->seo_plan > 0)){
243 $engineer_id = $pm_id; //找项目经理 243 $engineer_id = $pm_id; //找项目经理
244 - }elseif (($item->is_upgrade == 1) || ($item->project_type == 1)){ 244 + }else{
  245 + if ($item->is_upgrade || $item->project_type == 1 || $item->deploy_build->seo_plan > 0)
245 $engineer_id = $assm_id; // V5升V6,白帽SEO,GEO,找售后服务经理 246 $engineer_id = $assm_id; // V5升V6,白帽SEO,GEO,找售后服务经理
246 - }elseif ($status == 1){ 247 + elseif ($status == 1)
247 $engineer_id = $pm_id; // 建站中找项目经理 248 $engineer_id = $pm_id; // 建站中找项目经理
248 - }elseif ($status == 2){ 249 + elseif ($status == 2)
249 $engineer_id = Manage::where('status', 1)->where('name', '杨长远')->value('id') ?? 0; // 建站完成找杨长远 250 $engineer_id = Manage::where('status', 1)->where('name', '杨长远')->value('id') ?? 0; // 建站完成找杨长远
250 - }else{ 251 + elseif ($status == 3)
251 $engineer_id = $assm_id; // 推广找售后服务经理 252 $engineer_id = $assm_id; // 推广找售后服务经理
  253 + else
  254 + $engineer_id = $pm_id; //找项目经理
252 } 255 }
253 $is_del = ( 256 $is_del = (
254 $item->extend_type == 5 257 $item->extend_type == 5
@@ -59,8 +59,37 @@ class ProcessRecordsLogic extends BaseLogic @@ -59,8 +59,37 @@ class ProcessRecordsLogic extends BaseLogic
59 'item' => ['资料上传', '网站修改中', '网站搭建完成,客户确认中', '等待网站品控审核后上线'] 59 'item' => ['资料上传', '网站修改中', '网站搭建完成,客户确认中', '等待网站品控审核后上线']
60 ] 60 ]
61 ]; 61 ];
  62 +// $data['record'] = array_filter($data['record'], function($item) {
  63 +// return $item['date'] > '2025-09-01';
  64 +// });
62 if($project['type'] == 2){ 65 if($project['type'] == 2){
  66 + //优化项目 默认在seo优化中
  67 + if($data['optimize_record'] == 0) {
  68 + $data['optimize_record'] = 1;
  69 + }
  70 + //时间大于优化时间,默认
  71 + if(date('Y-m-d') > $project['deploy_optimize']['start_date']){
  72 + $data['optimize_record'] = 2;
  73 + }
  74 + //首次达标时间
  75 + if(!empty($project['deploy_optimize']['first_compliance_time'])){
  76 + $data['optimize_record'] = 3;
  77 + }
  78 + //无剩余时间
  79 + if($project['project_type'] == 1){
  80 + if($project['remain_day'] == 0){
  81 + $data['optimize_record'] = 4;
  82 + }
  83 + }else{
  84 + if($project['seo_remain_day'] == 0){
  85 + $data['optimize_record'] = 4;
  86 + }
  87 + }
  88 + if(in_array(2,$project['level'])){
  89 + $data['date_project_record'] = ['暂停优化'];
  90 + }else{
63 $data['date_project_record'] = Project::projectProgress('optimize'); 91 $data['date_project_record'] = Project::projectProgress('optimize');
  92 + }
64 }else{ 93 }else{
65 $data['date_project_record'] = Project::projectProgress('build'); 94 $data['date_project_record'] = Project::projectProgress('build');
66 } 95 }
@@ -417,7 +417,7 @@ class CustomModuleContentLogic extends BaseLogic @@ -417,7 +417,7 @@ class CustomModuleContentLogic extends BaseLogic
417 $info = $this->model->read(['id'=>$this->param['id']]); 417 $info = $this->model->read(['id'=>$this->param['id']]);
418 $param = $this->setContentParams($info); 418 $param = $this->setContentParams($info);
419 $save_id = $this->model->insertGetId($param); 419 $save_id = $this->model->insertGetId($param);
420 - $route = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_MODULE, $save_id, $this->user['project_id']); 420 + $route = RouteMap::setRoute($param['route'], RouteMap::SOURCE_MODULE, $save_id, $this->user['project_id']);
421 $this->edit(['route' => $route], ['id' => $save_id]); 421 $this->edit(['route' => $route], ['id' => $save_id]);
422 $this->copyTemplate($this->param['id'],$info['project_id'],$save_id,$info['module_id']); 422 $this->copyTemplate($this->param['id'],$info['project_id'],$save_id,$info['module_id']);
423 return $this->success(['id'=>$save_id]); 423 return $this->success(['id'=>$save_id]);
@@ -196,8 +196,8 @@ class Project extends Base @@ -196,8 +196,8 @@ class Project extends Base
196 7 => '正式网站上线' 196 7 => '正式网站上线'
197 ], 197 ],
198 'optimize' => [ 198 'optimize' => [
199 - 1 => '开始推广',  
200 - 2 => 'SEO设置', 199 + 1 => 'SEO设置',
  200 + 2 => '开始推广',
201 3 => '排名达标', 201 3 => '排名达标',
202 4 => '剩余服务时常' 202 4 => '剩余服务时常'
203 ] 203 ]
@@ -19,7 +19,7 @@ class TicketProject extends Base @@ -19,7 +19,7 @@ class TicketProject extends Base
19 public function projectV6() 19 public function projectV6()
20 { 20 {
21 return $this->hasOne(Project::class, 'id', 'table_id') 21 return $this->hasOne(Project::class, 'id', 'table_id')
22 - ->select(['id', 'title', 'company', 'is_upgrade', 'project_type']); 22 + ->select(['id', 'title', 'company', 'is_upgrade' ,'project_type']);
23 } 23 }
24 24
25 // 项目经理 25 // 项目经理