1
This commit is contained in:
@@ -1665,6 +1665,7 @@ class Article extends Base
|
|||||||
*/
|
*/
|
||||||
public function addArtRev()
|
public function addArtRev()
|
||||||
{
|
{
|
||||||
|
die("service stop!");
|
||||||
$data = $this->request->post();
|
$data = $this->request->post();
|
||||||
|
|
||||||
//增加信息到文章审稿表
|
//增加信息到文章审稿表
|
||||||
@@ -2383,6 +2384,21 @@ class Article extends Base
|
|||||||
return jsonSuccess([]);
|
return jsonSuccess([]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**刷新评分
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function refuseScore(){
|
||||||
|
$data = $this->request->post();
|
||||||
|
$rule = new Validate([
|
||||||
|
"article_id"=>'require'
|
||||||
|
]);
|
||||||
|
if(!$rule->check($data)){
|
||||||
|
return jsonError($rule->getError());
|
||||||
|
}
|
||||||
|
$this->ai_scor($data['article_id']);
|
||||||
|
return jsonSuccess([]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 人工智能打分
|
* 人工智能打分
|
||||||
|
|||||||
@@ -559,6 +559,17 @@ class Base extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function refuseReferIndex($p_article_id){
|
||||||
|
$p_info = $this->production_article_refer_obj->where('p_article_id',$p_article_id)->where('state',0)->where('index',">",0)->find();
|
||||||
|
if($p_info){
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
$list = $this->production_article_refer_obj->where('p_article_id',$p_article_id)->where('state',0)->select();
|
||||||
|
foreach ($list as $k => $v){
|
||||||
|
$this->production_article_refer_obj->where('p_refer_id',$v['p_refer_id'])->update(['index'=>$k]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getProductionMainImgsByNew($p_article_id,$file){
|
public function getProductionMainImgsByNew($p_article_id,$file){
|
||||||
$p_info = $this->production_article_obj->where('p_article_id',$p_article_id)->find();
|
$p_info = $this->production_article_obj->where('p_article_id',$p_article_id)->find();
|
||||||
|
|||||||
@@ -517,6 +517,7 @@ class Production extends Base
|
|||||||
if (!$rule->check($data)) {
|
if (!$rule->check($data)) {
|
||||||
return jsonError($rule->getError());
|
return jsonError($rule->getError());
|
||||||
}
|
}
|
||||||
|
$this->refuseReferIndex($data['p_article_id']);
|
||||||
$list = $this->production_article_refer_obj->where('p_article_id', $data['p_article_id'])->where('state', 0)->order("index")->select();
|
$list = $this->production_article_refer_obj->where('p_article_id', $data['p_article_id'])->where('state', 0)->order("index")->select();
|
||||||
$re['refers'] = $list;
|
$re['refers'] = $list;
|
||||||
return jsonSuccess($re);
|
return jsonSuccess($re);
|
||||||
|
|||||||
@@ -77,6 +77,48 @@ class Web extends Base
|
|||||||
return jsonSuccess($re);
|
return jsonSuccess($re);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**获取文章流程通过doi
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function getStackByDoi(){
|
||||||
|
$data = $this->request->post();
|
||||||
|
$rule = new Validate([
|
||||||
|
"doi"=>"require"
|
||||||
|
]);
|
||||||
|
if(!$rule->check($data)){
|
||||||
|
return jsonError($rule->getError());
|
||||||
|
}
|
||||||
|
$r = explode("/",$data['doi']);
|
||||||
|
$p_info = $this->production_article_obj->where('doi',$r[1])->where("state",2)->find();
|
||||||
|
if(!$p_info){
|
||||||
|
return jsonError("");
|
||||||
|
}
|
||||||
|
$article_info = $this->article_obj->where('article_id',$p_info['article_id'])->find();
|
||||||
|
$msgs = $this->article_msg_obj->where('article_id',$article_info['article_id'])->select();
|
||||||
|
$begin['type'] = 0;
|
||||||
|
$begin['time'] = $article_info['ctime'];
|
||||||
|
$frag[] = $begin;
|
||||||
|
foreach ($msgs as $v){
|
||||||
|
$frag[] = [
|
||||||
|
"type"=>$v['state_to'],
|
||||||
|
"time"=>$v['ctime']
|
||||||
|
];
|
||||||
|
// switch ($v['state_to']){
|
||||||
|
// case 1:
|
||||||
|
// $frag[] = [
|
||||||
|
// "type"=>1,
|
||||||
|
// "time"=>$v['ctime']
|
||||||
|
// ];
|
||||||
|
// break;
|
||||||
|
// case 2:
|
||||||
|
// $frag[] = [];
|
||||||
|
// break
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
$re['msgs'] = $frag;
|
||||||
|
return jsonSuccess($re);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
Reference in New Issue
Block a user