终审相关调整
This commit is contained in:
@@ -418,7 +418,7 @@ class Article extends Base
|
|||||||
foreach ($state_num as $item) {
|
foreach ($state_num as $item) {
|
||||||
$num_arr[$item['state']] = $item['num'];
|
$num_arr[$item['state']] = $item['num'];
|
||||||
}
|
}
|
||||||
for ($i = 0; $i < 7; $i++) {
|
for ($i = 0; $i <= 7; $i++) {
|
||||||
$num_frag[$i] = isset($num_arr[$i]) ? $num_arr[$i] : 0;
|
$num_frag[$i] = isset($num_arr[$i]) ? $num_arr[$i] : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1221,6 +1221,47 @@ class Article extends Base
|
|||||||
return jsonError("Status cannot be changed");
|
return jsonError("Status cannot be changed");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//终审判断[3个审稿人审稿意见为:同意/1个审稿人审稿意见为:不同意] chengxiaoling 20250825 start
|
||||||
|
if(isset($data['state']) && $data['state'] == 7){
|
||||||
|
if($article_info['state'] != 1){
|
||||||
|
return jsonError("The article status is not with editor");
|
||||||
|
}
|
||||||
|
$iId = empty($data['articleId']) ? 0 : $data['articleId'];//文章ID
|
||||||
|
if(empty($iId)){
|
||||||
|
return jsonError("Please select an article");
|
||||||
|
}
|
||||||
|
//判断是否有审稿记录
|
||||||
|
$aReviewerParam = ['article_id' => $iId,'state' => ['between',[1,3]]];
|
||||||
|
$aReviewLists = Db::name('article_reviewer')->where($aReviewerParam)->column('state');
|
||||||
|
if(empty($aReviewLists)){
|
||||||
|
return jsonError("Reviewer did not conduct a review");
|
||||||
|
}
|
||||||
|
//判断审稿记录是否有拒稿
|
||||||
|
if(!in_array(2, $aReviewLists)){//拒稿
|
||||||
|
if(count($aReviewLists) < 3){
|
||||||
|
return jsonError("The number of reviewers is less than 3");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//更新文章状态
|
||||||
|
$aWhere = ['article_id' => $iId,'state' => 1];
|
||||||
|
$sUpateResult = $this->article_obj->where($aWhere)->limit(1)->update(['state' => 7]);
|
||||||
|
if($sUpateResult === false){
|
||||||
|
return jsonError("Status update failed");
|
||||||
|
}
|
||||||
|
//添加文章状态信息(如果状态未更新可做通话用,并结束操作)
|
||||||
|
$insert_data['article_id'] = $iId;
|
||||||
|
$insert_data['content'] = 'The article enters the final review stage';
|
||||||
|
$insert_data['state_from'] = $article_info['state'];
|
||||||
|
$insert_data['state_to'] = 8;
|
||||||
|
$insert_data['ctime'] = time();
|
||||||
|
if(!$this->article_msg_obj->insert($insert_data)){
|
||||||
|
return jsonError("article_msg insertion failed");
|
||||||
|
}
|
||||||
|
return json(['code' => 0]);
|
||||||
|
}
|
||||||
|
//终审判断[3个审稿人审稿意见为:同意/1个审稿人审稿意见为:不同意] chengxiaoling 20250825 end
|
||||||
|
|
||||||
//判断文章的h指数是否添加
|
//判断文章的h指数是否添加
|
||||||
$authors = $this->article_author_obj->where('article_id', $data['articleId'])->where('is_report', 1)->select();
|
$authors = $this->article_author_obj->where('article_id', $data['articleId'])->where('is_report', 1)->select();
|
||||||
// $h_check = false;
|
// $h_check = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user