This commit is contained in:
wangjinlei
2023-06-09 08:59:33 +08:00
parent 12025a6dbc
commit 65cda71dc8
3 changed files with 88 additions and 4 deletions

View File

@@ -859,6 +859,10 @@ class Article extends Base
$user_info = $this->user_obj->where(['user_id' => $article_info['user_id']])->find();
$user_rev_info = $this->user_reviewer_info_obj->where("reviewer_id", $user_info['user_id'])->find();
if($editor_info['user_id'] != $journal_info['editor_id']){
return jsonError("insufficient privilege ");
}
if ($article_info['state'] == 5 || $article_info['state'] == 3) {
return jsonError("Status cannot be changed");
}
@@ -1048,7 +1052,7 @@ class Article extends Base
}
}
//接收必须查重小于20%
if ($data['state'] == 5 && $article_info['repetition'] > 20) {
if ($data['state'] == 5 && $article_info['repetition'] > 25) {
return jsonError("Submissions with a repetition rate greater than thirty percent will not be accepted");
}
@@ -1211,6 +1215,28 @@ class Article extends Base
return json(['code' => 0]);
}
/**获取拒绝文章列表
* @return void
*/
public function getRejectArticles(){
$data = $this->request->post();
$rule = new Validate([
"pageIndex"=>"require",
"pageSize"=>"require"
]);
if(!$rule->check($data)){
return jsonError($rule->getError());
}
$list = $this->article_obj->where('state',3)->page($data['pageIndex'],$data['pageSize'])->order('article_id desc')->select();
foreach ($list as $key => $val){
$list[$key]['author'] = $this->article_author_obj->where('article_id', $val['article_id'])->where('state', 0)->select();
}
$count = $this->article_obj->where('state',3)->count();
$re['articles'] = $list;
$re['count'] = $count;
return jsonSuccess($re);
}
public function authorClear()
{
$author = "Ying Chen1 *,Shi-yi Tao2,Lu Zhou2,De-shuang Yang2,Chong-xiang Xue1 #,Li Huang3 #";

View File

@@ -0,0 +1,8 @@
<?php
namespace app\api\controller;
class Preaccept
{
}

View File

@@ -116,7 +116,56 @@ class Production extends Base
if(!$rule->check($data)){
return jsonError($rule->getError());
}
$url = "http://journalapi.tmrjournals.com/public/index.php/master/";
$url = "http://journalapi.tmrjournals.com/public/index.php/master/Article/getArticleMainsForSubmission";
$pro['article_id'] = $data['article_id'];
$res = object_to_array(json_decode(myPost($url,$pro)));
$re['mains'] = $res['data']['mains'];
$re['article'] = $res['data']['article'];
return jsonSuccess($re);
}
public function addWebMain(){
$data = $this->request->post();
$rule = new Validate([
"article_id"=>'require',
"pre_id"=>"require",
"type"=>"require",
"content"=>"require"
]);
if(!$rule->check($data)){
return jsonError($rule->getError());
}
$url = "http://journalapi.tmrjournals.com/public/index.php/master/Article/addArticleMainAddForSubmission";
$res = object_to_array(json_decode(myPost($url,$data)));
return jsonSuccess([]);
}
public function delWebMain(){
$data = $this->request->post();
$rule = new Validate([
"article_main_id"=>"require"
]);
if(!$rule->check($data)){
return jsonError($rule->getError());
}
$url = "http://journalapi.tmrjournals.com/public/index.php/master/Article/delArticleMainForSubmission";
$res = object_to_array(json_decode(myPost($url,$data)));
return jsonSuccess([]);
}
public function editWebMain(){
$data = $this->request->post();
$rule = new Validate([
"article_main_id"=>"require",
"type"=>"require",
"content"=>"require"
]);
if(!$rule->check($data)){
return jsonError($rule->getError());
}
$url = "http://journalapi.tmrjournals.com/public/index.php/master/Article/editArticleMainForSubmission";
$res = object_to_array(json_decode(myPost($url,$data)));
return jsonSuccess([]);
}
/**
@@ -638,7 +687,6 @@ class Production extends Base
if (!$rule->check($data)) {
return jsonError($rule->getError());
}
// $data['p_article_id'] = 7;
$p_info = $this->production_article_obj->where('p_article_id', $data['p_article_id'])->find();
if ($p_info['state'] != 0) {
return jsonError("Non repeatable submission");
@@ -711,7 +759,9 @@ class Production extends Base
$res = object_to_array(json_decode(myPost($url, $pra)));
if ($res['code'] == 0) {
$this->production_article_obj->where('p_article_id', $data['p_article_id'])->update(['state' => 2,"w_article_id"=>$res['date']['article_id']]);
$r_update['state'] = 2;
$r_update['w_article_id'] = isset($res['date']['article_id'])?$res['date']['article_id']:0;
$this->production_article_obj->where('p_article_id', $data['p_article_id'])->update($r_update);
foreach($report_authors as $v){
$iua['user_id'] = $v['user_id'];
$iua['w_article_id'] = $res['date']['article_id'];