1
This commit is contained in:
@@ -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([]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 合并到上个文献中
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user