Merge branch 'master' of http://47.244.231.31:8099/zhl/globalso-v6
正在显示
24 个修改的文件
包含
454 行增加
和
91 行删除
| @@ -31,22 +31,19 @@ class RemainDay extends Command | @@ -31,22 +31,19 @@ class RemainDay extends Command | ||
| 31 | ];//需要单独处理的项目 | 31 | ];//需要单独处理的项目 |
| 32 | 32 | ||
| 33 | /** | 33 | /** |
| 34 | + * @var int[] | ||
| 35 | + * 按照达标天数收费的项目(白帽) | ||
| 36 | + */ | ||
| 37 | + protected $bm_projectId = [ | ||
| 38 | + 4247,4299,4310,4215,4038,4084,4148 | ||
| 39 | + ]; | ||
| 40 | + | ||
| 41 | + | ||
| 42 | + /** | ||
| 34 | * @var 暂停的项目 | 43 | * @var 暂停的项目 |
| 35 | */ | 44 | */ |
| 36 | protected $ceaseProjectId = [ | 45 | protected $ceaseProjectId = [ |
| 37 | - 354, | ||
| 38 | - 378, | ||
| 39 | - 649, | ||
| 40 | - 1226, | ||
| 41 | - 1283, | ||
| 42 | - 1703, | ||
| 43 | - 1893, | ||
| 44 | - 2066, | ||
| 45 | - 2250, | ||
| 46 | - 2193, | ||
| 47 | - 2399, | ||
| 48 | - 1685, | ||
| 49 | - 3309 | 46 | + 354, 378, 649, 1226, 1283, 1703, 1893, 2066, 2250, 2193, 2399, 1685, 3309 |
| 50 | ];//需要单独处理的项目 | 47 | ];//需要单独处理的项目 |
| 51 | /** | 48 | /** |
| 52 | * The console command description. | 49 | * The console command description. |
| @@ -123,11 +120,13 @@ class RemainDay extends Command | @@ -123,11 +120,13 @@ class RemainDay extends Command | ||
| 123 | //白帽版本的系统 | 120 | //白帽版本的系统 |
| 124 | if($deploy_build['seo_plan'] == 1){ | 121 | if($deploy_build['seo_plan'] == 1){ |
| 125 | if($deploy_build['seo_service_duration'] != 0){ | 122 | if($deploy_build['seo_service_duration'] != 0){ |
| 126 | - if($item['bm_finish_remain_day']){ | ||
| 127 | - $compliance_day = (int)$item['bm_finish_remain_day']; | ||
| 128 | - $seo_remain_day = $deploy_build['seo_service_duration'] - $compliance_day; | 123 | + if(in_array($item['id'],$this->bm_projectId)){ |
| 124 | + $seo_remain_day = $deploy_build['seo_service_duration'] - (int)$item['bm_finish_remain_day']; | ||
| 129 | }else{ | 125 | }else{ |
| 130 | - $seo_remain_day = $deploy_build['seo_service_duration']; | 126 | + //按自然日统计 |
| 127 | + $diff = time() - strtotime($item['uptime']); | ||
| 128 | + $compliance_day = floor($diff / (60 * 60 * 24)); | ||
| 129 | + $seo_remain_day = $deploy_build['service_duration'] - $compliance_day; | ||
| 131 | } | 130 | } |
| 132 | if($deploy_build['plan'] == 0 && $seo_remain_day < 0 && $deploy_build['seo_service_duration'] != 0){//只有白帽版本的项目且剩余服务时常为0,放入未续费中 | 131 | if($deploy_build['plan'] == 0 && $seo_remain_day < 0 && $deploy_build['seo_service_duration'] != 0){//只有白帽版本的项目且剩余服务时常为0,放入未续费中 |
| 133 | // $this->project->edit(['seo_remain_day'=>$seo_remain_day,'finish_remain_day'=>$compliance_day ?? 0,'extend_type'=>Project::TYPE_FIVE],['id'=>$item['id']]); | 132 | // $this->project->edit(['seo_remain_day'=>$seo_remain_day,'finish_remain_day'=>$compliance_day ?? 0,'extend_type'=>Project::TYPE_FIVE],['id'=>$item['id']]); |
| @@ -77,6 +77,7 @@ class GeoQuestionRes extends Command | @@ -77,6 +77,7 @@ class GeoQuestionRes extends Command | ||
| 77 | $geoLogModel = new GeoQuestionLog(); | 77 | $geoLogModel = new GeoQuestionLog(); |
| 78 | foreach ($taskInfo['question'] as $question) { | 78 | foreach ($taskInfo['question'] as $question) { |
| 79 | $en_question = Translate::tran($question, 'zh') ?? ''; | 79 | $en_question = Translate::tran($question, 'zh') ?? ''; |
| 80 | + $this->output('项目ID:' . $taskInfo['project_id'] . ', 问题 开始:' . $question); | ||
| 80 | foreach ($platformsArr as $platform) { | 81 | foreach ($platformsArr as $platform) { |
| 81 | $data = $hit_data = []; | 82 | $data = $hit_data = []; |
| 82 | $error_num = 0; | 83 | $error_num = 0; |
| @@ -84,10 +85,10 @@ class GeoQuestionRes extends Command | @@ -84,10 +85,10 @@ class GeoQuestionRes extends Command | ||
| 84 | GET_RESULT: | 85 | GET_RESULT: |
| 85 | $error_num++; | 86 | $error_num++; |
| 86 | try { | 87 | try { |
| 87 | - $this->output('执行时间:'.date('Y-m-d H:i:s').'->执行次数:'.$error_num.',执行平台:'.$platform.'执行的项目id:'.$taskInfo['project_id'].PHP_EOL); | ||
| 88 | if ($error_num >= 3) { | 88 | if ($error_num >= 3) { |
| 89 | continue; | 89 | continue; |
| 90 | } | 90 | } |
| 91 | + $this->output('执行平台:' . $platform . '执行次数:' . $error_num); | ||
| 91 | switch ($platform){ | 92 | switch ($platform){ |
| 92 | case 'google_ai_overview': | 93 | case 'google_ai_overview': |
| 93 | // overview 数据结构不确定, 需要单独处理数据 | 94 | // overview 数据结构不确定, 需要单独处理数据 |
| @@ -98,6 +99,10 @@ class GeoQuestionRes extends Command | @@ -98,6 +99,10 @@ class GeoQuestionRes extends Command | ||
| 98 | $data = $geo_service->getDeepSeekResult($question); | 99 | $data = $geo_service->getDeepSeekResult($question); |
| 99 | $result = $this->dealDeepSeek($data); | 100 | $result = $this->dealDeepSeek($data); |
| 100 | break; | 101 | break; |
| 102 | + case 'gpt-4o-mini': | ||
| 103 | + $data = $geo_service->getDeepSeekResult($question,'gpt-4o-mini'); | ||
| 104 | + $result = $this->dealDeepSeek($data,'gpt-4o-mini'); | ||
| 105 | + break; | ||
| 101 | default: | 106 | default: |
| 102 | $result = $geo_service->getAiPlatformResult($question, $platform); | 107 | $result = $geo_service->getAiPlatformResult($question, $platform); |
| 103 | break; | 108 | break; |
| @@ -215,10 +220,10 @@ class GeoQuestionRes extends Command | @@ -215,10 +220,10 @@ class GeoQuestionRes extends Command | ||
| 215 | * @method :post | 220 | * @method :post |
| 216 | * @time :2025/7/15 10:58 | 221 | * @time :2025/7/15 10:58 |
| 217 | */ | 222 | */ |
| 218 | - public function dealDeepSeek($data){ | 223 | + public function dealDeepSeek($data,$model = 'DeepSeek'){ |
| 219 | $result = [ | 224 | $result = [ |
| 220 | 'code' => 200, | 225 | 'code' => 200, |
| 221 | - 'model' => 'DeepSeek', | 226 | + 'model' => $model, |
| 222 | 'text' => '', | 227 | 'text' => '', |
| 223 | ]; | 228 | ]; |
| 224 | $texts = []; | 229 | $texts = []; |
| @@ -42,18 +42,34 @@ class lyhDemo extends Command | @@ -42,18 +42,34 @@ class lyhDemo extends Command | ||
| 42 | protected $description = '更新路由'; | 42 | protected $description = '更新路由'; |
| 43 | 43 | ||
| 44 | public function handle(){ | 44 | public function handle(){ |
| 45 | - ProjectServer::useProject(3531); | ||
| 46 | - $newsModel = new News(); | ||
| 47 | - $rows = $newsModel->select('id', 'text')->get(); | ||
| 48 | - foreach ($rows as $row) { | ||
| 49 | - echo '执行数据id:'.$row->id.PHP_EOL; | ||
| 50 | - $newText = preg_replace('/<h1 class="t">.*?<\/h1>/is', '', $row->text); | ||
| 51 | - $newsModel->where('id', $row->id)->update(['text' => $newText]); | ||
| 52 | - } | ||
| 53 | - DB::disconnect('custom_mysql'); | ||
| 54 | - return true; | 45 | + return $this->_actionRoute(); |
| 55 | } | 46 | } |
| 56 | 47 | ||
| 48 | + /** | ||
| 49 | + * @remark :查看路由是否为空 | ||
| 50 | + * @name :_actionRoute | ||
| 51 | + * @author :lyh | ||
| 52 | + * @method :post | ||
| 53 | + * @time :2025/7/22 15:14 | ||
| 54 | + */ | ||
| 55 | + 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 | + } | ||
| 72 | + } | ||
| 57 | 73 | ||
| 58 | public function _actionTemplateMain(){ | 74 | public function _actionTemplateMain(){ |
| 59 | $data = []; | 75 | $data = []; |
| @@ -43,7 +43,7 @@ class Temp extends Command | @@ -43,7 +43,7 @@ class Temp extends Command | ||
| 43 | 43 | ||
| 44 | public function handle() | 44 | public function handle() |
| 45 | { | 45 | { |
| 46 | - | 46 | + $this->specialImport(); |
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | /** | 49 | /** |
| @@ -54,8 +54,8 @@ class Temp extends Command | @@ -54,8 +54,8 @@ class Temp extends Command | ||
| 54 | */ | 54 | */ |
| 55 | public function specialImport() | 55 | public function specialImport() |
| 56 | { | 56 | { |
| 57 | - $file_url = 'https://ecdn6.globalso.com/upload/p/3531/file/2025-06/news.csv'; | ||
| 58 | - $domain = 'www.hybio.com.cn'; | 57 | + $file_url = 'https://ecdn6.globalso.com/upload/p/3531/file/2025-07/www-cninfo-com-cn_news_v1-1.csv'; |
| 58 | + $domain = 'static.cninfo.com.cn'; | ||
| 59 | $project_id = 3531; | 59 | $project_id = 3531; |
| 60 | $is_gbk = 0; | 60 | $is_gbk = 0; |
| 61 | $file_code_type = $this->get_code_type($file_url); | 61 | $file_code_type = $this->get_code_type($file_url); |
| @@ -137,47 +137,58 @@ class Temp extends Command | @@ -137,47 +137,58 @@ class Temp extends Command | ||
| 137 | 137 | ||
| 138 | protected function importModule($project_id, $domain, $data) | 138 | protected function importModule($project_id, $domain, $data) |
| 139 | { | 139 | { |
| 140 | + $module_id = 4; | ||
| 141 | + $category_id = 3; | ||
| 140 | $model = new CustomModuleContent(); | 142 | $model = new CustomModuleContent(); |
| 141 | - $module = $model->read(['name' => $data[0]]); | 143 | + $module = $model->read(['module_id' => $module_id, 'name' => $data[0]]); |
| 142 | if (!$module) { | 144 | if (!$module) { |
| 143 | 145 | ||
| 144 | $content = ''; | 146 | $content = ''; |
| 145 | if ($data[4] ?? '') { | 147 | if ($data[4] ?? '') { |
| 146 | - //处理内容中的图片 | ||
| 147 | - preg_match_all('/<img\s+[^>]*?src\s*=\s*(\'|\")(.*?)\\1[^>]*?\/?\s*>/i', $data[4], $result); | 148 | + //处理内容中的pdf文件 |
| 149 | + preg_match_all('/<a\s+[^>]*?href\s*=\s*(\'|\")(.*?)\\1[^>]*?\/?\s*>/i', $data[4], $result); | ||
| 148 | if ($result[2] ?? []) { | 150 | if ($result[2] ?? []) { |
| 149 | - foreach ($result[2] as $img) { | ||
| 150 | - $new_img = check_remote_url_down($img, $project_id, $domain, 1); | ||
| 151 | - $new_img && $data[4] = str_replace($img, $new_img, $data[4]); | 151 | + foreach ($result[2] as $pdf) { |
| 152 | + $new_img = check_remote_url_down($pdf, $project_id, $domain, 1); | ||
| 153 | + $new_img && $data[4] = str_replace($pdf, $new_img, $data[4]); | ||
| 152 | } | 154 | } |
| 153 | } | 155 | } |
| 154 | 156 | ||
| 157 | + //处理内容中的图片 | ||
| 158 | +// preg_match_all('/<img\s+[^>]*?src\s*=\s*(\'|\")(.*?)\\1[^>]*?\/?\s*>/i', $data[4], $result); | ||
| 159 | +// if ($result[2] ?? []) { | ||
| 160 | +// foreach ($result[2] as $img) { | ||
| 161 | +// $new_img = check_remote_url_down($img, $project_id, $domain, 1); | ||
| 162 | +// $new_img && $data[4] = str_replace($img, $new_img, $data[4]); | ||
| 163 | +// } | ||
| 164 | +// } | ||
| 165 | + | ||
| 155 | //处理内容中的视频 | 166 | //处理内容中的视频 |
| 156 | - preg_match_all('/<source\s+[^>]*?src\s*=\s*(\'|\")(.*?)\\1[^>]*?\/?\s*>/i', $data[4], $result_video); | ||
| 157 | - if ($result_video[2] ?? []) { | ||
| 158 | - foreach ($result_video[2] as $video) { | ||
| 159 | - $new_video = check_remote_url_down($video, $project_id, $domain, 1); | ||
| 160 | - $new_video && $data[4] = str_replace($video, $new_video, $data[4]); | ||
| 161 | - } | ||
| 162 | - } | 167 | +// preg_match_all('/<source\s+[^>]*?src\s*=\s*(\'|\")(.*?)\\1[^>]*?\/?\s*>/i', $data[4], $result_video); |
| 168 | +// if ($result_video[2] ?? []) { | ||
| 169 | +// foreach ($result_video[2] as $video) { | ||
| 170 | +// $new_video = check_remote_url_down($video, $project_id, $domain, 1); | ||
| 171 | +// $new_video && $data[4] = str_replace($video, $new_video, $data[4]); | ||
| 172 | +// } | ||
| 173 | +// } | ||
| 163 | 174 | ||
| 164 | $content = $data[4]; | 175 | $content = $data[4]; |
| 165 | } | 176 | } |
| 166 | 177 | ||
| 167 | - $seo_title = ''; | ||
| 168 | - if ($data[6] ?? '') { | ||
| 169 | - $seo_title = substr(strip_tags($data[6]), 0, 70); | ||
| 170 | - } | 178 | + $seo_title = '巨潮资讯网'; |
| 179 | +// if ($data[6] ?? '') { | ||
| 180 | +// $seo_title = substr(strip_tags($data[6]), 0, 70); | ||
| 181 | +// } | ||
| 171 | 182 | ||
| 172 | - $seo_keywords = ''; | ||
| 173 | - if ($data[7] ?? '') { | ||
| 174 | - $seo_keywords = substr(strip_tags(str_replace('^v6sp$', ',', $data[7])), 0, 255); | ||
| 175 | - } | 183 | + $seo_keywords = '巨潮资讯网,巨潮网,巨潮资讯,上市公司公告,巨潮,信息披露,法定披露,披露,创业板,基金,债券,财务数据,网络投票,互动易'; |
| 184 | +// if ($data[7] ?? '') { | ||
| 185 | +// $seo_keywords = substr(strip_tags(str_replace('^v6sp$', ',', $data[7])), 0, 255); | ||
| 186 | +// } | ||
| 176 | 187 | ||
| 177 | - $seo_description = ''; | ||
| 178 | - if ($data[8] ?? '') { | ||
| 179 | - $seo_description = substr(strip_tags($data[8]), 0, 200); | ||
| 180 | - } | 188 | + $seo_description = '巨潮资讯网是中国证监会指定的上市公司信息披露网站,平台提供上市公司公告、公司资讯、公司互动、股东大会网络投票等内容功能,一站式服务资本市场投资者。'; |
| 189 | +// if ($data[8] ?? '') { | ||
| 190 | +// $seo_description = substr(strip_tags($data[8]), 0, 200); | ||
| 191 | +// } | ||
| 181 | 192 | ||
| 182 | $release_at = date('Y-m-d H:i:s'); | 193 | $release_at = date('Y-m-d H:i:s'); |
| 183 | if ($data[9] ?? '') { | 194 | if ($data[9] ?? '') { |
| @@ -188,8 +199,8 @@ class Temp extends Command | @@ -188,8 +199,8 @@ class Temp extends Command | ||
| 188 | $id = $model->addReturnId( | 199 | $id = $model->addReturnId( |
| 189 | [ | 200 | [ |
| 190 | 'name' => $data[0], | 201 | 'name' => $data[0], |
| 191 | - 'category_id' => ',1,', | ||
| 192 | - 'module_id' => 2, | 202 | + 'category_id' => ',' . $category_id . ',', |
| 203 | + 'module_id' => $module_id, | ||
| 193 | 'content' => $content, | 204 | 'content' => $content, |
| 194 | 'seo_title' => $seo_title, | 205 | 'seo_title' => $seo_title, |
| 195 | 'seo_keywords' => $seo_keywords, | 206 | 'seo_keywords' => $seo_keywords, |
| @@ -174,8 +174,8 @@ class NoticeController extends BaseController | @@ -174,8 +174,8 @@ class NoticeController extends BaseController | ||
| 174 | 'target_domain' => $target_domain | 174 | 'target_domain' => $target_domain |
| 175 | ]); | 175 | ]); |
| 176 | }else{ | 176 | }else{ |
| 177 | - if($task_redirect_info['status'] == DomainRedirectTask::STATUS_FAL){ | ||
| 178 | - $redirect_model->edit(['status'=>DomainRedirectTask::STATUS_UN,'error_msg'=>null],['id'=>$task_redirect_info['id']]); | 177 | + if($task_redirect_info['status'] > DomainRedirectTask::STATUS_ING){ |
| 178 | + $redirect_model->edit(['other_domain' => json_encode($other_domain), 'target_domain' => $target_domain, 'status'=>DomainRedirectTask::STATUS_UN, 'error_msg'=>null],['id'=>$task_redirect_info['id']]); | ||
| 179 | } | 179 | } |
| 180 | } | 180 | } |
| 181 | 181 |
| @@ -33,9 +33,11 @@ use App\Models\Project\ProcessRecords; | @@ -33,9 +33,11 @@ use App\Models\Project\ProcessRecords; | ||
| 33 | use App\Models\Project\Project; | 33 | use App\Models\Project\Project; |
| 34 | use App\Models\Project\ProjectUpdateTdk; | 34 | use App\Models\Project\ProjectUpdateTdk; |
| 35 | use App\Models\Project\RenewLog; | 35 | use App\Models\Project\RenewLog; |
| 36 | +use App\Models\ProjectAssociation\ProjectAssociation; | ||
| 36 | use App\Models\RankData\RankData; | 37 | use App\Models\RankData\RankData; |
| 37 | use App\Models\Task\Task; | 38 | use App\Models\Task\Task; |
| 38 | use App\Models\WebSetting\WebLanguage; | 39 | use App\Models\WebSetting\WebLanguage; |
| 40 | +use App\Models\WorkOrder\TicketProject; | ||
| 39 | use Illuminate\Http\Request; | 41 | use Illuminate\Http\Request; |
| 40 | use Illuminate\Support\Facades\DB; | 42 | use Illuminate\Support\Facades\DB; |
| 41 | 43 | ||
| @@ -70,23 +72,13 @@ class ProjectController extends BaseController | @@ -70,23 +72,13 @@ class ProjectController extends BaseController | ||
| 70 | if(!empty($lists) && !empty($lists['list'])){ | 72 | if(!empty($lists) && !empty($lists['list'])){ |
| 71 | foreach ($lists['list'] as $k => $v){ | 73 | foreach ($lists['list'] as $k => $v){ |
| 72 | $v = $this->handleParam($v); | 74 | $v = $this->handleParam($v); |
| 73 | - | ||
| 74 | - // 组装 工单UUID | ||
| 75 | - $ticketProject = null; | ||
| 76 | - $ticketProject = DB::table('gl_ticket_projects') | ||
| 77 | - ->where('table_id', $v['id']) | ||
| 78 | - ->where('project_cate', 2) | ||
| 79 | - ->first(); | ||
| 80 | - $v['uuid'] = $ticketProject ? $ticketProject->uuid : null; | ||
| 81 | // 组装 工单UUID END | 75 | // 组装 工单UUID END |
| 82 | - | ||
| 83 | $lists['list'][$k] = $v; | 76 | $lists['list'][$k] = $v; |
| 84 | } | 77 | } |
| 85 | } | 78 | } |
| 86 | $this->response('success',Code::SUCCESS,$lists); | 79 | $this->response('success',Code::SUCCESS,$lists); |
| 87 | } | 80 | } |
| 88 | 81 | ||
| 89 | - | ||
| 90 | /** | 82 | /** |
| 91 | * 需要查询的字段 | 83 | * 需要查询的字段 |
| 92 | * @return array | 84 | * @return array |
| @@ -458,6 +450,8 @@ class ProjectController extends BaseController | @@ -458,6 +450,8 @@ class ProjectController extends BaseController | ||
| 458 | $item['task_finish_num'] = Task::getNumByProjectId($item['id'], Task::STATUS_DOWN); | 450 | $item['task_finish_num'] = Task::getNumByProjectId($item['id'], Task::STATUS_DOWN); |
| 459 | $item['task_pending_num'] = Task::getNumByProjectId($item['id'], [Task::STATUS_DONGING, Task::STATUS_WAIT]); | 451 | $item['task_pending_num'] = Task::getNumByProjectId($item['id'], [Task::STATUS_DONGING, Task::STATUS_WAIT]); |
| 460 | $item['collect_time'] = $item['is_upgrade'] ? UpdateLog::getProjectUpdate($item['id']) : ''; | 452 | $item['collect_time'] = $item['is_upgrade'] ? UpdateLog::getProjectUpdate($item['id']) : ''; |
| 453 | + $item['uuid'] = TicketProject::where('table_id', $item['id'])->where('project_cate', 2)->value('uuid') ?? null; | ||
| 454 | + $item['friend_id'] = ProjectAssociation::where('project_id', $item['id'])->where('status', ProjectAssociation::STATUS_NORMAL)->where('binding_app', ProjectAssociation::ENTERPRISE_WECHAT)->value('friend_id') ?? null; | ||
| 461 | return $item; | 455 | return $item; |
| 462 | } | 456 | } |
| 463 | 457 |
| @@ -218,11 +218,17 @@ class AsideTicketController extends BaseController | @@ -218,11 +218,17 @@ class AsideTicketController extends BaseController | ||
| 218 | $ticket->saveEngineers($request->input('engineer_ids')); | 218 | $ticket->saveEngineers($request->input('engineer_ids')); |
| 219 | 219 | ||
| 220 | // 其他字段有提交数据才修改,比如star plan_end_at | 220 | // 其他字段有提交数据才修改,比如star plan_end_at |
| 221 | - $ticket->title = $request->input('title', $ticket->title); | ||
| 222 | - $ticket->content = $request->input('content', $ticket->content); | ||
| 223 | - $ticket->star = $request->input('star', $ticket->star); | ||
| 224 | - $ticket->plan_end_at = $request->input('plan_end_at', $ticket->plan_end_at); | ||
| 225 | - $ticket->status = $request->input('status', $ticket->status); | 221 | + if ($request->input('title')) |
| 222 | + $ticket->title = $request->input('title'); | ||
| 223 | + if ($request->input('content')) | ||
| 224 | + $ticket->content = $request->input('content'); | ||
| 225 | + if ($request->input('star')) | ||
| 226 | + $ticket->star = $request->input('star'); | ||
| 227 | + if ($request->input('plan_end_at')) | ||
| 228 | + $ticket->plan_end_at = $request->input('plan_end_at'); | ||
| 229 | + if ($request->input('status')) | ||
| 230 | + $ticket->status = $request->input('status'); | ||
| 231 | + | ||
| 226 | if ($ticket->status == Tickets::STATUS_COMPLETED) | 232 | if ($ticket->status == Tickets::STATUS_COMPLETED) |
| 227 | { | 233 | { |
| 228 | // 完成工单,把子任务里面未完成的工单改为完成 | 234 | // 完成工单,把子任务里面未完成的工单改为完成 |
| 1 | +<?php | ||
| 2 | + | ||
| 3 | +namespace App\Http\Controllers\Aside\WorkOrder; | ||
| 4 | + | ||
| 5 | +use App\Enums\Common\Code; | ||
| 6 | +use App\Http\Controllers\Aside\BaseController; | ||
| 7 | +use App\Http\Controllers\Controller; | ||
| 8 | +use App\Http\Requests\Aside\WorkOrder\TicketProjectUpdateRequest; | ||
| 9 | +use App\Models\WorkOrder\TicketProject; | ||
| 10 | +use Illuminate\Http\Request; | ||
| 11 | + | ||
| 12 | +class TicketProjectController extends BaseController | ||
| 13 | +{ | ||
| 14 | + /** | ||
| 15 | + * Display a listing of the resource. | ||
| 16 | + * | ||
| 17 | + * @return \Illuminate\Http\Response | ||
| 18 | + */ | ||
| 19 | + public function index() | ||
| 20 | + { | ||
| 21 | + // | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + /** | ||
| 25 | + * Show the form for creating a new resource. | ||
| 26 | + * | ||
| 27 | + * @return \Illuminate\Http\Response | ||
| 28 | + */ | ||
| 29 | + public function create() | ||
| 30 | + { | ||
| 31 | + // | ||
| 32 | + } | ||
| 33 | + | ||
| 34 | + /** | ||
| 35 | + * Store a newly created resource in storage. | ||
| 36 | + * | ||
| 37 | + * @param \Illuminate\Http\Request $request | ||
| 38 | + * @return \Illuminate\Http\Response | ||
| 39 | + */ | ||
| 40 | + public function store(Request $request) | ||
| 41 | + { | ||
| 42 | + // | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | + /** | ||
| 46 | + * Display the specified resource. | ||
| 47 | + * | ||
| 48 | + * @param int $id | ||
| 49 | + * @return \Illuminate\Http\Response | ||
| 50 | + */ | ||
| 51 | + public function show($id) | ||
| 52 | + { | ||
| 53 | + // | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + /** | ||
| 57 | + * Show the form for editing the specified resource. | ||
| 58 | + * | ||
| 59 | + * @param int $id | ||
| 60 | + * @return \Illuminate\Http\Response | ||
| 61 | + */ | ||
| 62 | + public function edit($id) | ||
| 63 | + { | ||
| 64 | + // | ||
| 65 | + } | ||
| 66 | + | ||
| 67 | + /** | ||
| 68 | + * Update the specified resource in storage. | ||
| 69 | + * | ||
| 70 | + * @param \Illuminate\Http\Request $request | ||
| 71 | + * @param int $id | ||
| 72 | + * @return \Illuminate\Http\Response | ||
| 73 | + */ | ||
| 74 | + public function update(TicketProjectUpdateRequest $request, $id) | ||
| 75 | + { | ||
| 76 | + $request->validated(); | ||
| 77 | + $project = TicketProject::where('uuid', $id)->first(); | ||
| 78 | + if (!$project) $this->response('Project not found', Code::USER_MODEL_NOTFOUND_ERROE); | ||
| 79 | + | ||
| 80 | + if ($request->input('subtitle')) $project->subtitle = $request->input('subtitle'); | ||
| 81 | + $project->wechat_switch = $request->boolean('wechat_switch', true); | ||
| 82 | + $project->save(); | ||
| 83 | + $this->response('Project updated successfully', Code::SUCCESS, $project); | ||
| 84 | + } | ||
| 85 | + | ||
| 86 | + /** | ||
| 87 | + * Remove the specified resource from storage. | ||
| 88 | + * | ||
| 89 | + * @param int $id | ||
| 90 | + * @return \Illuminate\Http\Response | ||
| 91 | + */ | ||
| 92 | + public function destroy($id) | ||
| 93 | + { | ||
| 94 | + // | ||
| 95 | + } | ||
| 96 | +} |
| @@ -92,4 +92,46 @@ class GeoQuestionResController extends BaseController | @@ -92,4 +92,46 @@ class GeoQuestionResController extends BaseController | ||
| 92 | $data = $this->logic->getResultInfo(); | 92 | $data = $this->logic->getResultInfo(); |
| 93 | $this->response('success',Code::SUCCESS,$data); | 93 | $this->response('success',Code::SUCCESS,$data); |
| 94 | } | 94 | } |
| 95 | + | ||
| 96 | + /** | ||
| 97 | + * @remark :统计数量 | ||
| 98 | + * @name :countQuantity | ||
| 99 | + * @author :lyh | ||
| 100 | + * @method :post | ||
| 101 | + * @time :2025/7/21 10:58 | ||
| 102 | + */ | ||
| 103 | + public function countQuantity(){ | ||
| 104 | + $data = $this->logic->countQuantity(); | ||
| 105 | + $data['platform'] = $this->logic->platformHitCount(); | ||
| 106 | + $this->response('success',Code::SUCCESS,$data); | ||
| 107 | + } | ||
| 108 | + | ||
| 109 | + /** | ||
| 110 | + * @remark :获取搜索时间 | ||
| 111 | + * @name :getSearchDate | ||
| 112 | + * @author :lyh | ||
| 113 | + * @method :post | ||
| 114 | + * @time :2025/7/21 16:35 | ||
| 115 | + */ | ||
| 116 | + public function getSearchDate(){ | ||
| 117 | + $data = $this->logic->getSearchDate(); | ||
| 118 | + $this->response('success',Code::SUCCESS,$data); | ||
| 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 | + } | ||
| 95 | } | 137 | } |
| @@ -43,7 +43,8 @@ class TestController extends BaseController | @@ -43,7 +43,8 @@ class TestController extends BaseController | ||
| 43 | * @time :2025/2/13 16:34 | 43 | * @time :2025/2/13 16:34 |
| 44 | */ | 44 | */ |
| 45 | public function ceshi(){ | 45 | public function ceshi(){ |
| 46 | - $data = Translate::tran('测试翻译', 'en'); | ||
| 47 | - $this->response('success',Code::SUCCESS,['data'=>$data]); | 46 | + $hrModel = new ManageHr(); |
| 47 | + $data = $hrModel->accordIdGetLeader($this->param['id']); | ||
| 48 | + $this->response('success',Code::SUCCESS,$data); | ||
| 48 | } | 49 | } |
| 49 | } | 50 | } |
| @@ -159,6 +159,7 @@ class CustomModuleCategoryLogic extends BaseLogic | @@ -159,6 +159,7 @@ class CustomModuleCategoryLogic extends BaseLogic | ||
| 159 | $route = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_MODULE_CATE, | 159 | $route = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_MODULE_CATE, |
| 160 | $this->param['id'], $this->user['project_id']); | 160 | $this->param['id'], $this->user['project_id']); |
| 161 | $this->editRoute($this->param['id'],$route); | 161 | $this->editRoute($this->param['id'],$route); |
| 162 | + $this->param['route'] = $route; | ||
| 162 | $rs = $this->model->edit($this->param,['id'=>$this->param['id']]); | 163 | $rs = $this->model->edit($this->param,['id'=>$this->param['id']]); |
| 163 | if($rs === false){ | 164 | if($rs === false){ |
| 164 | $this->fail('系统错误,请连续管理员'); | 165 | $this->fail('系统错误,请连续管理员'); |
| @@ -10,7 +10,11 @@ | @@ -10,7 +10,11 @@ | ||
| 10 | namespace App\Http\Logic\Bside\Geo; | 10 | namespace App\Http\Logic\Bside\Geo; |
| 11 | 11 | ||
| 12 | use App\Http\Logic\Bside\BaseLogic; | 12 | use App\Http\Logic\Bside\BaseLogic; |
| 13 | +use App\Models\Geo\GeoPlatform; | ||
| 14 | +use App\Models\Geo\GeoQuestion; | ||
| 15 | +use App\Models\Geo\GeoQuestionLog; | ||
| 13 | use App\Models\Geo\GeoQuestionResult; | 16 | use App\Models\Geo\GeoQuestionResult; |
| 17 | +use Illuminate\Support\Facades\DB; | ||
| 14 | 18 | ||
| 15 | class GeoQuestionResLogic extends BaseLogic | 19 | class GeoQuestionResLogic extends BaseLogic |
| 16 | { | 20 | { |
| @@ -44,6 +48,11 @@ class GeoQuestionResLogic extends BaseLogic | @@ -44,6 +48,11 @@ class GeoQuestionResLogic extends BaseLogic | ||
| 44 | */ | 48 | */ |
| 45 | public function getResultList($map = [],$page = 1,$row = 20){ | 49 | public function getResultList($map = [],$page = 1,$row = 20){ |
| 46 | $filed = ['id','project_id','question_id','platform','question','en_question','keywords','url','created_at','updated_at']; | 50 | $filed = ['id','project_id','question_id','platform','question','en_question','keywords','url','created_at','updated_at']; |
| 51 | + 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']]; | ||
| 54 | + $this->model = new GeoQuestionLog(); | ||
| 55 | + } | ||
| 47 | $query = $this->model->formatQuery($map); | 56 | $query = $this->model->formatQuery($map); |
| 48 | $query = $query->where(function ($q) { | 57 | $query = $query->where(function ($q) { |
| 49 | $q->whereRaw('JSON_LENGTH(keywords) > 0') | 58 | $q->whereRaw('JSON_LENGTH(keywords) > 0') |
| @@ -64,4 +73,73 @@ class GeoQuestionResLogic extends BaseLogic | @@ -64,4 +73,73 @@ class GeoQuestionResLogic extends BaseLogic | ||
| 64 | $data = $this->model->read($this->param); | 73 | $data = $this->model->read($this->param); |
| 65 | return $this->success($data); | 74 | return $this->success($data); |
| 66 | } | 75 | } |
| 76 | + | ||
| 77 | + /** | ||
| 78 | + * @remark :统计数量 | ||
| 79 | + * @name :countQuantity | ||
| 80 | + * @author :lyh | ||
| 81 | + * @method :post | ||
| 82 | + * @time :2025/7/21 11:12 | ||
| 83 | + */ | ||
| 84 | + public function countQuantity(){ | ||
| 85 | + $questionModel = new GeoQuestion(); | ||
| 86 | + $list = $questionModel->list(['project_id',$this->user['project_id']],['question','keywords','url']); | ||
| 87 | + $questionTotalCount = $urlTotalCount = $keywordsTotalCount = $keywordUrlCount = 0; | ||
| 88 | + foreach ($list as $item){ | ||
| 89 | + $questionTotalCount += count($item['question'] ?? []); | ||
| 90 | + $keywordsTotalCount += count($item['keywords'] ?? []); | ||
| 91 | + $urlTotalCount += count($item['url'] ?? []); | ||
| 92 | + } | ||
| 93 | + $keywordArr = []; | ||
| 94 | + $questionResModel = new GeoQuestionResult(); | ||
| 95 | + $resList = $questionResModel->list(['project_id',$this->user['project_id']],['keywords_num','url_num']); | ||
| 96 | + foreach ($resList as $resItem){ | ||
| 97 | + $keywordsNumArr = json_decode($resItem['keywords_num'] ?? [], true); // 转为 PHP 关联数组 | ||
| 98 | + $keywordUrlCount += array_sum($keywordsNumArr); // 获取值的总和 | ||
| 99 | + $urlNumArr = json_decode($resItem['url'] ?? [],true); | ||
| 100 | + $keywordUrlCount += array_sum($urlNumArr); // 获取值的总和 | ||
| 101 | + foreach ($resItem['keywords_num'] as $key => $value) { | ||
| 102 | + $keywordArr[$key] = ($keywordArr[$key] ?? 0) + $value; | ||
| 103 | + } | ||
| 104 | + } | ||
| 105 | + $data = [ | ||
| 106 | + 'keywords_count'=>$keywordsTotalCount, | ||
| 107 | + 'url_count'=>$urlTotalCount, | ||
| 108 | + 'question_count'=>$questionTotalCount, | ||
| 109 | + 'keywords_url_count'=>$keywordUrlCount, | ||
| 110 | + 'keywords_arr' => $keywordArr, | ||
| 111 | + ]; | ||
| 112 | + return $this->success($data); | ||
| 113 | + } | ||
| 114 | + | ||
| 115 | + /** | ||
| 116 | + * @remark :按平台统计问题数量 | ||
| 117 | + * @name :platformHitCount | ||
| 118 | + * @author :lyh | ||
| 119 | + * @method :post | ||
| 120 | + * @time :2025/7/21 15:00 | ||
| 121 | + */ | ||
| 122 | + public function platformHitCount(){ | ||
| 123 | + $data = []; | ||
| 124 | + $platformModel = new GeoPlatform(); | ||
| 125 | + $list = $platformModel->list(['status'=>1],'id',['name','en_name']); | ||
| 126 | + $questionResModel = new GeoQuestionResult(); | ||
| 127 | + foreach ($list as $item){ | ||
| 128 | + $data[$item['name']] = $questionResModel->counts(['project_id'=>$this->user['project_id'],'hit'=>['!=',0],'platform'=>$item['en_name']]); | ||
| 129 | + } | ||
| 130 | + return $this->success($data); | ||
| 131 | + } | ||
| 132 | + | ||
| 133 | + /** | ||
| 134 | + * @remark :获取搜索时间 | ||
| 135 | + * @name :getSearchDate | ||
| 136 | + * @author :lyh | ||
| 137 | + * @method :post | ||
| 138 | + * @time :2025/7/21 16:36 | ||
| 139 | + */ | ||
| 140 | + public function getSearchDate(){ | ||
| 141 | + $dates = $this->model->select(DB::raw('DATE(created_at) as date_only'))->distinct()->pluck('date_only'); | ||
| 142 | + return $this->success($dates); | ||
| 143 | + } | ||
| 144 | + | ||
| 67 | } | 145 | } |
| @@ -24,14 +24,14 @@ class AsideTicketUpdateRequest extends FormRequest | @@ -24,14 +24,14 @@ class AsideTicketUpdateRequest extends FormRequest | ||
| 24 | public function rules() | 24 | public function rules() |
| 25 | { | 25 | { |
| 26 | return [ | 26 | return [ |
| 27 | - 'title' => 'required|string', | ||
| 28 | - 'content' => 'required|string', | 27 | + 'title' => 'nullable|string', |
| 28 | + 'content' => 'nullable|string', | ||
| 29 | 'files' => 'nullable|array', | 29 | 'files' => 'nullable|array', |
| 30 | 'status' => 'nullable|in:0,1,2,3|integer', | 30 | 'status' => 'nullable|in:0,1,2,3|integer', |
| 31 | 'engineer_ids' => 'nullable|array', | 31 | 'engineer_ids' => 'nullable|array', |
| 32 | 'star' => 'nullable|in:1,2,3|integer', | 32 | 'star' => 'nullable|in:1,2,3|integer', |
| 33 | 'plan_end_at' => 'nullable|date', | 33 | 'plan_end_at' => 'nullable|date', |
| 34 | - 'reply' => 'nullable|string', // 弃用 | 34 | + 'reply' => 'nullable|string', // 弃用 |
| 35 | ]; | 35 | ]; |
| 36 | } | 36 | } |
| 37 | } | 37 | } |
| 1 | +<?php | ||
| 2 | + | ||
| 3 | +namespace App\Http\Requests\Aside\WorkOrder; | ||
| 4 | + | ||
| 5 | +use Illuminate\Foundation\Http\FormRequest; | ||
| 6 | + | ||
| 7 | +class TicketProjectUpdateRequest extends FormRequest | ||
| 8 | +{ | ||
| 9 | + /** | ||
| 10 | + * Determine if the user is authorized to make this request. | ||
| 11 | + * | ||
| 12 | + * @return bool | ||
| 13 | + */ | ||
| 14 | + public function authorize() | ||
| 15 | + { | ||
| 16 | + return true; | ||
| 17 | + } | ||
| 18 | + | ||
| 19 | + /** | ||
| 20 | + * Get the validation rules that apply to the request. | ||
| 21 | + * | ||
| 22 | + * @return array | ||
| 23 | + */ | ||
| 24 | + public function rules() | ||
| 25 | + { | ||
| 26 | + return [ | ||
| 27 | + 'subtitle' => 'nullable|string', | ||
| 28 | + 'wechat_switch' => 'nullable|boolean', | ||
| 29 | + ]; | ||
| 30 | + } | ||
| 31 | +} |
| @@ -25,7 +25,7 @@ class NewsRequest extends FormRequest | @@ -25,7 +25,7 @@ class NewsRequest extends FormRequest | ||
| 25 | { | 25 | { |
| 26 | return [ | 26 | return [ |
| 27 | 'name'=>'required|max:200', | 27 | 'name'=>'required|max:200', |
| 28 | - 'remark'=>'max:2000', | 28 | +// 'remark'=>'max:2000', |
| 29 | 'url'=>'required', | 29 | 'url'=>'required', |
| 30 | ]; | 30 | ]; |
| 31 | } | 31 | } |
| @@ -36,7 +36,7 @@ class NewsRequest extends FormRequest | @@ -36,7 +36,7 @@ class NewsRequest extends FormRequest | ||
| 36 | 'name.required'=>'请填写名称', | 36 | 'name.required'=>'请填写名称', |
| 37 | 'name.max'=>'名称超过最长长度200', | 37 | 'name.max'=>'名称超过最长长度200', |
| 38 | 'url.required'=>'链接不能为空', | 38 | 'url.required'=>'链接不能为空', |
| 39 | - 'remark.max'=>'描述超过最长长度2000' | 39 | +// 'remark.max'=>'描述超过最长长度2000' |
| 40 | ]; | 40 | ]; |
| 41 | } | 41 | } |
| 42 | } | 42 | } |
| @@ -362,4 +362,16 @@ class Base extends Model | @@ -362,4 +362,16 @@ class Base extends Model | ||
| 362 | $lists = $lists->toArray(); | 362 | $lists = $lists->toArray(); |
| 363 | return $lists; | 363 | return $lists; |
| 364 | } | 364 | } |
| 365 | + | ||
| 366 | + /** | ||
| 367 | + * @remark :根据条件获取单个值 | ||
| 368 | + * @name :getValue | ||
| 369 | + * @author :lyh | ||
| 370 | + * @method :post | ||
| 371 | + * @time :2025/7/22 10:00 | ||
| 372 | + */ | ||
| 373 | + public function getValue($data,$field = 'id'){ | ||
| 374 | + $data = $this->filterRequestData($data); | ||
| 375 | + return $this->formatQuery($data)->value($field); | ||
| 376 | + } | ||
| 365 | } | 377 | } |
| @@ -15,6 +15,7 @@ class Notify extends Base | @@ -15,6 +15,7 @@ class Notify extends Base | ||
| 15 | const STATUS_FINISH_PAGE = 2; | 15 | const STATUS_FINISH_PAGE = 2; |
| 16 | const STATUS_FINISH_SITEMAP = 3; | 16 | const STATUS_FINISH_SITEMAP = 3; |
| 17 | const STATUS_ING_SITEMAP = 4; | 17 | const STATUS_ING_SITEMAP = 4; |
| 18 | + const STATUS_MAX_PAGE = 8; | ||
| 18 | const STATUS_ERROR = 9; | 19 | const STATUS_ERROR = 9; |
| 19 | 20 | ||
| 20 | /** | 21 | /** |
| @@ -32,7 +33,8 @@ class Notify extends Base | @@ -32,7 +33,8 @@ class Notify extends Base | ||
| 32 | * 3:指定路由,按url生成 | 33 | * 3:指定路由,按url生成 |
| 33 | * 4:生成聚合页生成 | 34 | * 4:生成聚合页生成 |
| 34 | * 5:生成漏翻页面 | 35 | * 5:生成漏翻页面 |
| 35 | - * 6:生成视频聚合页 | 36 | + * 6:生成视频聚合 |
| 37 | + * 7:生成AI博客页面 | ||
| 36 | */ | 38 | */ |
| 37 | const ROUTE_ALL = 1; | 39 | const ROUTE_ALL = 1; |
| 38 | const ROUTE_NEED = 2; | 40 | const ROUTE_NEED = 2; |
| @@ -59,6 +61,7 @@ class Notify extends Base | @@ -59,6 +61,7 @@ class Notify extends Base | ||
| 59 | self::TYPE_MASTER => '主站', | 61 | self::TYPE_MASTER => '主站', |
| 60 | self::TYPE_MINOR => '小语种', | 62 | self::TYPE_MINOR => '小语种', |
| 61 | self::TYPE_AMP => 'AMP', | 63 | self::TYPE_AMP => 'AMP', |
| 64 | + self::TYPE_ALL_SITEMAP => 'sitemap', | ||
| 62 | ]; | 65 | ]; |
| 63 | } | 66 | } |
| 64 | 67 | ||
| @@ -70,7 +73,7 @@ class Notify extends Base | @@ -70,7 +73,7 @@ class Notify extends Base | ||
| 70 | { | 73 | { |
| 71 | return [ | 74 | return [ |
| 72 | self::ROUTE_ALL => '主站页面', | 75 | self::ROUTE_ALL => '主站页面', |
| 73 | - self::ROUTE_NEED => '更新页面', | 76 | + self::ROUTE_NEED => '按需更新', |
| 74 | self::ROUTE_URL => '指定路由', | 77 | self::ROUTE_URL => '指定路由', |
| 75 | self::ROUTE_PRODUCT_KEYWORD => '聚合页面', | 78 | self::ROUTE_PRODUCT_KEYWORD => '聚合页面', |
| 76 | self::ROUTE_NOT_TRANSLATE => '漏翻检查', | 79 | self::ROUTE_NOT_TRANSLATE => '漏翻检查', |
| @@ -90,8 +93,9 @@ class Notify extends Base | @@ -90,8 +93,9 @@ class Notify extends Base | ||
| 90 | self::STATUS_FINISH_ROUTE => '页面生成中', | 93 | self::STATUS_FINISH_ROUTE => '页面生成中', |
| 91 | self::STATUS_FINISH_PAGE => 'sitemap排队中', | 94 | self::STATUS_FINISH_PAGE => 'sitemap排队中', |
| 92 | self::STATUS_ING_SITEMAP => 'sitemap生成中', | 95 | self::STATUS_ING_SITEMAP => 'sitemap生成中', |
| 93 | - self::STATUS_FINISH_SITEMAP => '完成', | ||
| 94 | - self::STATUS_ERROR => '失败', | 96 | + self::STATUS_FINISH_SITEMAP => '任务完成', |
| 97 | + self::STATUS_MAX_PAGE => '数量超限停止', | ||
| 98 | + self::STATUS_ERROR => '任务失败', | ||
| 95 | ]; | 99 | ]; |
| 96 | } | 100 | } |
| 97 | } | 101 | } |
| @@ -69,4 +69,34 @@ class GeoQuestionResult extends Base | @@ -69,4 +69,34 @@ class GeoQuestionResult extends Base | ||
| 69 | } | 69 | } |
| 70 | return $value; | 70 | return $value; |
| 71 | } | 71 | } |
| 72 | + | ||
| 73 | + /** | ||
| 74 | + * @remark :命中的关键词数量 | ||
| 75 | + * @name :getKeywordsNumAttribute | ||
| 76 | + * @author :lyh | ||
| 77 | + * @method :post | ||
| 78 | + * @time :2025/7/21 11:33 | ||
| 79 | + */ | ||
| 80 | + public function getKeywordsNumAttribute($value) | ||
| 81 | + { | ||
| 82 | + if($value){ | ||
| 83 | + $value = Arr::s2a($value); | ||
| 84 | + } | ||
| 85 | + return $value; | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + /** | ||
| 89 | + * @remark :命中的url数量 | ||
| 90 | + * @name :getUrlNumAttribute | ||
| 91 | + * @author :lyh | ||
| 92 | + * @method :post | ||
| 93 | + * @time :2025/7/21 11:34 | ||
| 94 | + */ | ||
| 95 | + public function getUrlNumAttribute($value) | ||
| 96 | + { | ||
| 97 | + if($value){ | ||
| 98 | + $value = Arr::s2a($value); | ||
| 99 | + } | ||
| 100 | + return $value; | ||
| 101 | + } | ||
| 72 | } | 102 | } |
| @@ -11,6 +11,8 @@ class ManageHr extends Base | @@ -11,6 +11,8 @@ class ManageHr extends Base | ||
| 11 | const GID_ZERO = 0;//超级管理员 | 11 | const GID_ZERO = 0;//超级管理员 |
| 12 | 12 | ||
| 13 | const STATUS_ONE = 1; | 13 | const STATUS_ONE = 1; |
| 14 | + | ||
| 15 | + const IS_LEADER = 1;//组长 | ||
| 14 | /** | 16 | /** |
| 15 | * 特殊字段 | 17 | * 特殊字段 |
| 16 | * @return string[] | 18 | * @return string[] |
| @@ -202,4 +204,32 @@ class ManageHr extends Base | @@ -202,4 +204,32 @@ class ManageHr extends Base | ||
| 202 | } | 204 | } |
| 203 | return $name; | 205 | return $name; |
| 204 | } | 206 | } |
| 207 | + | ||
| 208 | + /** | ||
| 209 | + * @remark :根据当前用户登录的id获取当前用户的组长 | ||
| 210 | + * @name :accordIdGetLeader | ||
| 211 | + * @author :lyh | ||
| 212 | + * @method :post | ||
| 213 | + * @time :2025/7/22 9:42 | ||
| 214 | + * @param :id->当前用户的人事id | ||
| 215 | + */ | ||
| 216 | + public function accordIdGetLeader($id = 0){ | ||
| 217 | + if(empty($id)){ | ||
| 218 | + return 0; | ||
| 219 | + } | ||
| 220 | + //查看当前用户是否为组长 | ||
| 221 | + $info = $this->read(['id'=>$id],['belong_group','is_leader','dept_id']); | ||
| 222 | + if($info === false){ | ||
| 223 | + return 0; | ||
| 224 | + } | ||
| 225 | + //不是组长:根据小组获取组长 | ||
| 226 | + if($info['is_leader'] != self::IS_LEADER){ | ||
| 227 | + $id = $this->getValue(['belong_group'=>$info['belong_group'],'dept_id'=>$info['dept_id'],'is_leader'=> self::IS_LEADER]); | ||
| 228 | + if(empty($id)){ | ||
| 229 | + //未获取到时,根据当前大组去随机获取一个组长 | ||
| 230 | + $id = $this->getValue(['dept_id'=>$info['dept_id'],'is_leader'=> self::IS_LEADER]); | ||
| 231 | + } | ||
| 232 | + } | ||
| 233 | + return $id; | ||
| 234 | + } | ||
| 205 | } | 235 | } |
| @@ -40,6 +40,7 @@ class Tickets extends Base | @@ -40,6 +40,7 @@ class Tickets extends Base | ||
| 40 | * 逻辑说明: | 40 | * 逻辑说明: |
| 41 | * 1. 如果当前项目是超迹,要把徐莹和第一负责人加进去,为参与人 | 41 | * 1. 如果当前项目是超迹,要把徐莹和第一负责人加进去,为参与人 |
| 42 | * 2. 若是域途项目,把黄小玉和第一负责人加进去,为参与人 | 42 | * 2. 若是域途项目,把黄小玉和第一负责人加进去,为参与人 |
| 43 | + * 3. 若是V5V6的项目,则把组长和第一负责人加进去,为参与人 | ||
| 43 | */ | 44 | */ |
| 44 | public function saveEngineers($engineer_ids = []) | 45 | public function saveEngineers($engineer_ids = []) |
| 45 | { | 46 | { |
| @@ -51,6 +52,9 @@ class Tickets extends Base | @@ -51,6 +52,9 @@ class Tickets extends Base | ||
| 51 | $canyu[] = 20; // 徐莹 | 52 | $canyu[] = 20; // 徐莹 |
| 52 | elseif ($this->project->project_cate == 4) | 53 | elseif ($this->project->project_cate == 4) |
| 53 | $canyu[] = 85; // 黄小玉 | 54 | $canyu[] = 85; // 黄小玉 |
| 55 | + else{ | ||
| 56 | + // todo 待完善 | ||
| 57 | + } | ||
| 54 | 58 | ||
| 55 | $all_engineer_ids = array_unique(array_merge($canyu, $engineer_ids)); | 59 | $all_engineer_ids = array_unique(array_merge($canyu, $engineer_ids)); |
| 56 | 60 |
| @@ -76,7 +76,7 @@ class GeoService | @@ -76,7 +76,7 @@ class GeoService | ||
| 76 | * @method :post | 76 | * @method :post |
| 77 | * @time :2025/7/15 10:59 | 77 | * @time :2025/7/15 10:59 |
| 78 | */ | 78 | */ |
| 79 | - public function getDeepSeekResult($content){ | 79 | + public function getDeepSeekResult($content,$model = 'deepseek-r1'){ |
| 80 | $url = $this->api_url . 'v1/chat'; | 80 | $url = $this->api_url . 'v1/chat'; |
| 81 | $header = [ | 81 | $header = [ |
| 82 | 'accept: application/json', | 82 | 'accept: application/json', |
| @@ -91,7 +91,7 @@ class GeoService | @@ -91,7 +91,7 @@ class GeoService | ||
| 91 | 'role'=>'user' | 91 | 'role'=>'user' |
| 92 | ], | 92 | ], |
| 93 | ], | 93 | ], |
| 94 | - 'model' => 'deepseek-r1', | 94 | + 'model' => $model, |
| 95 | "supplier"=> "bailian", | 95 | "supplier"=> "bailian", |
| 96 | 'security_check' => true | 96 | 'security_check' => true |
| 97 | ]; | 97 | ]; |
| @@ -28,7 +28,7 @@ class ProjectServer | @@ -28,7 +28,7 @@ class ProjectServer | ||
| 28 | <div class="layout" data-unable="demo01-error404"> | 28 | <div class="layout" data-unable="demo01-error404"> |
| 29 | <img src="https://ecdn6.globalso.com/upload/m/image_other/2023-10/6528a87e594db30162.png" alt=""/> | 29 | <img src="https://ecdn6.globalso.com/upload/m/image_other/2023-10/6528a87e594db30162.png" alt=""/> |
| 30 | </div> | 30 | </div> |
| 31 | - <p style="text-align: center">SORRY. THE PAGE HAS EITHER MOVED OR CANNOT BE FOUND.</p> | 31 | + <h1 style="text-align: center">SORRY. THE PAGE HAS EITHER MOVED OR CANNOT BE FOUND.</h1> |
| 32 | <style> | 32 | <style> |
| 33 | .section-block-error404 .layout { | 33 | .section-block-error404 .layout { |
| 34 | height: 700px; | 34 | height: 700px; |
| @@ -257,6 +257,7 @@ Route::middleware(['aloginauth'])->group(function () { | @@ -257,6 +257,7 @@ Route::middleware(['aloginauth'])->group(function () { | ||
| 257 | Route::post('/{id}', [Aside\WorkOrder\AsideTicketController::class, 'update'])->name('admin.tickets.update')->summary('A端更新工单,审核,邀请同事'); | 257 | Route::post('/{id}', [Aside\WorkOrder\AsideTicketController::class, 'update'])->name('admin.tickets.update')->summary('A端更新工单,审核,邀请同事'); |
| 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::get('/v56_projects/list', [Aside\WorkOrder\AsideTicketController::class, 'projectList'])->name('admin.tickets.projectList')->summary('A端V5V6项目列表') | 261 | Route::get('/v56_projects/list', [Aside\WorkOrder\AsideTicketController::class, 'projectList'])->name('admin.tickets.projectList')->summary('A端V5V6项目列表') |
| 261 | ->description("project_cate[项目分类1]: 1 V5, 2 V6, 3 超迹, 4 域途"); | 262 | ->description("project_cate[项目分类1]: 1 V5, 2 V6, 3 超迹, 4 域途"); |
| 262 | Route::post('/log/{id}', [Aside\WorkOrder\AsideTicketLogController::class, 'update'])->name('admin.tickets.log.update')->summary('A端工单操作日志更新,完成工单'); | 263 | Route::post('/log/{id}', [Aside\WorkOrder\AsideTicketLogController::class, 'update'])->name('admin.tickets.log.update')->summary('A端工单操作日志更新,完成工单'); |
| @@ -755,6 +755,8 @@ Route::middleware(['bloginauth'])->group(function () { | @@ -755,6 +755,8 @@ Route::middleware(['bloginauth'])->group(function () { | ||
| 755 | Route::any('/getInfo', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class,'getInfo'])->name('geo_result_getInfo'); | 755 | Route::any('/getInfo', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class,'getInfo'])->name('geo_result_getInfo'); |
| 756 | Route::any('/getType', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class, 'getType'])->name('geo_result_getType');//geo设置类型 | 756 | Route::any('/getType', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class, 'getType'])->name('geo_result_getType');//geo设置类型 |
| 757 | Route::any('/getCount', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class, 'getCount'])->name('geo_result_getCount');//geo设置类型统计数量 | 757 | Route::any('/getCount', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class, 'getCount'])->name('geo_result_getCount');//geo设置类型统计数量 |
| 758 | + Route::any('/countQuantity', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class, 'countQuantity'])->name('geo_result_countQuantity');//geo统计 | ||
| 759 | + Route::any('/getSearchDate', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class, 'getSearchDate'])->name('geo_result_getSearchDate');//搜索记录时间 | ||
| 758 | }); | 760 | }); |
| 759 | }); | 761 | }); |
| 760 | //无需登录验证的路由组 | 762 | //无需登录验证的路由组 |
-
请 注册 或 登录 后发表评论