Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -1253,8 +1253,8 @@ class Article extends Base
|
||||
}
|
||||
//判断审稿记录是否有拒稿
|
||||
if(!in_array(2, $aReviewLists)){//拒稿
|
||||
if(count($aReviewLists) < 3){
|
||||
return jsonError("The number of reviewers is less than 3");
|
||||
if(count($aReviewLists) < 2){
|
||||
return jsonError("The number of reviewers is less than 2");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -379,7 +379,7 @@ class Finalreview extends Base
|
||||
}
|
||||
if($aReviewerFinal['state'] == 0){//同意审稿之后更新状态1接收2拒绝3退修
|
||||
if(!in_array($iState, [1,2,3])){
|
||||
return json_encode(['status' => 6,'msg' => 'Illegal review status']);
|
||||
return json_encode(['status' => 6,'msg' => 'Please click on "Final Decision" under the "Editorial Board Member" or "Editor-in-Chief" tab in the left sidebar to review the article.']);
|
||||
}
|
||||
$suggest_for_editor = empty($aParam['suggest_for_editor']) ? '' : $aParam['suggest_for_editor'];
|
||||
$suggest_for_author = empty($aParam['suggest_for_author']) ? '' : $aParam['suggest_for_author'];
|
||||
@@ -1026,4 +1026,22 @@ class Finalreview extends Base
|
||||
return trim($this->sTouGaoUrl,'/').'/'.$sJumpUrl.'&r_id=' . $record_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取文章的终审意见
|
||||
* @param article_id
|
||||
*/
|
||||
public function getArticleFinalReview($aParam = []){
|
||||
|
||||
//获取参数
|
||||
$aParam = empty($aParam) ? $this->request->post() : $aParam;
|
||||
//参数验证-文章ID
|
||||
$iArticleId = empty($aParam['article_id']) ? 0 : $aParam['article_id'];
|
||||
if(empty($iArticleId)){
|
||||
return json_encode(['status' => 2,'msg' => 'Please select a article']);
|
||||
}
|
||||
//查询审稿记录
|
||||
$aWhere = ['article_id' => $iArticleId,'state' => ['in',[1,2,3]]];
|
||||
$aReviewerFinal = Db::name('article_reviewer_final')->field('id,state,suggest_for_editor,suggest_for_author,update_time,reviewer_id,is_anonymous')->where($aWhere)->select();
|
||||
return json_encode(['status' => 1,'msg' => 'success','data' => $aReviewerFinal]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -574,14 +574,17 @@ class Special extends Controller
|
||||
sendEmail($editor_info['email'], $journal_info['title'], $journal_info['title'], $tt, $journal_info['email'], $journal_info['epassword']);
|
||||
|
||||
//获取客座编辑
|
||||
$guests = $this->user_to_special_obj
|
||||
->field("t_user.email")
|
||||
->join("t_user", 't_user.user_id = t_user_to_special.user_id', 'left')
|
||||
->where('t_user_to_special.special_id', $data['special_id'])
|
||||
->where('t_user_to_special.uts_state', 0)
|
||||
->select();
|
||||
foreach($guests as $k => $v){
|
||||
sendEmail($v['email'], $journal_info['title'], $journal_info['title'], $tt, $journal_info['email'], $journal_info['epassword']);
|
||||
$iJournalSpecialId = empty($data['special_id']) ? 0 : $data['special_id'];
|
||||
$aSpecialEditor = $this->getJournalSpecialEditor(['journal_special_id' => $iJournalSpecialId]);
|
||||
$aSpecialEditorData = empty($aSpecialEditor['data']) ? [] : $aSpecialEditor['data'];
|
||||
$aSpecialEditorData = empty($aSpecialEditorData['editors']) ? [] : $aSpecialEditorData['editors'];
|
||||
if(!empty($aSpecialEditorData)){
|
||||
foreach($aSpecialEditorData as $k => $v){
|
||||
if(empty($v['email'])){
|
||||
continue;
|
||||
}
|
||||
sendEmail($v['email'], $journal_info['title'], $journal_info['title'], $tt, $journal_info['email'], $journal_info['epassword']);
|
||||
}
|
||||
}
|
||||
// $sendEditor = [
|
||||
// 'title' => $journal_info['title'], // 邮件标题
|
||||
@@ -991,4 +994,19 @@ class Special extends Controller
|
||||
$insert_data['ctime'] = time();
|
||||
return $this->article_file_obj->insert($insert_data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取期刊客座编辑
|
||||
*/
|
||||
private function getJournalSpecialEditor($aParam = []){
|
||||
|
||||
$iJournalSpecialId = empty($aParam['journal_special_id']) ? 0 : $aParam['journal_special_id'];
|
||||
if(empty($iJournalSpecialId)){
|
||||
return ['code' => 2,'msg' => 'journal_special_id is null'];
|
||||
}
|
||||
$sJournalUrl = 'http://journalapi.tmrjournals.com/public/index.php/';//'http://zmzm.journal.dev.com/';
|
||||
$sUrl = $sJournalUrl."master/Special/getSpecialDetail";
|
||||
$aResult = object_to_array(json_decode(myPost1($sUrl,$aParam)));
|
||||
return $aResult;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user