Merge remote-tracking branch 'origin/master' into akun
正在显示
13 个修改的文件
包含
129 行增加
和
61 行删除
| @@ -256,7 +256,7 @@ class AiBlogTask extends Command | @@ -256,7 +256,7 @@ class AiBlogTask extends Command | ||
| 256 | $page = 1; | 256 | $page = 1; |
| 257 | $saveData = []; | 257 | $saveData = []; |
| 258 | $result = $aiBlogService->getAiBlogList($page,15); | 258 | $result = $aiBlogService->getAiBlogList($page,15); |
| 259 | - if(!isset($result['status']) && $result['status'] != 200){ | 259 | + if(!isset($result['status']) || $result['status'] != 200){ |
| 260 | return true; | 260 | return true; |
| 261 | } | 261 | } |
| 262 | $total_page = $result['data']['total_page']; | 262 | $total_page = $result['data']['total_page']; |
| @@ -99,7 +99,7 @@ class GeoQuestionRes extends Command | @@ -99,7 +99,7 @@ class GeoQuestionRes extends Command | ||
| 99 | $data = $geo_service->getDeepSeekResult($question); | 99 | $data = $geo_service->getDeepSeekResult($question); |
| 100 | $result = $this->dealDeepSeek($data); | 100 | $result = $this->dealDeepSeek($data); |
| 101 | break; | 101 | break; |
| 102 | - case 'gpt-4o-mini': | 102 | + case 'openai-not-network': |
| 103 | $data = $geo_service->getDeepSeekResult($question,'gpt-4o-mini'); | 103 | $data = $geo_service->getDeepSeekResult($question,'gpt-4o-mini'); |
| 104 | $result = $this->dealDeepSeek($data,'gpt-4o-mini'); | 104 | $result = $this->dealDeepSeek($data,'gpt-4o-mini'); |
| 105 | break; | 105 | break; |
| @@ -21,6 +21,7 @@ use App\Models\Project\ProjectWhiteHatAffix; | @@ -21,6 +21,7 @@ use App\Models\Project\ProjectWhiteHatAffix; | ||
| 21 | use App\Models\Template\BTemplateMain; | 21 | use App\Models\Template\BTemplateMain; |
| 22 | use App\Models\Template\TemplateTypeMain; | 22 | use App\Models\Template\TemplateTypeMain; |
| 23 | use App\Services\AiBlogService; | 23 | use App\Services\AiBlogService; |
| 24 | +use App\Services\Geo\GeoService; | ||
| 24 | use App\Services\ProjectServer; | 25 | use App\Services\ProjectServer; |
| 25 | use Illuminate\Console\Command; | 26 | use Illuminate\Console\Command; |
| 26 | use Illuminate\Support\Facades\DB; | 27 | use Illuminate\Support\Facades\DB; |
| @@ -53,22 +54,25 @@ class lyhDemo extends Command | @@ -53,22 +54,25 @@ class lyhDemo extends Command | ||
| 53 | * @time :2025/7/22 15:14 | 54 | * @time :2025/7/22 15:14 |
| 54 | */ | 55 | */ |
| 55 | public function _actionRoute(){ | 56 | public function _actionRoute(){ |
| 56 | - $projectModel = new Project(); | ||
| 57 | - $lists = $projectModel->list(['delete_status' => 0,'project_type'=>0,'extend_type'=>0,'type'=>['in',[2,3,4,6]]], 'id', ['id']); | ||
| 58 | - $data = []; | ||
| 59 | - foreach ($lists as $item){ | ||
| 60 | - echo date('Y-m-d H:i:s') . '开始--项目的id:'. $item['id'] . PHP_EOL; | ||
| 61 | - ProjectServer::useProject($item['id']); | ||
| 62 | - $aiBlogModel = new AiBlog(); | ||
| 63 | - $info = $aiBlogModel->read(['route'=>null],['id']); | ||
| 64 | - if($info !== false){ | ||
| 65 | - echo '项目id:'.$item['id'].PHP_EOL; | ||
| 66 | - $data[] = $item['id']; | ||
| 67 | - } | ||
| 68 | - dd($data); | ||
| 69 | - echo 'end'; | ||
| 70 | - DB::disconnect('custom_mysql'); | ||
| 71 | - } | 57 | + $geo_service = new GeoService(); |
| 58 | + $data = $geo_service->getDeepSeekResult("创贸总共多少人?",'gpt-4o-mini'); | ||
| 59 | + dd($data); | ||
| 60 | +// $projectModel = new Project(); | ||
| 61 | +// $lists = $projectModel->list(['delete_status' => 0,'project_type'=>0,'extend_type'=>0,'type'=>['in',[2,3,4,6]]], 'id', ['id']); | ||
| 62 | +// $data = []; | ||
| 63 | +// foreach ($lists as $item){ | ||
| 64 | +// echo date('Y-m-d H:i:s') . '开始--项目的id:'. $item['id'] . PHP_EOL; | ||
| 65 | +// ProjectServer::useProject($item['id']); | ||
| 66 | +// $aiBlogModel = new AiBlog(); | ||
| 67 | +// $info = $aiBlogModel->read(['route'=>null],['id']); | ||
| 68 | +// if($info !== false){ | ||
| 69 | +// echo '项目id:'.$item['id'].PHP_EOL; | ||
| 70 | +// $data[] = $item['id']; | ||
| 71 | +// } | ||
| 72 | +// dd($data); | ||
| 73 | +// echo 'end'; | ||
| 74 | +// DB::disconnect('custom_mysql'); | ||
| 75 | +// } | ||
| 72 | } | 76 | } |
| 73 | 77 | ||
| 74 | public function _actionTemplateMain(){ | 78 | public function _actionTemplateMain(){ |
| @@ -151,12 +151,13 @@ class SyncProject extends Command | @@ -151,12 +151,13 @@ class SyncProject extends Command | ||
| 151 | 'contract' => json_encode($param['files']), | 151 | 'contract' => json_encode($param['files']), |
| 152 | 'bill' => json_encode($param['images']), | 152 | 'bill' => json_encode($param['images']), |
| 153 | ]; | 153 | ]; |
| 154 | - if($param['plan_marketing'] == '白帽SEO方案'){ | ||
| 155 | - $data['seo_service_duration'] = $param['years'] ?? 0; | ||
| 156 | - $data['seo_plan'] = 1; | ||
| 157 | - }else{ | ||
| 158 | - $data['service_duration'] = $param['years'] ?? 0; | ||
| 159 | - $data['plan'] = $this->versionData($param['plan_marketing']); | 154 | + $seoPlan = Project::seoMap(); |
| 155 | + if (in_array($param['plan_marketing'], $seoPlan)) { | ||
| 156 | + $data['deploy_build']['seo_service_duration'] = $param['years'] ?? 0; | ||
| 157 | + $data['deploy_build']['seo_plan'] = $this->versionSeoData($param['plan_marketing'],$seoPlan); | ||
| 158 | + } else { | ||
| 159 | + $data['deploy_build']['service_duration'] = $param['years'] ?? 0; | ||
| 160 | + $data['deploy_build']['plan'] = $this->versionData($param['plan_marketing']); | ||
| 160 | } | 161 | } |
| 161 | $renewModel = new ProjectRenew(); | 162 | $renewModel = new ProjectRenew(); |
| 162 | $rs = $renewModel->add($data); | 163 | $rs = $renewModel->add($data); |
| @@ -183,8 +184,7 @@ class SyncProject extends Command | @@ -183,8 +184,7 @@ class SyncProject extends Command | ||
| 183 | } | 184 | } |
| 184 | } | 185 | } |
| 185 | 186 | ||
| 186 | - public function versionSeoData($param){ | ||
| 187 | - $data = Project::seoMap(); | 187 | + public function versionSeoData($param,$data){ |
| 188 | $data = array_flip($data); | 188 | $data = array_flip($data); |
| 189 | if(isset($data[$param])){ | 189 | if(isset($data[$param])){ |
| 190 | return $data[$param]; | 190 | return $data[$param]; |
| @@ -240,10 +240,11 @@ class SyncProject extends Command | @@ -240,10 +240,11 @@ class SyncProject extends Command | ||
| 240 | 'bill'=>$param['images'] | 240 | 'bill'=>$param['images'] |
| 241 | ], | 241 | ], |
| 242 | ]; | 242 | ]; |
| 243 | - if($param['plan_marketing'] == '白帽SEO方案'){ | 243 | + $seoPlan = Project::seoMap(); |
| 244 | + if (in_array($param['plan_marketing'], $seoPlan)) { | ||
| 244 | $data['deploy_build']['seo_service_duration'] = $param['years'] ?? 0; | 245 | $data['deploy_build']['seo_service_duration'] = $param['years'] ?? 0; |
| 245 | - $data['deploy_build']['seo_plan'] = $this->versionSeoData($param['plan_marketing']); | ||
| 246 | - }else{ | 246 | + $data['deploy_build']['seo_plan'] = $this->versionSeoData($param['plan_marketing'],$seoPlan); |
| 247 | + } else { | ||
| 247 | $data['deploy_build']['service_duration'] = $param['years'] ?? 0; | 248 | $data['deploy_build']['service_duration'] = $param['years'] ?? 0; |
| 248 | $data['deploy_build']['plan'] = $this->versionData($param['plan_marketing']); | 249 | $data['deploy_build']['plan'] = $this->versionData($param['plan_marketing']); |
| 249 | } | 250 | } |
| @@ -82,9 +82,9 @@ class FetchTicketProjects extends Command | @@ -82,9 +82,9 @@ class FetchTicketProjects extends Command | ||
| 82 | elseif ($item['cate'] == "建站中") | 82 | elseif ($item['cate'] == "建站中") |
| 83 | $status=1; // 建站中 | 83 | $status=1; // 建站中 |
| 84 | 84 | ||
| 85 | - $assm_id = Manage::where('name', $item['assm'])->value('id') ?? Manage::where('name', '张鸿飞')->value('id') ?? 0; //售后服务经理 | ||
| 86 | - $seom_id = Manage::where('name', $item['yhs'])->value('id') ?? Manage::where('name', '陶婵')->value('id') ?? 0; //优化师 | ||
| 87 | - $pm_id = Manage::where('name', $item['pm'])->value('id') ?? Manage::where('name', '李洁玉')->value('id') ?? 0; // 项目经理 | 85 | + $assm_id = ManageHr::where('name', $item['assm'])->where('status', 1)->value('manage_id') ?? ManageHr::where('name', '张鸿飞')->where('status', 1)->value('manage_id') ?? 0; //售后服务经理 |
| 86 | + $seom_id = ManageHr::where('name', $item['yhs'])->where('status', 1)->value('manage_id') ?? ManageHr::where('name', '陶婵')->where('status', 1)->value('manage_id') ?? 0; //优化师 | ||
| 87 | + $pm_id = ManageHr::where('name', $item['pm'])->where('status', 1)->value('manage_id') ?? ManageHr::where('name', '李洁玉')->where('status', 1)->value('manage_id') ?? 0; // 项目经理 | ||
| 88 | 88 | ||
| 89 | /** | 89 | /** |
| 90 | * 第一负责人逻即说明: | 90 | * 第一负责人逻即说明: |
| @@ -100,6 +100,22 @@ class FetchTicketProjects extends Command | @@ -100,6 +100,22 @@ class FetchTicketProjects extends Command | ||
| 100 | elseif ($status == 1) | 100 | elseif ($status == 1) |
| 101 | $engineer_id = $pm_id; // 建站中找项目经理 | 101 | $engineer_id = $pm_id; // 建站中找项目经理 |
| 102 | 102 | ||
| 103 | + $team_names = [ | ||
| 104 | + $item['pm'], | ||
| 105 | + $item['assm'], | ||
| 106 | + $item['yhs'], | ||
| 107 | + $item['team_leader'], | ||
| 108 | + $item['technology'], | ||
| 109 | + $item['designer'], | ||
| 110 | + $item['yhszl'], | ||
| 111 | + ]; | ||
| 112 | + // 过滤掉空值,去掉重复 | ||
| 113 | + $team_ids = ManageHr::whereIn('name', $team_names)->where('status', 1)->pluck('manage_id') | ||
| 114 | + ->unique() | ||
| 115 | + ->filter(fn($v) => !is_null($v) && $v !== 0) | ||
| 116 | + ->values() | ||
| 117 | + ->toArray(); | ||
| 118 | + | ||
| 103 | $fields = [ | 119 | $fields = [ |
| 104 | 'post_id' => $item['postid'], | 120 | 'post_id' => $item['postid'], |
| 105 | 'company_name' => $item['company'], | 121 | 'company_name' => $item['company'], |
| @@ -114,7 +130,8 @@ class FetchTicketProjects extends Command | @@ -114,7 +130,8 @@ class FetchTicketProjects extends Command | ||
| 114 | 'project_cate' => 1, | 130 | 'project_cate' => 1, |
| 115 | 'pm_id' => $pm_id, | 131 | 'pm_id' => $pm_id, |
| 116 | 'status' => $status, // 项目状态 | 132 | 'status' => $status, // 项目状态 |
| 117 | - 'wechat_group_id' => $item['wx_id'] | 133 | + 'wechat_group_id' => $item['wx_id'], |
| 134 | + 'team' => $team_ids ? json_encode($team_ids) : null, | ||
| 118 | ]; | 135 | ]; |
| 119 | if (!$project) { | 136 | if (!$project) { |
| 120 | $new = new TicketProject(); | 137 | $new = new TicketProject(); |
| @@ -186,22 +203,22 @@ class FetchTicketProjects extends Command | @@ -186,22 +203,22 @@ class FetchTicketProjects extends Command | ||
| 186 | 203 | ||
| 187 | // 售后服务经理 | 204 | // 售后服务经理 |
| 188 | $assm_id = collect([ | 205 | $assm_id = collect([ |
| 189 | - ManageHr::find($item->deploy_optimize->manager_mid)->manage_id ?? 0, | ||
| 190 | - ManageHr::find($item->deploy_optimize->tech_leader)->manage_id ?? 0, | 206 | + ManageHr::where('status', 1)->find($item->deploy_optimize->manager_mid)->manage_id ?? 0, |
| 207 | + ManageHr::where('status', 1)->find($item->deploy_optimize->tech_leader)->manage_id ?? 0, | ||
| 191 | 8, //张鸿飞 | 208 | 8, //张鸿飞 |
| 192 | ])->first(fn($v) => $v !== null && $v !== 0, 0); | 209 | ])->first(fn($v) => $v !== null && $v !== 0, 0); |
| 193 | 210 | ||
| 194 | // 优化师 | 211 | // 优化师 |
| 195 | - $seom_id = ManageHr::find($item->deploy_optimize->optimist_mid) ? ManageHr::find($item->deploy_optimize->optimist_mid)->manage_id : 0; | 212 | + $seom_id = ManageHr::where('status', 1)->find($item->deploy_optimize->optimist_mid) ? ManageHr::where('status', 1)->find($item->deploy_optimize->optimist_mid)->manage_id : 0; |
| 196 | 213 | ||
| 197 | // 项目经理 | 214 | // 项目经理 |
| 198 | - $pm_id = ManageHr::find($item->deploy_build->manager_mid)->manage_id ?? ManageHr::where('name', '李洁玉')->value('manage_id') ?? 0; | 215 | + $pm_id = ManageHr::where('status', 1)->find($item->deploy_build->manager_mid)->manage_id ?? ManageHr::where('status', 1)->where('name', '李洁玉')->value('manage_id') ?? 0; |
| 199 | 216 | ||
| 200 | // 第一负责人 | 217 | // 第一负责人 |
| 201 | if ($status == 1) | 218 | if ($status == 1) |
| 202 | $engineer_id = $pm_id; // 建站中找项目经理 | 219 | $engineer_id = $pm_id; // 建站中找项目经理 |
| 203 | elseif ($status == 2) | 220 | elseif ($status == 2) |
| 204 | - $engineer_id = Manage::where('name', '杨长远')->value('id') ?? 0; // 建站完成找杨长远 | 221 | + $engineer_id = Manage::where('status', 1)->where('name', '杨长远')->value('id') ?? 0; // 建站完成找杨长远 |
| 205 | else | 222 | else |
| 206 | $engineer_id = $assm_id; // 推广找售后服务经理 | 223 | $engineer_id = $assm_id; // 推广找售后服务经理 |
| 207 | 224 | ||
| @@ -212,6 +229,23 @@ class FetchTicketProjects extends Command | @@ -212,6 +229,23 @@ class FetchTicketProjects extends Command | ||
| 212 | || $item->site_status == 1 | 229 | || $item->site_status == 1 |
| 213 | ) ? 1 : 0; | 230 | ) ? 1 : 0; |
| 214 | 231 | ||
| 232 | + $team_ids = [ | ||
| 233 | + $item->deploy_build->leader_mid, | ||
| 234 | + $item->deploy_build->manager_mid, | ||
| 235 | + $item->deploy_build->designer_mid, | ||
| 236 | + $item->deploy_build->tech_mid, | ||
| 237 | + $item->deploy_optimize->manager_mid, | ||
| 238 | + $item->deploy_optimize->optimist_mid, | ||
| 239 | + $item->deploy_optimize->assist_mid, | ||
| 240 | + $item->deploy_optimize->tech_mid, | ||
| 241 | + $item->deploy_optimize->tech_leader, | ||
| 242 | + ]; | ||
| 243 | + // $team_ids 去重复 | ||
| 244 | + $team_ids = array_unique($team_ids); | ||
| 245 | + $team_ids = array_filter($team_ids); | ||
| 246 | + // $team_ids 去掉下标 | ||
| 247 | + $team_ids = array_values($team_ids); | ||
| 248 | + | ||
| 215 | $fields = [ | 249 | $fields = [ |
| 216 | 'company_name' => $item->company, | 250 | 'company_name' => $item->company, |
| 217 | 'title' => $item->title . " - V6", | 251 | 'title' => $item->title . " - V6", |
| @@ -230,6 +264,7 @@ class FetchTicketProjects extends Command | @@ -230,6 +264,7 @@ class FetchTicketProjects extends Command | ||
| 230 | ->value('friend_id'), | 264 | ->value('friend_id'), |
| 231 | 'pm_id' => $pm_id, | 265 | 'pm_id' => $pm_id, |
| 232 | 'status' => $status, // 项目状态 | 266 | 'status' => $status, // 项目状态 |
| 267 | + 'team' => $team_ids ? json_encode($team_ids) : null, | ||
| 233 | ]; | 268 | ]; |
| 234 | if (!$project) { | 269 | if (!$project) { |
| 235 | $project = new TicketProject(); | 270 | $project = new TicketProject(); |
| @@ -289,14 +324,14 @@ class FetchTicketProjects extends Command | @@ -289,14 +324,14 @@ class FetchTicketProjects extends Command | ||
| 289 | { | 324 | { |
| 290 | // 售后服务经理 | 325 | // 售后服务经理 |
| 291 | $assm_id = collect([ | 326 | $assm_id = collect([ |
| 292 | - ManageHr::where('name', $item['cj_assm']['real_name'] ?? '')->first()->manage_id ?? 0, | 327 | + ManageHr::where('status', 1)->where('name', $item['cj_assm']['real_name'] ?? '')->first()->manage_id ?? 0, |
| 293 | 20, //徐莹 | 328 | 20, //徐莹 |
| 294 | ])->first(fn($v) => $v !== null && $v !== 0, 0); | 329 | ])->first(fn($v) => $v !== null && $v !== 0, 0); |
| 295 | }else | 330 | }else |
| 296 | { | 331 | { |
| 297 | // 域途 | 332 | // 域途 |
| 298 | $assm_id = collect([ | 333 | $assm_id = collect([ |
| 299 | - ManageHr::where('name', $item['yutu_assm']['real_name'] ?? '')->first()->manage_id ?? 0, | 334 | + ManageHr::where('status', 1)->where('name', $item['yutu_assm']['real_name'] ?? '')->first()->manage_id ?? 0, |
| 300 | 85, //黄小玉 | 335 | 85, //黄小玉 |
| 301 | ])->first(fn($v) => $v !== null && $v !== 0, 0); | 336 | ])->first(fn($v) => $v !== null && $v !== 0, 0); |
| 302 | } | 337 | } |
| @@ -93,4 +93,24 @@ class TicketProjectController extends BaseController | @@ -93,4 +93,24 @@ class TicketProjectController extends BaseController | ||
| 93 | { | 93 | { |
| 94 | // | 94 | // |
| 95 | } | 95 | } |
| 96 | + | ||
| 97 | + /** | ||
| 98 | + * 获取项目团队信息 | ||
| 99 | + * | ||
| 100 | + * @param string $id 项目UUID | ||
| 101 | + * @return mixed 返回项目团队信息或错误响应 | ||
| 102 | + */ | ||
| 103 | + public function team($id) | ||
| 104 | + { | ||
| 105 | + // 根据UUID查找项目 | ||
| 106 | + $project = TicketProject::where('uuid', $id)->first(); | ||
| 107 | + | ||
| 108 | + // 如果项目不存在,返回错误响应 | ||
| 109 | + if (!$project) $this->response('Project not found', Code::USER_MODEL_NOTFOUND_ERROE); | ||
| 110 | + | ||
| 111 | + // 返回项目团队信息 | ||
| 112 | + // 修改: 使用 getTeam() 方法而不是 getTeam 属性 | ||
| 113 | + return $this->response('Project team', Code::SUCCESS, $project->getTeam()); | ||
| 114 | + } | ||
| 115 | + | ||
| 96 | } | 116 | } |
| @@ -117,21 +117,4 @@ class GeoQuestionResController extends BaseController | @@ -117,21 +117,4 @@ class GeoQuestionResController extends BaseController | ||
| 117 | $data = $this->logic->getSearchDate(); | 117 | $data = $this->logic->getSearchDate(); |
| 118 | $this->response('success',Code::SUCCESS,$data); | 118 | $this->response('success',Code::SUCCESS,$data); |
| 119 | } | 119 | } |
| 120 | - | ||
| 121 | - /** | ||
| 122 | - * @remark :获取搜索列表 | ||
| 123 | - * @name :getSearchList | ||
| 124 | - * @author :lyh | ||
| 125 | - * @method :post | ||
| 126 | - * @time :2025/7/21 16:47 | ||
| 127 | - */ | ||
| 128 | - public function getSearchList(){ | ||
| 129 | - $this->request->validate([ | ||
| 130 | - 'created_at'=>'required', | ||
| 131 | - ],[ | ||
| 132 | - 'created_at.required' => 'created_at不能为空', | ||
| 133 | - ]); | ||
| 134 | - $data = $this->logic->getSearchList($this->map,$this->page,$this->row); | ||
| 135 | - $this->response('success',Code::SUCCESS,$data); | ||
| 136 | - } | ||
| 137 | } | 120 | } |
| @@ -652,7 +652,10 @@ class ProductController extends BaseController | @@ -652,7 +652,10 @@ class ProductController extends BaseController | ||
| 652 | } | 652 | } |
| 653 | if(isset($this->map['title']) && !empty($this->map['title'])){ | 653 | if(isset($this->map['title']) && !empty($this->map['title'])){ |
| 654 | $this->map['title'] = str_replace('+',' ',$this->map['title']); | 654 | $this->map['title'] = str_replace('+',' ',$this->map['title']); |
| 655 | - $query = $query->where('title','like','%'.$this->map['title'].'%'); | 655 | + $query->where(function ($subQuery) { |
| 656 | + $subQuery->where('title','like','%'.$this->map['title'].'%') | ||
| 657 | + ->orwhere('route','like','%'.$this->map['title'].'%'); | ||
| 658 | + }); | ||
| 656 | } | 659 | } |
| 657 | if(isset($this->map['keyword_title']) && !empty($this->map['keyword_title'])){ | 660 | if(isset($this->map['keyword_title']) && !empty($this->map['keyword_title'])){ |
| 658 | $keywordModel = new Keyword(); | 661 | $keywordModel = new Keyword(); |
| @@ -47,12 +47,15 @@ class GeoQuestionResLogic extends BaseLogic | @@ -47,12 +47,15 @@ class GeoQuestionResLogic extends BaseLogic | ||
| 47 | * @time :2025/7/4 9:48 | 47 | * @time :2025/7/4 9:48 |
| 48 | */ | 48 | */ |
| 49 | public function getResultList($map = [],$page = 1,$row = 20){ | 49 | public function getResultList($map = [],$page = 1,$row = 20){ |
| 50 | + $map['project_id'] = $this->user['project_id']; | ||
| 50 | $filed = ['id','project_id','question_id','platform','question','en_question','keywords','url','created_at','updated_at']; | 51 | $filed = ['id','project_id','question_id','platform','question','en_question','keywords','url','created_at','updated_at']; |
| 51 | if(!empty($map['created_at'])){ | 52 | if(!empty($map['created_at'])){ |
| 52 | - $map['project_id'] = $this->user['project_id']; | ||
| 53 | $map['created_at'] = ['between',[$map['created_at'].' 00:00:00',$map['created_at'].' 23:59:59']]; | 53 | $map['created_at'] = ['between',[$map['created_at'].' 00:00:00',$map['created_at'].' 23:59:59']]; |
| 54 | $this->model = new GeoQuestionLog(); | 54 | $this->model = new GeoQuestionLog(); |
| 55 | } | 55 | } |
| 56 | + if(!empty($map['keywords'])){ | ||
| 57 | + $map['keywords'] = ['like','%'.$map['keywords'].'%']; | ||
| 58 | + } | ||
| 56 | $query = $this->model->formatQuery($map); | 59 | $query = $this->model->formatQuery($map); |
| 57 | $query = $query->where(function ($q) { | 60 | $query = $query->where(function ($q) { |
| 58 | $q->whereRaw('JSON_LENGTH(keywords) > 0') | 61 | $q->whereRaw('JSON_LENGTH(keywords) > 0') |
| @@ -35,7 +35,7 @@ class GeoPlatform extends Base | @@ -35,7 +35,7 @@ class GeoPlatform extends Base | ||
| 35 | public function getList(){ | 35 | public function getList(){ |
| 36 | // $data = Cache::get('geo_platform'); | 36 | // $data = Cache::get('geo_platform'); |
| 37 | // if(empty($data)){ | 37 | // if(empty($data)){ |
| 38 | - $data = $this->list(['status'=>$this::STATUS_ON],'id',['name','en_name','icon','sort'],'desc'); | 38 | + $data = $this->list(['status'=>$this::STATUS_ON],'id',['name','en_name','icon','sort'],'asc'); |
| 39 | Cache::put('geo_platform',$data,'12 * 3600'); | 39 | Cache::put('geo_platform',$data,'12 * 3600'); |
| 40 | // } | 40 | // } |
| 41 | return $data; | 41 | return $data; |
| @@ -93,4 +93,11 @@ class TicketProject extends Base | @@ -93,4 +93,11 @@ class TicketProject extends Base | ||
| 93 | $message_push->save(); | 93 | $message_push->save(); |
| 94 | } | 94 | } |
| 95 | } | 95 | } |
| 96 | + | ||
| 97 | + public function getTeam() | ||
| 98 | + { | ||
| 99 | + return ManageHr::whereIn('manage_id', json_decode($this->team, true)) | ||
| 100 | + ->where('manage_id', '>', 0) | ||
| 101 | + ->select(['manage_id', 'name', 'nickname', 'mobile'])->get()->toArray(); | ||
| 102 | + } | ||
| 96 | } | 103 | } |
| @@ -78,6 +78,17 @@ class GeoService | @@ -78,6 +78,17 @@ class GeoService | ||
| 78 | */ | 78 | */ |
| 79 | public function getDeepSeekResult($content,$model = 'deepseek-r1'){ | 79 | public function getDeepSeekResult($content,$model = 'deepseek-r1'){ |
| 80 | $url = $this->api_url . 'v1/chat'; | 80 | $url = $this->api_url . 'v1/chat'; |
| 81 | + switch ($model){ | ||
| 82 | + case 'deepseek-r1': | ||
| 83 | + $supplier = 'bailian'; | ||
| 84 | + break; | ||
| 85 | + case 'gpt-4o-mini': | ||
| 86 | + $supplier = 'azure'; | ||
| 87 | + break; | ||
| 88 | + default: | ||
| 89 | + $supplier = ''; | ||
| 90 | + break; | ||
| 91 | + } | ||
| 81 | $header = [ | 92 | $header = [ |
| 82 | 'accept: application/json', | 93 | 'accept: application/json', |
| 83 | 'X-CmerApi-Host: llm-chat.p.cmer.com', | 94 | 'X-CmerApi-Host: llm-chat.p.cmer.com', |
| @@ -92,7 +103,7 @@ class GeoService | @@ -92,7 +103,7 @@ class GeoService | ||
| 92 | ], | 103 | ], |
| 93 | ], | 104 | ], |
| 94 | 'model' => $model, | 105 | 'model' => $model, |
| 95 | - "supplier"=> "bailian", | 106 | + "supplier"=> $supplier, |
| 96 | 'security_check' => true | 107 | 'security_check' => true |
| 97 | ]; | 108 | ]; |
| 98 | $data = http_post($url,json_encode($message,true),$header); | 109 | $data = http_post($url,json_encode($message,true),$header); |
| @@ -258,6 +258,7 @@ Route::middleware(['aloginauth'])->group(function () { | @@ -258,6 +258,7 @@ Route::middleware(['aloginauth'])->group(function () { | ||
| 258 | Route::get('/pushNotify/{id}', [Aside\WorkOrder\AsideTicketController::class, 'pushNotify'])->name('admin.tickets.pushNotify')->summary('A端工单推送企微群'); | 258 | Route::get('/pushNotify/{id}', [Aside\WorkOrder\AsideTicketController::class, 'pushNotify'])->name('admin.tickets.pushNotify')->summary('A端工单推送企微群'); |
| 259 | Route::get('/projects/{search}', [Aside\WorkOrder\AsideTicketController::class, 'getProjects'])->name('admin.tickets.projects')->summary('A端V5V6项目列表'); | 259 | Route::get('/projects/{search}', [Aside\WorkOrder\AsideTicketController::class, 'getProjects'])->name('admin.tickets.projects')->summary('A端V5V6项目列表'); |
| 260 | Route::patch('/projects/{id}', [Aside\WorkOrder\TicketProjectController::class, 'update'])->name('admin.tickets.projects.update')->summary('A端修改工单项目'); | 260 | Route::patch('/projects/{id}', [Aside\WorkOrder\TicketProjectController::class, 'update'])->name('admin.tickets.projects.update')->summary('A端修改工单项目'); |
| 261 | + Route::get('/projects_team/{id}', [Aside\WorkOrder\TicketProjectController::class, 'team'])->name('admin.tickets.projects_team')->summary('A端工单项目团队'); | ||
| 261 | Route::get('/v56_projects/list', [Aside\WorkOrder\AsideTicketController::class, 'projectList'])->name('admin.tickets.projectList')->summary('A端V5V6项目列表') | 262 | Route::get('/v56_projects/list', [Aside\WorkOrder\AsideTicketController::class, 'projectList'])->name('admin.tickets.projectList')->summary('A端V5V6项目列表') |
| 262 | ->description("project_cate[项目分类1]: 1 V5, 2 V6, 3 超迹, 4 域途"); | 263 | ->description("project_cate[项目分类1]: 1 V5, 2 V6, 3 超迹, 4 域途"); |
| 263 | Route::post('/log/{id}', [Aside\WorkOrder\AsideTicketLogController::class, 'update'])->name('admin.tickets.log.update')->summary('A端工单操作日志更新,完成工单'); | 264 | Route::post('/log/{id}', [Aside\WorkOrder\AsideTicketLogController::class, 'update'])->name('admin.tickets.log.update')->summary('A端工单操作日志更新,完成工单'); |
-
请 注册 或 登录 后发表评论