1
This commit is contained in:
@@ -69,6 +69,7 @@ class Base extends Controller
|
||||
protected $apply_reviewer_obj = '';
|
||||
protected $promotion_obj = '';
|
||||
protected $promotion_email_obj = '';
|
||||
protected $article_reviewer_repeat_obj = '';
|
||||
|
||||
|
||||
public function __construct(\think\Request $request = null)
|
||||
@@ -135,6 +136,7 @@ class Base extends Controller
|
||||
$this->apply_reviewer_obj = Db::name("apply_reviewer");
|
||||
$this->promotion_obj = Db::name("promotion");
|
||||
$this->promotion_email_obj = Db::name("promotion_email");
|
||||
$this->article_reviewer_repeat_obj = Db::name("article_reviewer_repeat");
|
||||
}
|
||||
|
||||
|
||||
@@ -201,6 +203,16 @@ class Base extends Controller
|
||||
return $frag;
|
||||
}
|
||||
|
||||
public function delOneRefer($p_refer_id){
|
||||
|
||||
$refer_info = $this->production_article_refer_obj->where('p_refer_id', $p_refer_id)->find();
|
||||
if(!$refer_info){
|
||||
return "";
|
||||
}
|
||||
$this->production_article_refer_obj->where('p_article_id', $refer_info['p_article_id'])->where('index', ">", $refer_info['index'])->where('state', 0)->setDec('index');
|
||||
$this->production_article_refer_obj->where('p_refer_id', $p_refer_id)->update(['state' => 1]);
|
||||
}
|
||||
|
||||
|
||||
public function getMajorShu($major)
|
||||
{
|
||||
|
||||
@@ -263,12 +263,25 @@ class Preaccept extends Base
|
||||
if (!$rule->check($data)) {
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$refer_info = $this->production_article_refer_obj->where('p_refer_id', $data['p_refer_id'])->find();
|
||||
$this->production_article_refer_obj->where('p_article_id', $refer_info['p_article_id'])->where('index', ">", $refer_info['index'])->where('state', 0)->setDec('index');
|
||||
$this->production_article_refer_obj->where('p_refer_id', $data['p_refer_id'])->update(['state' => 1]);
|
||||
$this->delOneRefer($data['p_refer_id']);
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
public function delRefers(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
"ids" => "require|array"
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
foreach ($data['ids'] as $v){
|
||||
$this->delOneRefer($v);
|
||||
}
|
||||
return jsonSuccess([]);
|
||||
|
||||
}
|
||||
|
||||
/**编辑refer
|
||||
* @return \think\response\Json
|
||||
* @throws \think\Exception
|
||||
|
||||
@@ -177,6 +177,23 @@ class Production extends Base
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
/**清空web的主体内容
|
||||
* @return void
|
||||
*/
|
||||
public function clearWebMains(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
"article_id"=>"require"
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$url = "http://journalapi.tmrjournals.com/public/index.php/master/Article/clearArticleMainForSubmission";
|
||||
$res = object_to_array(json_decode(myPost($url,$data)));
|
||||
return jsonSuccess([]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function delWebMain(){
|
||||
@@ -192,6 +209,20 @@ class Production extends Base
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
public function delWebMains(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
"ids"=>"require"
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$program['ids'] = json_encode($data['ids']);
|
||||
$url = "http://journalapi.tmrjournals.com/public/index.php/master/Article/delArticleMainsForSubmission";
|
||||
$res = object_to_array(json_decode(myPost($url,$program)));
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
public function editWebMain(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
|
||||
@@ -92,6 +92,31 @@ class Reviewer extends Base
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
/**创建复审实例
|
||||
* @return void
|
||||
*/
|
||||
public function startRepeatReviewer(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
"art_rev_id"=>"require"
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$article_reviewer_info = $this->article_reviewer_obj->where('art_rev_id',$data['art_rev_id'])->find();
|
||||
$reviewer_info = $this->user_obj->where('user_id',$article_reviewer_info['reviewer_id'])->find();
|
||||
$article_info = $this->article_obj->where('article_id',$article_reviewer_info['article_id'])->find();
|
||||
|
||||
//添加实例数据
|
||||
$insert['art_rev_id'] = $data['art_rev_id'];
|
||||
$insert['ctime'] = time();
|
||||
$this->article_reviewer_repeat_obj->insert($insert);
|
||||
|
||||
//发送邮件至审稿人,提醒到系统内复审稿件
|
||||
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取历史审稿实例列表
|
||||
* @description 获取历史审稿实例列表
|
||||
|
||||
Reference in New Issue
Block a user