This commit is contained in:
王金磊
2023-05-04 13:41:50 +08:00
parent 883c9a870c
commit 177d1c939f
8 changed files with 398 additions and 20 deletions

View File

@@ -2159,6 +2159,9 @@ class Article extends Base
// }
/**
* 获取文章通讯作者信息
*/

View File

@@ -357,6 +357,22 @@ class Auto extends Base
return jsonSuccess($re);
}
/**
* 推送邮件到作者当文章推送到官网时
*/
public function pushEmailToAuthor(){
$data = $this->request->post();
$rule = new Validate([
''=>'require'
]);
if(!$rule->check($data)){
return jsonError($rule->getError());
}
}
/**
* 获取动态gpt内容
*/

View File

@@ -62,6 +62,7 @@ class Base extends Controller
protected $production_article_refer_obj = '';
protected $production_article_author_to_organ_obj = '';
protected $production_article_frag_obj = '';
protected $production_article_main_obj = '';
protected $apply_reviewer_obj = '';
@@ -124,6 +125,7 @@ class Base extends Controller
$this->production_article_refer_obj = Db::name('production_article_refer');
$this->production_article_author_to_organ_obj = Db::name('production_article_author_to_organ');
$this->production_article_frag_obj = Db::name('production_article_frag');
$this->production_article_main_obj = Db::name('production_article_main');
$this->apply_reviewer_obj = Db::name("apply_reviewer");
}

View File

@@ -86,12 +86,24 @@ class Production extends Base
}
$frag['main'][] = $v;
}
if(!isset($frag['main'])){
return jsonError("manuscript file error!");
}
$insert['main'] = isset($frag['main']) ? json_encode($frag['main']) : '';
$insert['article_id'] = $data['article_id'];
$insert['journal_id'] = $article_info['journal_id'];
$insert['ctime'] = time();
$this->production_article_obj->insert($insert);
$p_article_id = $this->production_article_obj->insertGetId($insert);
//将主体内容写入数据库
foreach($frag['main'] as $v){
$ca['p_article_id'] = $p_article_id;
$ca['content'] = $v;
$ca['ctime'] = time();
$this->production_article_main_obj->insert($ca);
}
return jsonSuccess([]);
}
@@ -419,24 +431,6 @@ class Production extends Base
}
}
/**
* 校对主入口
*/
public function proto(){
$data = $this->request->post();
}
public function eeeccc()
{
// $str = "Critical Care Medicine 2022;50 (6):955-63";
// dump($this->bekjournal($str));
$str = "Pandey S, Kumar P, Niranjan A, Verma H, Kumar M. Targeting biosignatures of hyperglycemia and oxidative stress in diabetes comorbid depressive rats: effectiveness of hydroethanolic extract of the whole plant of Ludwigia octovalvis. Tradit Med Res 2023;8 (2):9.";
$res = explode('.', $str);
echo $this->prgeAuthor($res[0]);
}
public function getPdfByHtml(){
$data = $this->request->post();
@@ -1010,6 +1004,42 @@ class Production extends Base
}
}
/**
* gpt校对main内容
*/
public function freshMain(){
$data = $this->request->post();
$rule = new Validate([
'p_article_id'=>'require'
]);
if(!$rule->check($data)){
return jsonError($rule->getError());
}
$list = $this->production_article_main_obj->where('p_article_id',$data['p_article_id'])->where('state',0)->select();
foreach($list as $v){
if($v['content']==''||strlen($v['content'])<60){
$this->production_article_main_obj->where('p_main_id',$v['p_main_id'])->update(['content_g'=>$v['content']]);
}else{
Queue::push('app\api\job\gpt@fresh', $v, 'gpt');
}
}
return jsonSuccess([]);
}
public function testref(){
// $mes['role'] = "user";
// $mes['content'] = "你好啊";
// $ckey = md5(rand(1000,9999).time().rand(10000,99999));
// GptChar([$mes],$ckey);
// echo $ckey;
dump(pushGpt("The role of inflammation in MPNs has been increasingly reported in the literature, overproduction of inflammatory cytokines is a clinical feature of patients with MPNs [17-23]. The core proteins screened for inflammation-related RELA, TNF and IL6. IL6 is an important cytosolic inflammatory factor in vivo and the most commonly overexpressed inflammatory factor in myeloid malignancies[24], which promotes STAT3 phosphorylation[25]. Activated IL6/STAT3 signaling can further mediate the production of TNFα, IL1β and other inflammatory factors, continuously enhancing the inflammatory response. TNF mediates the clonal advantage of mutant cells in MPNs[20], and inhibition of TNFR showed a therapeutic effect in mice with MPNs [26]. The above data suggest a central role of inflammation-related factors in MPNs. It suggests that DHI may play a role in treating myeloproliferative neoplasms through multiple targets."));
// $production_obj = $this->production_article_main_obj->where('p_main_id',4)->find();
// freshContent($production_obj);
}
/**
* 更新引用条目
*/
@@ -1040,6 +1070,8 @@ class Production extends Base
return jsonSuccess([]);
}
/**
* 合并到上个文献中
*/

View File

@@ -873,9 +873,10 @@ class User extends Base
}
$ids = $this->journal_obj->where('editor_id',$data['editor_id'])->column('journal_id');
$list = $this->apply_board_obj
->field("t_journal.title,t_apply_board.*,t_user.account,t_user.email,t_user.realname")
->field("t_journal.title,t_apply_board.*,t_user.account,t_user.email,t_user.realname,t_user_reviewer_info.technical")
->join("t_journal",'t_journal.journal_id = t_apply_board.journal_id','left')
->join("t_user","t_user.user_id = t_apply_board.user_id",'left')
->join("t_user_reviewer_info","t_user_reviewer_info.reviewer_id = t_user.user_id","left")
->where('t_apply_board.journal_id','in',$ids)->where('t_apply_board.state',0)->select();
$re['applys'] = $list;
return jsonSuccess($re);