作者 赵彬吉
... ... @@ -31,22 +31,19 @@ class RemainDay extends Command
];//需要单独处理的项目
/**
* @var int[]
* 按照达标天数收费的项目(白帽)
*/
protected $bm_projectId = [
4247,4299,4310,4215,4038,4084,4148
];
/**
* @var 暂停的项目
*/
protected $ceaseProjectId = [
354,
378,
649,
1226,
1283,
1703,
1893,
2066,
2250,
2193,
2399,
1685,
3309
354, 378, 649, 1226, 1283, 1703, 1893, 2066, 2250, 2193, 2399, 1685, 3309
];//需要单独处理的项目
/**
* The console command description.
... ... @@ -123,11 +120,13 @@ class RemainDay extends Command
//白帽版本的系统
if($deploy_build['seo_plan'] == 1){
if($deploy_build['seo_service_duration'] != 0){
if($item['bm_finish_remain_day']){
$compliance_day = (int)$item['bm_finish_remain_day'];
$seo_remain_day = $deploy_build['seo_service_duration'] - $compliance_day;
if(in_array($item['id'],$this->bm_projectId)){
$seo_remain_day = $deploy_build['seo_service_duration'] - (int)$item['bm_finish_remain_day'];
}else{
$seo_remain_day = $deploy_build['seo_service_duration'];
//按自然日统计
$diff = time() - strtotime($item['uptime']);
$compliance_day = floor($diff / (60 * 60 * 24));
$seo_remain_day = $deploy_build['service_duration'] - $compliance_day;
}
if($deploy_build['plan'] == 0 && $seo_remain_day < 0 && $deploy_build['seo_service_duration'] != 0){//只有白帽版本的项目且剩余服务时常为0,放入未续费中
// $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
$geoLogModel = new GeoQuestionLog();
foreach ($taskInfo['question'] as $question) {
$en_question = Translate::tran($question, 'zh') ?? '';
$this->output('项目ID:' . $taskInfo['project_id'] . ', 问题 开始:' . $question);
foreach ($platformsArr as $platform) {
$data = $hit_data = [];
$error_num = 0;
... ... @@ -84,10 +85,10 @@ class GeoQuestionRes extends Command
GET_RESULT:
$error_num++;
try {
$this->output('执行时间:'.date('Y-m-d H:i:s').'->执行次数:'.$error_num.',执行平台:'.$platform.'执行的项目id:'.$taskInfo['project_id'].PHP_EOL);
if ($error_num >= 3) {
continue;
}
$this->output('执行平台:' . $platform . '执行次数:' . $error_num);
switch ($platform){
case 'google_ai_overview':
// overview 数据结构不确定, 需要单独处理数据
... ... @@ -98,6 +99,10 @@ class GeoQuestionRes extends Command
$data = $geo_service->getDeepSeekResult($question);
$result = $this->dealDeepSeek($data);
break;
case 'gpt-4o-mini':
$data = $geo_service->getDeepSeekResult($question,'gpt-4o-mini');
$result = $this->dealDeepSeek($data,'gpt-4o-mini');
break;
default:
$result = $geo_service->getAiPlatformResult($question, $platform);
break;
... ... @@ -215,10 +220,10 @@ class GeoQuestionRes extends Command
* @method :post
* @time :2025/7/15 10:58
*/
public function dealDeepSeek($data){
public function dealDeepSeek($data,$model = 'DeepSeek'){
$result = [
'code' => 200,
'model' => 'DeepSeek',
'model' => $model,
'text' => '',
];
$texts = [];
... ...
... ... @@ -42,18 +42,34 @@ class lyhDemo extends Command
protected $description = '更新路由';
public function handle(){
ProjectServer::useProject(3531);
$newsModel = new News();
$rows = $newsModel->select('id', 'text')->get();
foreach ($rows as $row) {
echo '执行数据id:'.$row->id.PHP_EOL;
$newText = preg_replace('/<h1 class="t">.*?<\/h1>/is', '', $row->text);
$newsModel->where('id', $row->id)->update(['text' => $newText]);
return $this->_actionRoute();
}
/**
* @remark :查看路由是否为空
* @name :_actionRoute
* @author :lyh
* @method :post
* @time :2025/7/22 15:14
*/
public function _actionRoute(){
$projectModel = new Project();
$lists = $projectModel->list(['delete_status' => 0,'project_type'=>0,'extend_type'=>0,'type'=>['in',[2,3,4,6]]], 'id', ['id']);
$data = [];
foreach ($lists as $item){
echo date('Y-m-d H:i:s') . '开始--项目的id:'. $item['id'] . PHP_EOL;
ProjectServer::useProject($item['id']);
$aiBlogModel = new AiBlog();
$info = $aiBlogModel->read(['route'=>null],['id']);
if($info !== false){
echo '项目id:'.$item['id'].PHP_EOL;
$data[] = $item['id'];
}
dd($data);
echo 'end';
DB::disconnect('custom_mysql');
return true;
}
}
public function _actionTemplateMain(){
$data = [];
... ...
... ... @@ -43,7 +43,7 @@ class Temp extends Command
public function handle()
{
$this->specialImport();
}
/**
... ... @@ -54,8 +54,8 @@ class Temp extends Command
*/
public function specialImport()
{
$file_url = 'https://ecdn6.globalso.com/upload/p/3531/file/2025-06/news.csv';
$domain = 'www.hybio.com.cn';
$file_url = 'https://ecdn6.globalso.com/upload/p/3531/file/2025-07/www-cninfo-com-cn_news_v1-1.csv';
$domain = 'static.cninfo.com.cn';
$project_id = 3531;
$is_gbk = 0;
$file_code_type = $this->get_code_type($file_url);
... ... @@ -137,47 +137,58 @@ class Temp extends Command
protected function importModule($project_id, $domain, $data)
{
$module_id = 4;
$category_id = 3;
$model = new CustomModuleContent();
$module = $model->read(['name' => $data[0]]);
$module = $model->read(['module_id' => $module_id, 'name' => $data[0]]);
if (!$module) {
$content = '';
if ($data[4] ?? '') {
//处理内容中的图片
preg_match_all('/<img\s+[^>]*?src\s*=\s*(\'|\")(.*?)\\1[^>]*?\/?\s*>/i', $data[4], $result);
//处理内容中的pdf文件
preg_match_all('/<a\s+[^>]*?href\s*=\s*(\'|\")(.*?)\\1[^>]*?\/?\s*>/i', $data[4], $result);
if ($result[2] ?? []) {
foreach ($result[2] as $img) {
$new_img = check_remote_url_down($img, $project_id, $domain, 1);
$new_img && $data[4] = str_replace($img, $new_img, $data[4]);
foreach ($result[2] as $pdf) {
$new_img = check_remote_url_down($pdf, $project_id, $domain, 1);
$new_img && $data[4] = str_replace($pdf, $new_img, $data[4]);
}
}
//处理内容中的图片
// preg_match_all('/<img\s+[^>]*?src\s*=\s*(\'|\")(.*?)\\1[^>]*?\/?\s*>/i', $data[4], $result);
// if ($result[2] ?? []) {
// foreach ($result[2] as $img) {
// $new_img = check_remote_url_down($img, $project_id, $domain, 1);
// $new_img && $data[4] = str_replace($img, $new_img, $data[4]);
// }
// }
//处理内容中的视频
preg_match_all('/<source\s+[^>]*?src\s*=\s*(\'|\")(.*?)\\1[^>]*?\/?\s*>/i', $data[4], $result_video);
if ($result_video[2] ?? []) {
foreach ($result_video[2] as $video) {
$new_video = check_remote_url_down($video, $project_id, $domain, 1);
$new_video && $data[4] = str_replace($video, $new_video, $data[4]);
}
}
// preg_match_all('/<source\s+[^>]*?src\s*=\s*(\'|\")(.*?)\\1[^>]*?\/?\s*>/i', $data[4], $result_video);
// if ($result_video[2] ?? []) {
// foreach ($result_video[2] as $video) {
// $new_video = check_remote_url_down($video, $project_id, $domain, 1);
// $new_video && $data[4] = str_replace($video, $new_video, $data[4]);
// }
// }
$content = $data[4];
}
$seo_title = '';
if ($data[6] ?? '') {
$seo_title = substr(strip_tags($data[6]), 0, 70);
}
$seo_title = '巨潮资讯网';
// if ($data[6] ?? '') {
// $seo_title = substr(strip_tags($data[6]), 0, 70);
// }
$seo_keywords = '';
if ($data[7] ?? '') {
$seo_keywords = substr(strip_tags(str_replace('^v6sp$', ',', $data[7])), 0, 255);
}
$seo_keywords = '巨潮资讯网,巨潮网,巨潮资讯,上市公司公告,巨潮,信息披露,法定披露,披露,创业板,基金,债券,财务数据,网络投票,互动易';
// if ($data[7] ?? '') {
// $seo_keywords = substr(strip_tags(str_replace('^v6sp$', ',', $data[7])), 0, 255);
// }
$seo_description = '';
if ($data[8] ?? '') {
$seo_description = substr(strip_tags($data[8]), 0, 200);
}
$seo_description = '巨潮资讯网是中国证监会指定的上市公司信息披露网站,平台提供上市公司公告、公司资讯、公司互动、股东大会网络投票等内容功能,一站式服务资本市场投资者。';
// if ($data[8] ?? '') {
// $seo_description = substr(strip_tags($data[8]), 0, 200);
// }
$release_at = date('Y-m-d H:i:s');
if ($data[9] ?? '') {
... ... @@ -188,8 +199,8 @@ class Temp extends Command
$id = $model->addReturnId(
[
'name' => $data[0],
'category_id' => ',1,',
'module_id' => 2,
'category_id' => ',' . $category_id . ',',
'module_id' => $module_id,
'content' => $content,
'seo_title' => $seo_title,
'seo_keywords' => $seo_keywords,
... ...
... ... @@ -174,8 +174,8 @@ class NoticeController extends BaseController
'target_domain' => $target_domain
]);
}else{
if($task_redirect_info['status'] == DomainRedirectTask::STATUS_FAL){
$redirect_model->edit(['status'=>DomainRedirectTask::STATUS_UN,'error_msg'=>null],['id'=>$task_redirect_info['id']]);
if($task_redirect_info['status'] > DomainRedirectTask::STATUS_ING){
$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']]);
}
}
... ...
... ... @@ -33,9 +33,11 @@ use App\Models\Project\ProcessRecords;
use App\Models\Project\Project;
use App\Models\Project\ProjectUpdateTdk;
use App\Models\Project\RenewLog;
use App\Models\ProjectAssociation\ProjectAssociation;
use App\Models\RankData\RankData;
use App\Models\Task\Task;
use App\Models\WebSetting\WebLanguage;
use App\Models\WorkOrder\TicketProject;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
... ... @@ -70,23 +72,13 @@ class ProjectController extends BaseController
if(!empty($lists) && !empty($lists['list'])){
foreach ($lists['list'] as $k => $v){
$v = $this->handleParam($v);
// 组装 工单UUID
$ticketProject = null;
$ticketProject = DB::table('gl_ticket_projects')
->where('table_id', $v['id'])
->where('project_cate', 2)
->first();
$v['uuid'] = $ticketProject ? $ticketProject->uuid : null;
// 组装 工单UUID END
$lists['list'][$k] = $v;
}
}
$this->response('success',Code::SUCCESS,$lists);
}
/**
* 需要查询的字段
* @return array
... ... @@ -458,6 +450,8 @@ class ProjectController extends BaseController
$item['task_finish_num'] = Task::getNumByProjectId($item['id'], Task::STATUS_DOWN);
$item['task_pending_num'] = Task::getNumByProjectId($item['id'], [Task::STATUS_DONGING, Task::STATUS_WAIT]);
$item['collect_time'] = $item['is_upgrade'] ? UpdateLog::getProjectUpdate($item['id']) : '';
$item['uuid'] = TicketProject::where('table_id', $item['id'])->where('project_cate', 2)->value('uuid') ?? null;
$item['friend_id'] = ProjectAssociation::where('project_id', $item['id'])->where('status', ProjectAssociation::STATUS_NORMAL)->where('binding_app', ProjectAssociation::ENTERPRISE_WECHAT)->value('friend_id') ?? null;
return $item;
}
... ...
... ... @@ -218,11 +218,17 @@ class AsideTicketController extends BaseController
$ticket->saveEngineers($request->input('engineer_ids'));
// 其他字段有提交数据才修改,比如star plan_end_at
$ticket->title = $request->input('title', $ticket->title);
$ticket->content = $request->input('content', $ticket->content);
$ticket->star = $request->input('star', $ticket->star);
$ticket->plan_end_at = $request->input('plan_end_at', $ticket->plan_end_at);
$ticket->status = $request->input('status', $ticket->status);
if ($request->input('title'))
$ticket->title = $request->input('title');
if ($request->input('content'))
$ticket->content = $request->input('content');
if ($request->input('star'))
$ticket->star = $request->input('star');
if ($request->input('plan_end_at'))
$ticket->plan_end_at = $request->input('plan_end_at');
if ($request->input('status'))
$ticket->status = $request->input('status');
if ($ticket->status == Tickets::STATUS_COMPLETED)
{
// 完成工单,把子任务里面未完成的工单改为完成
... ...
<?php
namespace App\Http\Controllers\Aside\WorkOrder;
use App\Enums\Common\Code;
use App\Http\Controllers\Aside\BaseController;
use App\Http\Controllers\Controller;
use App\Http\Requests\Aside\WorkOrder\TicketProjectUpdateRequest;
use App\Models\WorkOrder\TicketProject;
use Illuminate\Http\Request;
class TicketProjectController extends BaseController
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
//
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
//
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
//
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
//
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(TicketProjectUpdateRequest $request, $id)
{
$request->validated();
$project = TicketProject::where('uuid', $id)->first();
if (!$project) $this->response('Project not found', Code::USER_MODEL_NOTFOUND_ERROE);
if ($request->input('subtitle')) $project->subtitle = $request->input('subtitle');
$project->wechat_switch = $request->boolean('wechat_switch', true);
$project->save();
$this->response('Project updated successfully', Code::SUCCESS, $project);
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
//
}
}
... ...
... ... @@ -92,4 +92,46 @@ class GeoQuestionResController extends BaseController
$data = $this->logic->getResultInfo();
$this->response('success',Code::SUCCESS,$data);
}
/**
* @remark :统计数量
* @name :countQuantity
* @author :lyh
* @method :post
* @time :2025/7/21 10:58
*/
public function countQuantity(){
$data = $this->logic->countQuantity();
$data['platform'] = $this->logic->platformHitCount();
$this->response('success',Code::SUCCESS,$data);
}
/**
* @remark :获取搜索时间
* @name :getSearchDate
* @author :lyh
* @method :post
* @time :2025/7/21 16:35
*/
public function getSearchDate(){
$data = $this->logic->getSearchDate();
$this->response('success',Code::SUCCESS,$data);
}
/**
* @remark :获取搜索列表
* @name :getSearchList
* @author :lyh
* @method :post
* @time :2025/7/21 16:47
*/
public function getSearchList(){
$this->request->validate([
'created_at'=>'required',
],[
'created_at.required' => 'created_at不能为空',
]);
$data = $this->logic->getSearchList($this->map,$this->page,$this->row);
$this->response('success',Code::SUCCESS,$data);
}
}
... ...
... ... @@ -43,7 +43,8 @@ class TestController extends BaseController
* @time :2025/2/13 16:34
*/
public function ceshi(){
$data = Translate::tran('测试翻译', 'en');
$this->response('success',Code::SUCCESS,['data'=>$data]);
$hrModel = new ManageHr();
$data = $hrModel->accordIdGetLeader($this->param['id']);
$this->response('success',Code::SUCCESS,$data);
}
}
... ...
... ... @@ -159,6 +159,7 @@ class CustomModuleCategoryLogic extends BaseLogic
$route = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_MODULE_CATE,
$this->param['id'], $this->user['project_id']);
$this->editRoute($this->param['id'],$route);
$this->param['route'] = $route;
$rs = $this->model->edit($this->param,['id'=>$this->param['id']]);
if($rs === false){
$this->fail('系统错误,请连续管理员');
... ...
... ... @@ -10,7 +10,11 @@
namespace App\Http\Logic\Bside\Geo;
use App\Http\Logic\Bside\BaseLogic;
use App\Models\Geo\GeoPlatform;
use App\Models\Geo\GeoQuestion;
use App\Models\Geo\GeoQuestionLog;
use App\Models\Geo\GeoQuestionResult;
use Illuminate\Support\Facades\DB;
class GeoQuestionResLogic extends BaseLogic
{
... ... @@ -44,6 +48,11 @@ class GeoQuestionResLogic extends BaseLogic
*/
public function getResultList($map = [],$page = 1,$row = 20){
$filed = ['id','project_id','question_id','platform','question','en_question','keywords','url','created_at','updated_at'];
if(!empty($map['created_at'])){
$map['project_id'] = $this->user['project_id'];
$map['created_at'] = ['between',[$map['created_at'].' 00:00:00',$map['created_at'].'23:59:59']];
$this->model = new GeoQuestionLog();
}
$query = $this->model->formatQuery($map);
$query = $query->where(function ($q) {
$q->whereRaw('JSON_LENGTH(keywords) > 0')
... ... @@ -64,4 +73,73 @@ class GeoQuestionResLogic extends BaseLogic
$data = $this->model->read($this->param);
return $this->success($data);
}
/**
* @remark :统计数量
* @name :countQuantity
* @author :lyh
* @method :post
* @time :2025/7/21 11:12
*/
public function countQuantity(){
$questionModel = new GeoQuestion();
$list = $questionModel->list(['project_id',$this->user['project_id']],['question','keywords','url']);
$questionTotalCount = $urlTotalCount = $keywordsTotalCount = $keywordUrlCount = 0;
foreach ($list as $item){
$questionTotalCount += count($item['question'] ?? []);
$keywordsTotalCount += count($item['keywords'] ?? []);
$urlTotalCount += count($item['url'] ?? []);
}
$keywordArr = [];
$questionResModel = new GeoQuestionResult();
$resList = $questionResModel->list(['project_id',$this->user['project_id']],['keywords_num','url_num']);
foreach ($resList as $resItem){
$keywordsNumArr = json_decode($resItem['keywords_num'] ?? [], true); // 转为 PHP 关联数组
$keywordUrlCount += array_sum($keywordsNumArr); // 获取值的总和
$urlNumArr = json_decode($resItem['url'] ?? [],true);
$keywordUrlCount += array_sum($urlNumArr); // 获取值的总和
foreach ($resItem['keywords_num'] as $key => $value) {
$keywordArr[$key] = ($keywordArr[$key] ?? 0) + $value;
}
}
$data = [
'keywords_count'=>$keywordsTotalCount,
'url_count'=>$urlTotalCount,
'question_count'=>$questionTotalCount,
'keywords_url_count'=>$keywordUrlCount,
'keywords_arr' => $keywordArr,
];
return $this->success($data);
}
/**
* @remark :按平台统计问题数量
* @name :platformHitCount
* @author :lyh
* @method :post
* @time :2025/7/21 15:00
*/
public function platformHitCount(){
$data = [];
$platformModel = new GeoPlatform();
$list = $platformModel->list(['status'=>1],'id',['name','en_name']);
$questionResModel = new GeoQuestionResult();
foreach ($list as $item){
$data[$item['name']] = $questionResModel->counts(['project_id'=>$this->user['project_id'],'hit'=>['!=',0],'platform'=>$item['en_name']]);
}
return $this->success($data);
}
/**
* @remark :获取搜索时间
* @name :getSearchDate
* @author :lyh
* @method :post
* @time :2025/7/21 16:36
*/
public function getSearchDate(){
$dates = $this->model->select(DB::raw('DATE(created_at) as date_only'))->distinct()->pluck('date_only');
return $this->success($dates);
}
}
... ...
... ... @@ -24,8 +24,8 @@ class AsideTicketUpdateRequest extends FormRequest
public function rules()
{
return [
'title' => 'required|string',
'content' => 'required|string',
'title' => 'nullable|string',
'content' => 'nullable|string',
'files' => 'nullable|array',
'status' => 'nullable|in:0,1,2,3|integer',
'engineer_ids' => 'nullable|array',
... ...
<?php
namespace App\Http\Requests\Aside\WorkOrder;
use Illuminate\Foundation\Http\FormRequest;
class TicketProjectUpdateRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'subtitle' => 'nullable|string',
'wechat_switch' => 'nullable|boolean',
];
}
}
... ...
... ... @@ -25,7 +25,7 @@ class NewsRequest extends FormRequest
{
return [
'name'=>'required|max:200',
'remark'=>'max:2000',
// 'remark'=>'max:2000',
'url'=>'required',
];
}
... ... @@ -36,7 +36,7 @@ class NewsRequest extends FormRequest
'name.required'=>'请填写名称',
'name.max'=>'名称超过最长长度200',
'url.required'=>'链接不能为空',
'remark.max'=>'描述超过最长长度2000'
// 'remark.max'=>'描述超过最长长度2000'
];
}
}
... ...
... ... @@ -362,4 +362,16 @@ class Base extends Model
$lists = $lists->toArray();
return $lists;
}
/**
* @remark :根据条件获取单个值
* @name :getValue
* @author :lyh
* @method :post
* @time :2025/7/22 10:00
*/
public function getValue($data,$field = 'id'){
$data = $this->filterRequestData($data);
return $this->formatQuery($data)->value($field);
}
}
... ...
... ... @@ -15,6 +15,7 @@ class Notify extends Base
const STATUS_FINISH_PAGE = 2;
const STATUS_FINISH_SITEMAP = 3;
const STATUS_ING_SITEMAP = 4;
const STATUS_MAX_PAGE = 8;
const STATUS_ERROR = 9;
/**
... ... @@ -32,7 +33,8 @@ class Notify extends Base
* 3:指定路由,按url生成
* 4:生成聚合页生成
* 5:生成漏翻页面
* 6:生成视频聚合页
* 6:生成视频聚合
* 7:生成AI博客页面
*/
const ROUTE_ALL = 1;
const ROUTE_NEED = 2;
... ... @@ -59,6 +61,7 @@ class Notify extends Base
self::TYPE_MASTER => '主站',
self::TYPE_MINOR => '小语种',
self::TYPE_AMP => 'AMP',
self::TYPE_ALL_SITEMAP => 'sitemap',
];
}
... ... @@ -70,7 +73,7 @@ class Notify extends Base
{
return [
self::ROUTE_ALL => '主站页面',
self::ROUTE_NEED => '更新页面',
self::ROUTE_NEED => '按需更新',
self::ROUTE_URL => '指定路由',
self::ROUTE_PRODUCT_KEYWORD => '聚合页面',
self::ROUTE_NOT_TRANSLATE => '漏翻检查',
... ... @@ -90,8 +93,9 @@ class Notify extends Base
self::STATUS_FINISH_ROUTE => '页面生成中',
self::STATUS_FINISH_PAGE => 'sitemap排队中',
self::STATUS_ING_SITEMAP => 'sitemap生成中',
self::STATUS_FINISH_SITEMAP => '完成',
self::STATUS_ERROR => '失败',
self::STATUS_FINISH_SITEMAP => '任务完成',
self::STATUS_MAX_PAGE => '数量超限停止',
self::STATUS_ERROR => '任务失败',
];
}
}
... ...
... ... @@ -69,4 +69,34 @@ class GeoQuestionResult extends Base
}
return $value;
}
/**
* @remark :命中的关键词数量
* @name :getKeywordsNumAttribute
* @author :lyh
* @method :post
* @time :2025/7/21 11:33
*/
public function getKeywordsNumAttribute($value)
{
if($value){
$value = Arr::s2a($value);
}
return $value;
}
/**
* @remark :命中的url数量
* @name :getUrlNumAttribute
* @author :lyh
* @method :post
* @time :2025/7/21 11:34
*/
public function getUrlNumAttribute($value)
{
if($value){
$value = Arr::s2a($value);
}
return $value;
}
}
... ...
... ... @@ -11,6 +11,8 @@ class ManageHr extends Base
const GID_ZERO = 0;//超级管理员
const STATUS_ONE = 1;
const IS_LEADER = 1;//组长
/**
* 特殊字段
* @return string[]
... ... @@ -202,4 +204,32 @@ class ManageHr extends Base
}
return $name;
}
/**
* @remark :根据当前用户登录的id获取当前用户的组长
* @name :accordIdGetLeader
* @author :lyh
* @method :post
* @time :2025/7/22 9:42
* @param :id->当前用户的人事id
*/
public function accordIdGetLeader($id = 0){
if(empty($id)){
return 0;
}
//查看当前用户是否为组长
$info = $this->read(['id'=>$id],['belong_group','is_leader','dept_id']);
if($info === false){
return 0;
}
//不是组长:根据小组获取组长
if($info['is_leader'] != self::IS_LEADER){
$id = $this->getValue(['belong_group'=>$info['belong_group'],'dept_id'=>$info['dept_id'],'is_leader'=> self::IS_LEADER]);
if(empty($id)){
//未获取到时,根据当前大组去随机获取一个组长
$id = $this->getValue(['dept_id'=>$info['dept_id'],'is_leader'=> self::IS_LEADER]);
}
}
return $id;
}
}
... ...
... ... @@ -40,6 +40,7 @@ class Tickets extends Base
* 逻辑说明:
* 1. 如果当前项目是超迹,要把徐莹和第一负责人加进去,为参与人
* 2. 若是域途项目,把黄小玉和第一负责人加进去,为参与人
* 3. 若是V5V6的项目,则把组长和第一负责人加进去,为参与人
*/
public function saveEngineers($engineer_ids = [])
{
... ... @@ -51,6 +52,9 @@ class Tickets extends Base
$canyu[] = 20; // 徐莹
elseif ($this->project->project_cate == 4)
$canyu[] = 85; // 黄小玉
else{
// todo 待完善
}
$all_engineer_ids = array_unique(array_merge($canyu, $engineer_ids));
... ...
... ... @@ -76,7 +76,7 @@ class GeoService
* @method :post
* @time :2025/7/15 10:59
*/
public function getDeepSeekResult($content){
public function getDeepSeekResult($content,$model = 'deepseek-r1'){
$url = $this->api_url . 'v1/chat';
$header = [
'accept: application/json',
... ... @@ -91,7 +91,7 @@ class GeoService
'role'=>'user'
],
],
'model' => 'deepseek-r1',
'model' => $model,
"supplier"=> "bailian",
'security_check' => true
];
... ...
... ... @@ -28,7 +28,7 @@ class ProjectServer
<div class="layout" data-unable="demo01-error404">
<img src="https://ecdn6.globalso.com/upload/m/image_other/2023-10/6528a87e594db30162.png" alt=""/>
</div>
<p style="text-align: center">SORRY. THE PAGE HAS EITHER MOVED OR CANNOT BE FOUND.</p>
<h1 style="text-align: center">SORRY. THE PAGE HAS EITHER MOVED OR CANNOT BE FOUND.</h1>
<style>
.section-block-error404 .layout {
height: 700px;
... ...
... ... @@ -257,6 +257,7 @@ Route::middleware(['aloginauth'])->group(function () {
Route::post('/{id}', [Aside\WorkOrder\AsideTicketController::class, 'update'])->name('admin.tickets.update')->summary('A端更新工单,审核,邀请同事');
Route::get('/pushNotify/{id}', [Aside\WorkOrder\AsideTicketController::class, 'pushNotify'])->name('admin.tickets.pushNotify')->summary('A端工单推送企微群');
Route::get('/projects/{search}', [Aside\WorkOrder\AsideTicketController::class, 'getProjects'])->name('admin.tickets.projects')->summary('A端V5V6项目列表');
Route::patch('/projects/{id}', [Aside\WorkOrder\TicketProjectController::class, 'update'])->name('admin.tickets.projects.update')->summary('A端修改工单项目');
Route::get('/v56_projects/list', [Aside\WorkOrder\AsideTicketController::class, 'projectList'])->name('admin.tickets.projectList')->summary('A端V5V6项目列表')
->description("project_cate[项目分类1]: 1 V5, 2 V6, 3 超迹, 4 域途");
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 () {
Route::any('/getInfo', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class,'getInfo'])->name('geo_result_getInfo');
Route::any('/getType', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class, 'getType'])->name('geo_result_getType');//geo设置类型
Route::any('/getCount', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class, 'getCount'])->name('geo_result_getCount');//geo设置类型统计数量
Route::any('/countQuantity', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class, 'countQuantity'])->name('geo_result_countQuantity');//geo统计
Route::any('/getSearchDate', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class, 'getSearchDate'])->name('geo_result_getSearchDate');//搜索记录时间
});
});
//无需登录验证的路由组
... ...