1
This commit is contained in:
@@ -911,6 +911,19 @@ class Article extends Controller {
|
||||
return jsonError("Status cannot be changed");
|
||||
}
|
||||
|
||||
//判断文章的h指数是否添加
|
||||
$authors = $this->article_author_obj->where('article_id',$data['articleId'])->where('is_report',1)->select();
|
||||
$h_check = false;
|
||||
foreach($authors as $v){
|
||||
$cache_report = $this->user_obj->where('email',$v['email'])->find();
|
||||
if($article_info['state']!=0||$cache_report['google_time']!=0){
|
||||
$h_check = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if($h_check==false){
|
||||
return jsonError('Please complete the H-index before proceeding');
|
||||
}
|
||||
|
||||
// 发送邮件内容
|
||||
$sendUser=[
|
||||
@@ -1593,8 +1606,9 @@ class Article extends Controller {
|
||||
if($v['isReport']=="true"){
|
||||
$re_user_check = $this->user_obj->where('account|email',trim($v['email']))->find();
|
||||
if(!$re_user_check){
|
||||
$password = getRandPassword();
|
||||
$inser_data['account'] = trim($v['email']);
|
||||
$inser_data['password'] = md5('123456qwe');
|
||||
$inser_data['password'] = md5($password);
|
||||
$inser_data['email'] = trim($v['email']);
|
||||
$inser_data['realname'] = trim($v['firstname']).' '.trim($v['lastname']);
|
||||
$inser_data['ctime'] = time();
|
||||
@@ -1602,6 +1616,21 @@ class Article extends Controller {
|
||||
if($res_add_user){
|
||||
$res_add_user = $c_res_add_user;
|
||||
}
|
||||
|
||||
//发送提示邮件给通讯作者
|
||||
$report_tt = "Dear ".$inser_data['realname'].',<br/><br/>';
|
||||
$report_tt .= "We are delighted to welcome you as a new author for our journal, ".$journal_info['title'].". We have received your submission and are excited to review it for potential publication.<br/><br/>";
|
||||
$report_tt .= "As a next step, we have created an account for you on our journal's website. Your account is [Username: ".trim($v['email'])." password:$password]";
|
||||
$report_tt .= "and you can access your account by visiting ".$journal_info['website']." and logging in.<br/><br/>";
|
||||
$report_tt .= "If you have any questions or need assistance with accessing your account, please don't hesitate to contact us. We are here to support you throughout the submission and review process.<br/><br/>";
|
||||
$report_tt .= "Thank you for choosing to submit your work to our journal. We look forward to working with you.<br/><br/>";
|
||||
$report_tt .= "Best regards,<br>".$inser_data['realname'].'<br/>'.$journal_info['title'];
|
||||
$maidata['email'] = trim($v['email']);
|
||||
$maidata['title'] = $journal_info['title'];
|
||||
$maidata['content'] = $report_tt;
|
||||
$maidata['tmail'] = $journal_info['email'];
|
||||
$maidata['tpassword'] = $journal_info['epassword'];
|
||||
Queue::push('app\api\job\mail@fire', $maidata, "tmail");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1705,6 +1734,26 @@ class Article extends Controller {
|
||||
// }
|
||||
|
||||
|
||||
/**
|
||||
* 获取文章通讯作者信息
|
||||
*/
|
||||
public function getArticleReport(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
'article_id'=>'require'
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$reports = $this->article_author_obj->where('article_id',$data['article_id'])->where('is_report',1)->select();
|
||||
foreach($reports as $k => $v){
|
||||
$ca=$this->user_obj->where('email',$v['email'])->find();
|
||||
$reports[$k]['account'] = $ca;
|
||||
}
|
||||
$re['reports'] = $reports;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
public function editHindexAndScor(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
@@ -2080,6 +2129,14 @@ class Article extends Controller {
|
||||
$list = $this->journal_obj->where($where)->select();
|
||||
return json($list);
|
||||
}
|
||||
/**
|
||||
* 获取期刊列表
|
||||
*/
|
||||
public function getJournalOutLx() {
|
||||
$editorid = $this->request->post('editor_id');
|
||||
$list = $this->journal_obj->where('editor_id',$editorid)->where('journal_id','not in','2,3,15')->select();
|
||||
return json($list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取文章历史上传file列表
|
||||
@@ -2148,6 +2205,27 @@ class Article extends Controller {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑获取连续出刊列表
|
||||
*/
|
||||
public function getContinuityJournals(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
'editor_id'=>'require'
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$res = $this->user_obj->where('user_id',$data['editor_id'])->find();
|
||||
if(!$res){
|
||||
return jsonError('no this user!');
|
||||
}
|
||||
$journals = $this->journal_obj->where('editor_id',$res['user_id'])->where('journal_id','in','2,3,15')->select();
|
||||
$re['journals'] = $journals;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取文章审稿实例列表
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user