latex update
This commit is contained in:
@@ -129,6 +129,12 @@ class Article extends Base
|
||||
}
|
||||
}
|
||||
$res[$key]['proof'] = $proof_state;
|
||||
//新增是否是草稿删除 20260204 start
|
||||
$res[$key]['is_draft'] = 2;
|
||||
if(!empty($val['accept_sn']) && substr($val['accept_sn'], 0, 5) === 'Draft'){
|
||||
$res[$key]['is_draft'] = 1;
|
||||
}
|
||||
//新增是否是草稿删除 20260204 end
|
||||
}
|
||||
|
||||
//返回数据
|
||||
@@ -585,6 +591,14 @@ class Article extends Base
|
||||
}
|
||||
}
|
||||
//查询终审意见 chengxiaoling 20250828 end
|
||||
//新增是否是草稿删除 20260204 start
|
||||
if(!empty($article_res)){
|
||||
$article_res['is_draft'] = 2;
|
||||
if(!empty($article_res['accept_sn']) && substr($article_res['accept_sn'], 0, 5) === 'Draft'){
|
||||
$article_res['is_draft'] = 1;
|
||||
}
|
||||
}
|
||||
//新增是否是草稿删除 20260204 end
|
||||
return json(['article' => $article_res, 'msg' => $article_msg, 'authors' => $author_res, 'suggest' => $suggest, 'transfer' => $transfer_res, 'transinfo' => $transfer_info, "major" => $major,'suggest_final' => $aFinal]);
|
||||
}
|
||||
|
||||
@@ -2794,196 +2808,196 @@ class Article extends Base
|
||||
|
||||
die("Please update your browser cache and resubmit your submission (shortcut key: Ctrl+F5)");
|
||||
//接受参数,查询信息
|
||||
// $data = $this->request->post();
|
||||
//
|
||||
// $user_res = $this->user_obj->where('account', $data['username'])->find();
|
||||
//
|
||||
// //确定用户是否属于黑名单
|
||||
// $black_check = $this->user_black_obj->where('user_id', $user_res['user_id'])->where('black_state', 0)->find();
|
||||
// if ($black_check) {
|
||||
// return jsonError("Your account has been blocked. Please contact the publisher for details: publisher@tmrjournals.com.");
|
||||
// }
|
||||
//
|
||||
// // if($user_res['account']=='fariba'||$user_res['account']=='zc'||$user_res['account']=='Mohammad Hossein'||$user_res['account']=='xiaoyueyue'||$user_res['account']=='sethlee000'||$user_res['account']=='yuanying9908'){
|
||||
// // return json(['code'=>1,'msg'=>'Your account has been blocked. Please contact the publisher for details: publisher@tmrjournals.com.']);
|
||||
// // }
|
||||
//
|
||||
// $journal_info = $this->journal_obj->where('journal_id', $data['journal'])->find();
|
||||
// //首先查重是否重复投稿
|
||||
// $checkArticle = $this->article_obj->where("title", trim($data['title']))->select();
|
||||
// foreach ($checkArticle as $v) {
|
||||
// if ($v['state'] != 3) {
|
||||
// return json(['code' => 1, 'msg' => 'Warning: you are re-submitting the article!']);
|
||||
// }
|
||||
// }
|
||||
// Db::startTrans();
|
||||
//
|
||||
// //添加文章基础信息
|
||||
// $inset_data['user_id'] = $user_res['user_id'];
|
||||
// $inset_data['journal_id'] = $data['journal'];
|
||||
// $inset_data['editor_id'] = $journal_info['editor_id'];
|
||||
// $inset_data['title'] = trim($data['title']);
|
||||
// $inset_data['keywords'] = $data['keyWords'];
|
||||
// $inset_data['fund'] = trim($data['fund']);
|
||||
// $inset_data['accept_sn'] = getArticleSN($journal_info['abbr'], $data['type']);
|
||||
// $inset_data['type'] = $data['type'];
|
||||
// $inset_data['major_id'] = $data['major'];
|
||||
// // $inset_data['cmajor_id'] = $data['cmajor'];
|
||||
// $inset_data['approval'] = $data['approval'] == 'true' ? 1 : 0;
|
||||
// $inset_data['abstrart'] = $data['abstrart'];
|
||||
// $inset_data['author_act'] = 1;
|
||||
// $inset_data['ctime'] = time();
|
||||
// $res = $this->article_obj->insertGetId($inset_data);
|
||||
//
|
||||
// //上传文章作者信息
|
||||
// $author_email = [];
|
||||
// $authors = [];
|
||||
// $res_add_user = true;
|
||||
// foreach ($data['authorList'] as $v) {
|
||||
// if ($v['firstname'] == '') {
|
||||
// continue;
|
||||
// }
|
||||
// $i['article_id'] = $res;
|
||||
// $i['firstname'] = trim($v['firstname']);
|
||||
// $i['lastname'] = trim($v['lastname']);
|
||||
// $i['orcid'] = trim($v['orcid']);
|
||||
// $i['company'] = trim($v['company']);
|
||||
// $i['department'] = trim($v['department']);
|
||||
// $i['author_title'] = $v['title'];
|
||||
// $i['country'] = $v['country'];
|
||||
// $i['email'] = trim($v['email']);
|
||||
// $i['address'] = trim($v['address']);
|
||||
// $i['is_super'] = $v['isSuper'] == 'true' ? 1 : 0;
|
||||
// $i['is_report'] = $v['isReport'] == 'true' ? 1 : 0;
|
||||
// $authors[] = $i;
|
||||
// $cache['email'] = trim($v['email']);
|
||||
// $cache['name'] = trim($v['firstname']) . ' ' . trim($v['lastname']);
|
||||
// $author_email[] = $cache;
|
||||
//
|
||||
// //通讯作者用户添加
|
||||
// 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($password);
|
||||
// $inser_data['email'] = trim($v['email']);
|
||||
// $inser_data['realname'] = trim($v['firstname']) . ' ' . trim($v['lastname']);
|
||||
// $inser_data['ctime'] = time();
|
||||
// $c_res_add_user = $this->user_obj->insertGetId($inser_data);
|
||||
// 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>" . $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");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// $res_author = $this->article_author_obj->insertAll($authors);
|
||||
//
|
||||
// //增加转投信息
|
||||
// $transr = true;
|
||||
// if ($data['istransfer'] == 'true') {
|
||||
// foreach ($data['checkedjours'] as $val) {
|
||||
// $trans_insert['article_id'] = $res;
|
||||
// $trans_insert['journal_id'] = $val;
|
||||
// $trans_insert['ctime'] = time();
|
||||
// $transr = $transr ? $this->article_transfer_obj->insert($trans_insert) : false;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
// //增加articlefile表的信息
|
||||
// $res_file1 = self::save_article_file($res, $user_res['user_id'], $user_res['account'], $data['coverLetter'], 'coverLetter');
|
||||
// $res_file2 = true;
|
||||
// if (isset($data['picturesAndTables'])) {
|
||||
// foreach ($data['picturesAndTables'] as $v) {
|
||||
// $res_file2 = $res_file2 ? self::save_article_file($res, $user_res['user_id'], $user_res['account'], $v, 'picturesAndTables') : false;
|
||||
// }
|
||||
// }
|
||||
// $res_file4 = self::save_article_file($res, $user_res['user_id'], $user_res['account'], $data['totalpage'], 'totalpage');
|
||||
// $res_file3 = self::save_article_file($res, $user_res['user_id'], $user_res['account'], $data['manuscirpt'], 'manuscirpt');
|
||||
//
|
||||
// //发送邮件到编辑,提醒有待审文章
|
||||
// $editor_info = $this->user_obj->where('user_id', $journal_info['editor_id'])->find();
|
||||
// $tt = 'Dear editor,<br>';
|
||||
// $tt .= 'Please check the new manuscript in the submission system.';
|
||||
// sendEmail($editor_info['email'], $journal_info['title'], $journal_info['title'], $tt, $journal_info['email'], $journal_info['epassword']);
|
||||
// $user_rev_info = $this->user_reviewer_info_obj->where("reviewer_id", $user_res['user_id'])->find();
|
||||
// //发送邮件给作者,表示感谢
|
||||
// $tt_t = 'Dear Dr. ' . ($user_res['realname'] == '' ? $user_res['account'] : $user_res['realname']) . ',<br><br>';
|
||||
// $tt1 = 'Thank you for submitting your manuscript entitled "' . $data['title'] . '". Your submission has been assigned the following tracking number:' . $inset_data['accept_sn'] . '. We will be in touch again as soon as we have reached a decision. Please quote the tracking number in any communication. This e-mail simply acknowledges receipt of your submission. If the editors decide for editorial reasons that the paper is unsuitable for publication in ' . $journal_info['title'] . ', you will be informed as soon as possible.<br><br><br>';
|
||||
// if ($journal_info['journal_id'] == 9) { //life research 期刊发送收到文章邮件
|
||||
// $tt1 .= 'Life Research applies the CC BY-NC 4.0 license. Full details of the policy can be found at https://www.tmrjournals.com/notice.html?J_num=14&footer_id=123. Authors should read Guide to Authors carefully before submitting.<br><br>';
|
||||
// $tt1 .= 'You may check on the status of this manuscript in the Submission System. If you encounter any problems, please contact liferes@tmrjournals.com.<br><br>';
|
||||
// $tt1 .= 'Thank you for choosing to submit your manuscript to Life Research.<br><br><br>';
|
||||
// $tt1 .= 'Yours sincerely,<br>Haoran Zhang<br><br>';
|
||||
// $tt1 .= 'Manuscript Administration, Life Research<br>https://www.tmrjournals.com/lr/';
|
||||
// } else { //其他期刊发送邮件
|
||||
// $tt1 .= 'You may check on the status of this manuscript in the Submission System. If you encounter any problems, please contact ' . $journal_info['email'] . '.<br><br>';
|
||||
// $tt1 .= 'Thank you for choosing to submit your manuscript to ' . $journal_info['title'] . '.<br><br><br>';
|
||||
// $tt1 .= 'Sincerely,<br>Editorial Office<br>';
|
||||
// $tt1 .= '<a href="https://www.tmrjournals.com/draw_up.html?issn=' . $journal_info['issn'] . '">Subscribe to this journal</a><br>';
|
||||
// $tt1 .= $journal_info['title'] . '<br>';
|
||||
// $tt1 .= 'Email: ' . $journal_info['email'] . '<br>';
|
||||
// $tt1 .= 'Website: ' . $journal_info['website'] . '<br>';
|
||||
// $tt1 .= '<hr/>If you have any questions, please contact us: <br>';
|
||||
// $tt1 .= 'Head of publication ethics<br>Dr. Dan Chen<br>TMR Publishing Group Limited Company, Auckland, New Zealand<br>Email: publication.ethics@tmrjournals.com';
|
||||
// }
|
||||
//
|
||||
// sendEmail($user_res['email'], $journal_info['title'], $journal_info['title'], $tt_t . $tt1, $journal_info['email'], $journal_info['epassword']);
|
||||
//
|
||||
// foreach ($author_email as $v) {
|
||||
// $cache_str = 'Dear Dr. ' . $v['name'] . ',<br><br>';
|
||||
// $maidata['email'] = $v['email'];
|
||||
// $maidata['title'] = $journal_info['title'];
|
||||
// $maidata['content'] = $cache_str . $tt1;
|
||||
// $maidata['tmail'] = $journal_info['email'];
|
||||
// $maidata['tpassword'] = $journal_info['epassword'];
|
||||
// Queue::push('app\api\job\mail@fire', $maidata, "tmail");
|
||||
// }
|
||||
//
|
||||
// //增加用户操作log
|
||||
// $log_data['user_id'] = $user_res['user_id'];
|
||||
// $log_data['type'] = 0;
|
||||
// $log_data['content'] = $user_res['account'] . "(" . $user_res['realname'] . "),上传了一篇文章:" . $data['title'] . ",上传时间是:" . date('Y-m-d H:i:s', time());
|
||||
// $log_data['ctime'] = time();
|
||||
// $res_log = $this->user_log_obj->insert($log_data);
|
||||
//
|
||||
// //增加usermsg
|
||||
// $res_msg = add_usermsg($journal_info['editor_id'], 'New manuscript', '/articleDetailEditor?id=' . $res);
|
||||
//
|
||||
// //通讯作者转为审稿人
|
||||
// $this->addReviewerFromArticle($res, $journal_info['journal_id']);
|
||||
//
|
||||
// //推荐审稿人
|
||||
// $recommend_res = true;
|
||||
// $reviewers = isset($data['reviewers']) ? $data['reviewers'] : [];
|
||||
// foreach ($reviewers as $v) {
|
||||
// $recommend_res = $this->addRecommentReviewer($v, $journal_info['journal_id'], $user_res['user_id'], $res);
|
||||
// }
|
||||
//
|
||||
// if ($res && $res_author && $transr && $res_add_user && $res_file1 && $res_file2 && $res_file3 && $res_file4 && $res_log && $res_msg && $recommend_res) {
|
||||
// Db::commit();
|
||||
// $this->ai_scor($res);
|
||||
// return json(['code' => 0]);
|
||||
// } else {
|
||||
// Db::rollback();
|
||||
// return json(['code' => 1]);
|
||||
// }
|
||||
$data = $this->request->post();
|
||||
|
||||
$user_res = $this->user_obj->where('account', $data['username'])->find();
|
||||
|
||||
//确定用户是否属于黑名单
|
||||
$black_check = $this->user_black_obj->where('user_id', $user_res['user_id'])->where('black_state', 0)->find();
|
||||
if ($black_check) {
|
||||
return jsonError("Your account has been blocked. Please contact the publisher for details: publisher@tmrjournals.com.");
|
||||
}
|
||||
|
||||
// if($user_res['account']=='fariba'||$user_res['account']=='zc'||$user_res['account']=='Mohammad Hossein'||$user_res['account']=='xiaoyueyue'||$user_res['account']=='sethlee000'||$user_res['account']=='yuanying9908'){
|
||||
// return json(['code'=>1,'msg'=>'Your account has been blocked. Please contact the publisher for details: publisher@tmrjournals.com.']);
|
||||
// }
|
||||
|
||||
$journal_info = $this->journal_obj->where('journal_id', $data['journal'])->find();
|
||||
//首先查重是否重复投稿
|
||||
$checkArticle = $this->article_obj->where("title", trim($data['title']))->select();
|
||||
foreach ($checkArticle as $v) {
|
||||
if ($v['state'] != 3) {
|
||||
return json(['code' => 1, 'msg' => 'Warning: you are re-submitting the article!']);
|
||||
}
|
||||
}
|
||||
Db::startTrans();
|
||||
|
||||
//添加文章基础信息
|
||||
$inset_data['user_id'] = $user_res['user_id'];
|
||||
$inset_data['journal_id'] = $data['journal'];
|
||||
$inset_data['editor_id'] = $journal_info['editor_id'];
|
||||
$inset_data['title'] = trim($data['title']);
|
||||
$inset_data['keywords'] = $data['keyWords'];
|
||||
$inset_data['fund'] = trim($data['fund']);
|
||||
$inset_data['accept_sn'] = getArticleSN($journal_info['abbr'], $data['type']);
|
||||
$inset_data['type'] = $data['type'];
|
||||
$inset_data['major_id'] = $data['major'];
|
||||
// $inset_data['cmajor_id'] = $data['cmajor'];
|
||||
$inset_data['approval'] = $data['approval'] == 'true' ? 1 : 0;
|
||||
$inset_data['abstrart'] = $data['abstrart'];
|
||||
$inset_data['author_act'] = 1;
|
||||
$inset_data['ctime'] = time();
|
||||
$res = $this->article_obj->insertGetId($inset_data);
|
||||
|
||||
//上传文章作者信息
|
||||
$author_email = [];
|
||||
$authors = [];
|
||||
$res_add_user = true;
|
||||
foreach ($data['authorList'] as $v) {
|
||||
if ($v['firstname'] == '') {
|
||||
continue;
|
||||
}
|
||||
$i['article_id'] = $res;
|
||||
$i['firstname'] = trim($v['firstname']);
|
||||
$i['lastname'] = trim($v['lastname']);
|
||||
$i['orcid'] = trim($v['orcid']);
|
||||
$i['company'] = trim($v['company']);
|
||||
$i['department'] = trim($v['department']);
|
||||
$i['author_title'] = $v['title'];
|
||||
$i['country'] = $v['country'];
|
||||
$i['email'] = trim($v['email']);
|
||||
$i['address'] = trim($v['address']);
|
||||
$i['is_super'] = $v['isSuper'] == 'true' ? 1 : 0;
|
||||
$i['is_report'] = $v['isReport'] == 'true' ? 1 : 0;
|
||||
$authors[] = $i;
|
||||
$cache['email'] = trim($v['email']);
|
||||
$cache['name'] = trim($v['firstname']) . ' ' . trim($v['lastname']);
|
||||
$author_email[] = $cache;
|
||||
|
||||
//通讯作者用户添加
|
||||
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($password);
|
||||
$inser_data['email'] = trim($v['email']);
|
||||
$inser_data['realname'] = trim($v['firstname']) . ' ' . trim($v['lastname']);
|
||||
$inser_data['ctime'] = time();
|
||||
$c_res_add_user = $this->user_obj->insertGetId($inser_data);
|
||||
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>" . $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");
|
||||
}
|
||||
}
|
||||
}
|
||||
$res_author = $this->article_author_obj->insertAll($authors);
|
||||
|
||||
//增加转投信息
|
||||
$transr = true;
|
||||
if ($data['istransfer'] == 'true') {
|
||||
foreach ($data['checkedjours'] as $val) {
|
||||
$trans_insert['article_id'] = $res;
|
||||
$trans_insert['journal_id'] = $val;
|
||||
$trans_insert['ctime'] = time();
|
||||
$transr = $transr ? $this->article_transfer_obj->insert($trans_insert) : false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//增加articlefile表的信息
|
||||
$res_file1 = self::save_article_file($res, $user_res['user_id'], $user_res['account'], $data['coverLetter'], 'coverLetter');
|
||||
$res_file2 = true;
|
||||
if (isset($data['picturesAndTables'])) {
|
||||
foreach ($data['picturesAndTables'] as $v) {
|
||||
$res_file2 = $res_file2 ? self::save_article_file($res, $user_res['user_id'], $user_res['account'], $v, 'picturesAndTables') : false;
|
||||
}
|
||||
}
|
||||
$res_file4 = self::save_article_file($res, $user_res['user_id'], $user_res['account'], $data['totalpage'], 'totalpage');
|
||||
$res_file3 = self::save_article_file($res, $user_res['user_id'], $user_res['account'], $data['manuscirpt'], 'manuscirpt');
|
||||
|
||||
//发送邮件到编辑,提醒有待审文章
|
||||
$editor_info = $this->user_obj->where('user_id', $journal_info['editor_id'])->find();
|
||||
$tt = 'Dear editor,<br>';
|
||||
$tt .= 'Please check the new manuscript in the submission system.';
|
||||
sendEmail($editor_info['email'], $journal_info['title'], $journal_info['title'], $tt, $journal_info['email'], $journal_info['epassword']);
|
||||
$user_rev_info = $this->user_reviewer_info_obj->where("reviewer_id", $user_res['user_id'])->find();
|
||||
//发送邮件给作者,表示感谢
|
||||
$tt_t = 'Dear Dr. ' . ($user_res['realname'] == '' ? $user_res['account'] : $user_res['realname']) . ',<br><br>';
|
||||
$tt1 = 'Thank you for submitting your manuscript entitled "' . $data['title'] . '". Your submission has been assigned the following tracking number:' . $inset_data['accept_sn'] . '. We will be in touch again as soon as we have reached a decision. Please quote the tracking number in any communication. This e-mail simply acknowledges receipt of your submission. If the editors decide for editorial reasons that the paper is unsuitable for publication in ' . $journal_info['title'] . ', you will be informed as soon as possible.<br><br><br>';
|
||||
if ($journal_info['journal_id'] == 9) { //life research 期刊发送收到文章邮件
|
||||
$tt1 .= 'Life Research applies the CC BY-NC 4.0 license. Full details of the policy can be found at https://www.tmrjournals.com/notice.html?J_num=14&footer_id=123. Authors should read Guide to Authors carefully before submitting.<br><br>';
|
||||
$tt1 .= 'You may check on the status of this manuscript in the Submission System. If you encounter any problems, please contact liferes@tmrjournals.com.<br><br>';
|
||||
$tt1 .= 'Thank you for choosing to submit your manuscript to Life Research.<br><br><br>';
|
||||
$tt1 .= 'Yours sincerely,<br>Haoran Zhang<br><br>';
|
||||
$tt1 .= 'Manuscript Administration, Life Research<br>https://www.tmrjournals.com/lr/';
|
||||
} else { //其他期刊发送邮件
|
||||
$tt1 .= 'You may check on the status of this manuscript in the Submission System. If you encounter any problems, please contact ' . $journal_info['email'] . '.<br><br>';
|
||||
$tt1 .= 'Thank you for choosing to submit your manuscript to ' . $journal_info['title'] . '.<br><br><br>';
|
||||
$tt1 .= 'Sincerely,<br>Editorial Office<br>';
|
||||
$tt1 .= '<a href="https://www.tmrjournals.com/draw_up.html?issn=' . $journal_info['issn'] . '">Subscribe to this journal</a><br>';
|
||||
$tt1 .= $journal_info['title'] . '<br>';
|
||||
$tt1 .= 'Email: ' . $journal_info['email'] . '<br>';
|
||||
$tt1 .= 'Website: ' . $journal_info['website'] . '<br>';
|
||||
$tt1 .= '<hr/>If you have any questions, please contact us: <br>';
|
||||
$tt1 .= 'Head of publication ethics<br>Dr. Dan Chen<br>TMR Publishing Group Limited Company, Auckland, New Zealand<br>Email: publication.ethics@tmrjournals.com';
|
||||
}
|
||||
|
||||
sendEmail($user_res['email'], $journal_info['title'], $journal_info['title'], $tt_t . $tt1, $journal_info['email'], $journal_info['epassword']);
|
||||
|
||||
foreach ($author_email as $v) {
|
||||
$cache_str = 'Dear Dr. ' . $v['name'] . ',<br><br>';
|
||||
$maidata['email'] = $v['email'];
|
||||
$maidata['title'] = $journal_info['title'];
|
||||
$maidata['content'] = $cache_str . $tt1;
|
||||
$maidata['tmail'] = $journal_info['email'];
|
||||
$maidata['tpassword'] = $journal_info['epassword'];
|
||||
Queue::push('app\api\job\mail@fire', $maidata, "tmail");
|
||||
}
|
||||
|
||||
//增加用户操作log
|
||||
$log_data['user_id'] = $user_res['user_id'];
|
||||
$log_data['type'] = 0;
|
||||
$log_data['content'] = $user_res['account'] . "(" . $user_res['realname'] . "),上传了一篇文章:" . $data['title'] . ",上传时间是:" . date('Y-m-d H:i:s', time());
|
||||
$log_data['ctime'] = time();
|
||||
$res_log = $this->user_log_obj->insert($log_data);
|
||||
|
||||
//增加usermsg
|
||||
$res_msg = add_usermsg($journal_info['editor_id'], 'New manuscript', '/articleDetailEditor?id=' . $res);
|
||||
|
||||
//通讯作者转为审稿人
|
||||
$this->addReviewerFromArticle($res, $journal_info['journal_id']);
|
||||
|
||||
//推荐审稿人
|
||||
$recommend_res = true;
|
||||
$reviewers = isset($data['reviewers']) ? $data['reviewers'] : [];
|
||||
foreach ($reviewers as $v) {
|
||||
$recommend_res = $this->addRecommentReviewer($v, $journal_info['journal_id'], $user_res['user_id'], $res);
|
||||
}
|
||||
|
||||
if ($res && $res_author && $transr && $res_add_user && $res_file1 && $res_file2 && $res_file3 && $res_file4 && $res_log && $res_msg && $recommend_res) {
|
||||
Db::commit();
|
||||
$this->ai_scor($res);
|
||||
return json(['code' => 0]);
|
||||
} else {
|
||||
Db::rollback();
|
||||
return json(['code' => 1]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1167,9 +1167,17 @@ class Finalreview extends Base
|
||||
if(empty($aReviewerFinal)){
|
||||
return json_encode(['status' => 3,'msg' => 'Review record does not exist or review has been completed']);
|
||||
}
|
||||
//查询审稿人基本信息
|
||||
$aWhere = ['user_id' => $iReviewerId];
|
||||
$aUser = Db::name('user')->field('realname')->where($aWhere)->find();
|
||||
$aUser = Db::name('user')->field('realname,email')->where($aWhere)->find();
|
||||
$aReviewerFinal['realname'] = empty($aUser['realname']) ? '' : $aUser['realname'];
|
||||
$aReviewerFinal['email'] = empty($aUser['email']) ? '' : $aUser['email'];
|
||||
//查询审稿人机构
|
||||
if(!empty($aUser)){
|
||||
$aWhere = ['reviewer_id' => $iReviewerId,'state' => 0];
|
||||
$aReviewerInfo = Db::name('user_reviewer_info')->field('company')->where($aWhere)->find();
|
||||
$aReviewerFinal['company'] = empty($aReviewerInfo['company']) ? '' : $aReviewerInfo['company'];
|
||||
}
|
||||
return json_encode(['status' => 1,'msg' => 'success','data' => $aReviewerFinal]);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ use think\log;
|
||||
class Production extends Base
|
||||
{
|
||||
|
||||
private $supportedTags = ['sup', 'sub', 'blue', 'b', 'i', 't', 'r', 'wmath','myfigure','mytable'];
|
||||
private $supportedTags = ['sup', 'sub', 'blue', 'b', 'i', 't', 'r', 'wmath','myfigure','mytable',"myh3"];
|
||||
// 颜色映射(自定义标签颜色对应LaTeX的HTML十六进制颜色)
|
||||
private $colorMap = [
|
||||
'blue' => '0082AA',
|
||||
@@ -2033,7 +2033,6 @@ class Production extends Base
|
||||
}
|
||||
|
||||
public function creatLatex(){
|
||||
die("stop service");
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
"article_id"=>"require"
|
||||
@@ -2249,8 +2248,8 @@ class Production extends Base
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$info = $this->article_main_obj->where("am_id",$data['id'])->find();
|
||||
if(isset($data["content"])){
|
||||
$content = $data['content'];
|
||||
if(isset($data["code"])){
|
||||
$content = $data['code'];
|
||||
}else{
|
||||
$content = $info['content'];
|
||||
}
|
||||
@@ -2271,21 +2270,9 @@ class Production extends Base
|
||||
return '';
|
||||
}
|
||||
//单行处理公式内容
|
||||
/* $pattern = '/^<wmath[^>]*?\s+data-latex="([^"]*)"[^>]*?>.*?<\/wmath>$/';*/
|
||||
// if(preg_match($pattern, $content) === 1){
|
||||
// $pattern1 = '/<wmath[^>]*?\s+data-latex="([^"]*)">/';
|
||||
// if (preg_match($pattern1, $content, $matches)) {
|
||||
// $latexContent = $matches[1];
|
||||
// // 将 $$ 转换为 $,因为equation环境不需要$$
|
||||
// $latexContent = str_replace('$$', '', $latexContent);
|
||||
//
|
||||
// return "\\begin{equation}\n\t{$latexContent}\n\\end{equation}";
|
||||
// }
|
||||
// return $content;
|
||||
// }
|
||||
$pattern = '/^<wmath[^>]*?\s+data-latex="([^"]*)"[^>]*?\s+data-wrap="block"[^>]*?>.*?<\/wmath>$/';
|
||||
$pattern = '/^<wmath[^>]*?\s+data-latex="([^"]*)"[^>]*?>.*?<\/wmath>$/';
|
||||
if(preg_match($pattern, $content) === 1){
|
||||
$pattern1 = '/<wmath[^>]*?\s+data-latex="([^"]*)"[^>]*?\s+data-wrap="block"[^>]*?>/';
|
||||
$pattern1 = '/<wmath[^>]*?\s+data-latex="([^"]*)">/';
|
||||
if (preg_match($pattern1, $content, $matches)) {
|
||||
$latexContent = $matches[1];
|
||||
// 将 $$ 转换为 $,因为equation环境不需要$$
|
||||
@@ -2343,9 +2330,10 @@ class Production extends Base
|
||||
$latex .= $this->escapeLatexSpecialChars($content);
|
||||
$content = '';
|
||||
}else {
|
||||
$tagOpen = "<{$nextTag}";
|
||||
$tagOpen = "<{$nextTag}>";
|
||||
$tagClose = "</{$nextTag}>";
|
||||
$beginTag = strpos($content, $tagOpen);
|
||||
|
||||
// 标签前的文本
|
||||
if ($beginTag > 0) {
|
||||
$latex .= $this->escapeLatexSpecialChars(substr($content, 0, $beginTag));
|
||||
@@ -2353,7 +2341,6 @@ class Production extends Base
|
||||
|
||||
// 找到标签的最后闭合位置(处理嵌套)
|
||||
$endTag = $this->getLastTabIndex($content, $nextTag);
|
||||
|
||||
if ($endTag === false) {
|
||||
// 无闭合标签,保留原内容(异常情况处理)
|
||||
$latex .= $this->escapeLatexSpecialChars(substr($content, $beginTag));
|
||||
@@ -2368,6 +2355,7 @@ class Production extends Base
|
||||
$endTag - $beginTag + strlen($tagClose)
|
||||
);
|
||||
|
||||
|
||||
//这里处理引用
|
||||
if ($check_refer&&preg_match('/(?:<blue>)?\[(\d+(?:[-,]\d+)*)\](?:<\/blue>)?/', $tagWrappedContent, $matches)) {
|
||||
// 去除匹配中的 <blue> 和 </blue>
|
||||
@@ -2431,7 +2419,7 @@ class Production extends Base
|
||||
* @return int|false 闭合标签的起始位置
|
||||
*/
|
||||
private function getLastTabIndex($content, $tag) {
|
||||
$tagOpen = "<{$tag}";
|
||||
$tagOpen = "<{$tag}>";
|
||||
$tagClose = "</{$tag}>";
|
||||
|
||||
$beginTag = strpos($content, $tagOpen);
|
||||
@@ -2447,7 +2435,7 @@ class Production extends Base
|
||||
|
||||
// 统计当前标签内的开放标签数量
|
||||
$caNowStr = substr($content, $beginTag, $endTagCa - $beginTag + strlen($tagClose));
|
||||
$caCount = preg_match_all("/<{$tag}/", $caNowStr, $matches);
|
||||
$caCount = preg_match_all("/<{$tag}>/", $caNowStr, $matches);
|
||||
|
||||
if ($caCount === 1) {
|
||||
return $endTagCa;
|
||||
@@ -2460,7 +2448,7 @@ class Production extends Base
|
||||
break;
|
||||
}
|
||||
$substring = substr($content, $beginTag, $numIndex - $beginTag + strlen($tagClose));
|
||||
$ccaCount = preg_match_all("/<{$tag}/", $substring, $matches);
|
||||
$ccaCount = preg_match_all("/<{$tag}>/", $substring, $matches);
|
||||
if ($ccaCount !== $caCount) {
|
||||
$caCount = $ccaCount;
|
||||
} else {
|
||||
@@ -2613,7 +2601,7 @@ class Production extends Base
|
||||
* @return string 标签名或'no'
|
||||
*/
|
||||
private function determineNextTag($content) {
|
||||
$tagPattern = '/<(' . implode('|', $this->supportedTags) . ')\b[^>]*>/i';
|
||||
$tagPattern = '/<(' . implode('|', $this->supportedTags) . ')>/i';
|
||||
if (preg_match($tagPattern, $content, $matches)) {
|
||||
return $matches[1];
|
||||
}
|
||||
|
||||
@@ -2242,7 +2242,7 @@ class Reviewer extends Base
|
||||
$aReviewerCompany = [];
|
||||
if(!empty($aUserId)){
|
||||
//作者同机构的审稿人
|
||||
$aReviewerCompany = Db::name('user_reviewer_info')->where(['reviewer_id' => ['in',$aUserId],'state' => 0])->column('reviewer_id,company');
|
||||
$aReviewerCompany = Db::name('user_reviewer_info')->where(['reviewer_id' => ['in',$aUserId],'state' => 0,'company' => ['<>','']])->column('reviewer_id,company');
|
||||
}
|
||||
|
||||
//文章作者机构信息
|
||||
@@ -2277,7 +2277,12 @@ class Reviewer extends Base
|
||||
|
||||
//过滤审稿人机构
|
||||
if(!empty($aAuthorCompany)){
|
||||
$where['t_user_reviewer_info.company'] = ['not in', $aAuthorCompany];
|
||||
$aAuthorCompany = array_filter($aAuthorCompany, function($v) {
|
||||
return trim((string)$v) !== '';
|
||||
});
|
||||
if(!empty($aAuthorCompany)){
|
||||
$where['t_user_reviewer_info.company'] = ['not in', $aAuthorCompany];
|
||||
}
|
||||
}
|
||||
// 计算10天之后的时间戳(10天 = 10 * 24 * 60 * 60秒)
|
||||
$iTeenDaysLater = strtotime('-10 days');
|
||||
@@ -2292,6 +2297,7 @@ class Reviewer extends Base
|
||||
->whereOr('t_user_reviewer_info.last_invite_time', '=', 0);
|
||||
})
|
||||
->count();
|
||||
|
||||
if(empty($count)){
|
||||
return jsonSuccess(['reviewers' => [],'count' => 0]);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ class Supplementary extends Base
|
||||
public function getJournalBoard(){
|
||||
|
||||
|
||||
//获取参数
|
||||
//获取参数
|
||||
$aParam = $this->request->post();
|
||||
|
||||
//参数验证
|
||||
@@ -38,17 +38,17 @@ class Supplementary extends Base
|
||||
$aWhere = ['state' => 0,'issn' => ['in',$sIssn]];
|
||||
$aJournal = Db::name('journal')->where($aWhere)->column('journal_id,issn');
|
||||
if(empty($aJournal)){
|
||||
return json_encode(['status' => 3,'msg' => 'No journal information found']);
|
||||
return json_encode(['status' => 3,'msg' => 'No journal information found']);
|
||||
}
|
||||
|
||||
//查询期刊编辑信息
|
||||
$aWhere = ['state' => 0,'journal_id' => ['in',array_keys($aJournal)]];
|
||||
if(isset($aParam['type'])){//编辑类型
|
||||
$aWhere['type'] = $aParam['type'];
|
||||
$aWhere['type'] = $aParam['type'];
|
||||
}
|
||||
$aJournalBoard = Db::name('board_to_journal')->field('journal_id,user_id')->where($aWhere)->select();
|
||||
if(empty($aJournalBoard)){
|
||||
return json_encode(['status' => 4,'msg' => 'No editorial information was found for the journal']);
|
||||
return json_encode(['status' => 4,'msg' => 'No editorial information was found for the journal']);
|
||||
}
|
||||
|
||||
//查询编辑详情
|
||||
@@ -62,10 +62,73 @@ class Supplementary extends Base
|
||||
continue;
|
||||
}
|
||||
$sRealName = empty($aUser[$value['user_id']]) ? '' : $aUser[$value['user_id']];
|
||||
if(!empty($sRealName) && strlen($sRealName) >= 3 && substr($sRealName, 0, 3) === "\xEF\xBB\xBF") {
|
||||
$sRealName = substr($sRealName, 3);
|
||||
}
|
||||
$aUserData[$sIssn][] = $sRealName;
|
||||
}
|
||||
return json_encode(['status' => 1,'msg' => 'success','data' => $aUserData]);
|
||||
}
|
||||
return json_encode(['status' => 1,'msg' => 'success','data' => $aUserData]);
|
||||
}
|
||||
/**
|
||||
* @title 获取文章底部信息
|
||||
* @description 获取期刊编辑接口
|
||||
*/
|
||||
public function getProductiArticleFooter(){
|
||||
|
||||
$aParam = $this->request->post();
|
||||
|
||||
//官网文章ID
|
||||
$iWarticleId = empty($aParam['w_article_id']) ? 0 : $aParam['w_article_id'];
|
||||
if(empty($iWarticleId)){
|
||||
return json_encode(['status' => 2,'msg' => 'Please select an article']);
|
||||
}
|
||||
|
||||
//获取子刊信息
|
||||
$aJournalStage = empty($aParam['journal_stage']) ? [] : $aParam['journal_stage'];
|
||||
|
||||
//查询文章生产信息
|
||||
$aWhere = ['w_article_id' => $iWarticleId,'state' => ['in',[0,2]]];
|
||||
$aProductionArticle = Db::name('production_article')->field('p_article_id,article_id,journal_stage_id,journal_id,title,type,acknowledgment,abbreviation,author_contribution,abbr,npp,doi,executive_editor')->where($aWhere)->find();
|
||||
if(empty($aProductionArticle)){
|
||||
return json_encode(['status' => 3,'msg' => 'No production article information found']);
|
||||
}
|
||||
|
||||
//查询期刊信息
|
||||
$iJournalId = empty($aProductionArticle['journal_id']) ? 0 : $aProductionArticle['journal_id'];
|
||||
$aJournal = [];
|
||||
if(!empty($iJournalId)){
|
||||
$aWhere = ['journal_id' => $iJournalId,'state' => 0];
|
||||
$aJournal = Db::name('journal')->field('jabbr,title')->where($aWhere)->find();
|
||||
}
|
||||
//获取文章时间/编委信息
|
||||
$iArticleId = empty($aProductionArticle['article_id']) ? 0 : $aProductionArticle['article_id'];
|
||||
if(empty($iArticleId)){
|
||||
return json_encode(['status' => 3,'msg' => 'No article information found']);
|
||||
}
|
||||
$oLatexContent = new \app\common\LatexContent;
|
||||
$aTime = $oLatexContent->getArticleTime(['article_id' => $iArticleId]);
|
||||
$aProductionArticle = empty($aTime['data']) ? $aProductionArticle : array_merge($aTime['data'],$aProductionArticle);
|
||||
|
||||
//获取期刊引用信息
|
||||
$sCite = $this->_cite($aProductionArticle,$aJournal,$aJournalStage);
|
||||
$aProductionArticle['article_cite'] = empty($sCite) ? '' : $sCite;
|
||||
$aProductionArticle['journal_title'] = empty($aJournal['title']) ? '' : $aJournal['title'];
|
||||
return json_encode(['status' => 1,'data' => $aProductionArticle]);
|
||||
}
|
||||
//处理期刊引用信息
|
||||
private function _cite($aArticle = [],$aJournal = [],$aJournalStage = []){
|
||||
$no = empty($aJournalStage['stage_no']) ? ':' : '(' . $aJournalStage['stage_no'] . '):';
|
||||
$jabbr = empty($aJournal['jabbr']) ? '' : $aJournal['jabbr'];
|
||||
$stage_year = empty($aJournalStage['stage_year']) ? '' : $aJournalStage['stage_year'];
|
||||
$stage_vol = empty($aJournalStage['stage_vol']) ? '' : $aJournalStage['stage_vol'];
|
||||
|
||||
$sCite = '';
|
||||
if ($aArticle['journal_id'] == 22) {
|
||||
$sCite = $aArticle['abbr'] . '. ' . $aArticle['title'] . '[J]. ' . choiseJabbr($aArticle['article_id'],$jabbr) . ',' . $stage_year . ',' . $stage_vol . $no . $aArticle['npp'] . '. doi:' . $aArticle['doi'];
|
||||
} else {
|
||||
$sCite = $aArticle['abbr'] . '. ' . $aArticle['title'] . '. <i>' . choiseJabbr($aArticle['article_id'], $jabbr) . '</i>. ' . $stage_year . ';' . $stage_vol . $no . $aArticle['npp'] . '. doi:' . $aArticle['doi'];
|
||||
}
|
||||
return $sCite;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -36,7 +36,7 @@ class Workbench extends Base
|
||||
//获取状态
|
||||
$iState = isset($aParam['state']) ? $aParam['state'] : -2;
|
||||
//空的查询条件
|
||||
$aWhere = [];
|
||||
$aWhere = ['accept_sn' => ['not like','Draft%']];
|
||||
//SN
|
||||
$sAcceptSn = empty($aParam['accept_sn']) ? '': $aParam['accept_sn'];
|
||||
if(!empty($sAcceptSn)){
|
||||
@@ -181,6 +181,10 @@ class Workbench extends Base
|
||||
$aArticle[$key]['report'] = $aAuthorInfo;
|
||||
$aArticle[$key]['country'] = empty($aAuthorInfo) ? [] : array_unique(array_column($aAuthorInfo, 'country'));
|
||||
$aArticle[$key]['type_name'] = translateType($value['type']);
|
||||
$aArticle[$key]['is_draft'] = 2;
|
||||
if(!empty($value['accept_sn']) && substr($value['accept_sn'], 0, 5) === 'Draft'){
|
||||
$aArticle[$key]['is_draft'] = 1;
|
||||
}
|
||||
|
||||
// //付款信息
|
||||
// $iPsId = empty($aOrder[$value['article_id']]) ? 0 : $aOrder[$value['article_id']];
|
||||
@@ -452,6 +456,12 @@ class Workbench extends Base
|
||||
$aArticleReviewer['realname'] = empty($aUser['realname']) ? '' : $aUser['realname'];
|
||||
$aArticleReviewer['email'] = empty($aUser['email']) ? '' : $aUser['email'];
|
||||
}
|
||||
//查询审稿人机构
|
||||
if(!empty($aUser)){
|
||||
$aWhere = ['reviewer_id' => $iUserId,'state' => 0];
|
||||
$aReviewerInfo = Db::name('user_reviewer_info')->field('company')->where($aWhere)->find();
|
||||
$aArticleReviewer['company'] = empty($aReviewerInfo['company']) ? '' : $aReviewerInfo['company'];
|
||||
}
|
||||
|
||||
//组装信息
|
||||
$aData = ['article' => $aArticle,'article_reviewer' => $aArticleReviewer];
|
||||
@@ -641,13 +651,31 @@ class Workbench extends Base
|
||||
|
||||
//查询审稿记录
|
||||
$aWhere = ['art_rev_id' => $iArtRevId];
|
||||
$aArticleReviewer = Db::name('article_reviewer')->field('art_rev_id,reviewer_id,article_id,state')->where($aWhere)->find();
|
||||
$aArticleReviewer = Db::name('article_reviewer')->field('art_rev_id,reviewer_id,article_id,state,agree_review_time,ctime')->where($aWhere)->find();
|
||||
if(empty($aArticleReviewer)){
|
||||
return json_encode(['status' => 4,'msg' => 'Review record does not exist']);
|
||||
}
|
||||
if($aArticleReviewer['state'] != 4){
|
||||
if($aArticleReviewer['state'] != 4 && $aArticleReviewer['state'] != 0){
|
||||
return json_encode(['status' => 5,'msg' => 'The review link has not expired and no application is required']);
|
||||
}
|
||||
if($aArticleReviewer['state'] == 0){
|
||||
$iCtime = empty($aArticleReviewer['ctime']) ? 0 : $aArticleReviewer['ctime'];
|
||||
$iTime = empty($aArticleReviewer['agree_review_time']) ? 0 : $aArticleReviewer['agree_review_time'];
|
||||
$iTime = empty($iTime) ? intval($iCtime) : intval($iTime);
|
||||
if (!is_numeric($iTime) || (int)$iTime <= 0) {
|
||||
return json_encode(['status' => 12,'msg' => 'Invalid record time, the review period has expired']);
|
||||
}
|
||||
//判断是否超过14天
|
||||
// 14天 = 14*24*3600 秒 = 1209600 秒
|
||||
$iNowTime = strtotime(date('Y-m-d', time()));
|
||||
$iFourteenDays = 14 * 24 * 3600;
|
||||
$iTime = date('Y-m-d', $iTime);
|
||||
$iTime = strtotime($iTime);//同意审稿时间戳
|
||||
$timeDiff = $iTime+$iFourteenDays;
|
||||
if($timeDiff >= $iNowTime){
|
||||
return json_encode(['status' => 13,'msg' => 'The review link has not expired and no application is required']);
|
||||
}
|
||||
}
|
||||
|
||||
//获取文章信息
|
||||
$aWhere = ['article_id' => $aArticleReviewer['article_id']];
|
||||
@@ -685,7 +713,7 @@ class Workbench extends Base
|
||||
$aUser = array_column($aUser, null,'user_id');
|
||||
|
||||
//更新审稿人重新申请状态为
|
||||
$aWhere = ['art_rev_id' => $iArtRevId,'state' => 4];
|
||||
$aWhere = ['art_rev_id' => $iArtRevId];
|
||||
$result = Db::name('article_reviewer')->where($aWhere)->limit(1)->update(['is_reapply' => 1,'reapply_time' => time(),'reviewer_act' => 1]);
|
||||
if($result === false){
|
||||
return json_encode(array('status' => 11,'msg' => 'Application to reopen link failed' ));
|
||||
@@ -773,14 +801,34 @@ class Workbench extends Base
|
||||
|
||||
//查询审稿记录
|
||||
$aWhere = ['art_rev_id' => $iArtRevId];
|
||||
$aArticleReviewer = Db::name('article_reviewer')->field('art_rev_id,reviewer_id,article_id,state')->where($aWhere)->find();
|
||||
$aArticleReviewer = Db::name('article_reviewer')->field('art_rev_id,reviewer_id,article_id,state,ctime,agree_review_time')->where($aWhere)->find();
|
||||
if(empty($aArticleReviewer)){
|
||||
return json_encode(['status' => 4,'msg' => 'Review record does not exist']);
|
||||
}
|
||||
if($aArticleReviewer['state'] != 4){
|
||||
// if($aArticleReviewer['state'] != 4){
|
||||
// return json_encode(['status' => 5,'msg' => 'The review link has not expired and no application is required']);
|
||||
// }
|
||||
if($aArticleReviewer['state'] != 4 && $aArticleReviewer['state'] != 0){
|
||||
return json_encode(['status' => 5,'msg' => 'The review link has not expired and no application is required']);
|
||||
}
|
||||
|
||||
if($aArticleReviewer['state'] == 0){
|
||||
$iCtime = empty($aArticleReviewer['ctime']) ? 0 : $aArticleReviewer['ctime'];
|
||||
$iTime = empty($aArticleReviewer['agree_review_time']) ? 0 : $aArticleReviewer['agree_review_time'];
|
||||
$iTime = empty($iTime) ? intval($iCtime) : intval($iTime);
|
||||
if (!is_numeric($iTime) || (int)$iTime <= 0) {
|
||||
return json_encode(['status' => 12,'msg' => 'Invalid record time, the review period has expired']);
|
||||
}
|
||||
//判断是否超过14天
|
||||
$iNowTime = strtotime(date('Y-m-d', time()));
|
||||
// 14天 = 14*24*3600 秒 = 1209600 秒
|
||||
$iFourteenDays = 14 * 24 * 3600;
|
||||
$iTime = date('Y-m-d', $iTime);
|
||||
$iTime = strtotime($iTime);//同意审稿时间戳
|
||||
$timeDiff = $iTime+$iFourteenDays;
|
||||
if($timeDiff >= $iNowTime){
|
||||
return json_encode(['status' => 13,'msg' => 'The review link has not expired and no application is required']);
|
||||
}
|
||||
}
|
||||
//获取文章信息
|
||||
$aWhere = ['article_id' => $aArticleReviewer['article_id']];
|
||||
$aArticle = Db::name('article')->field('article_id,abstrart,title,type,accept_sn,journal_id,state')->where($aWhere)->find();
|
||||
@@ -808,12 +856,24 @@ class Workbench extends Base
|
||||
// }
|
||||
|
||||
//更新文章状态为邀请
|
||||
$aWhere = ['art_rev_id' => $iArtRevId,'state' => 4];
|
||||
$result = Db::name('article_reviewer')->where($aWhere)->limit(1)->update(['state' => 5,'ctime' => time(),'editor_act' => 1,'is_reapply' => 2,'update_time' => time(),'reviewer_act' => 0]);
|
||||
$aWhere = ['art_rev_id' => $iArtRevId];
|
||||
$aUpdate = [];
|
||||
if($aArticleReviewer['state'] == 4){
|
||||
$aUpdate['state'] = 5;
|
||||
$aUpdate['ctime'] = time();
|
||||
}
|
||||
if($aArticleReviewer['state'] == 0){
|
||||
$aUpdate['agree_review_time'] = time();
|
||||
}
|
||||
if(empty($aUpdate)){
|
||||
return json_encode(array('status' => 15,'msg' => 'Update data to empty' ));
|
||||
}
|
||||
$aUpdate += ['editor_act' => 1,'is_reapply' => 2,'update_time' => time(),'reviewer_act' => 0];
|
||||
$result = Db::name('article_reviewer')->where($aWhere)->limit(1)->update($aUpdate);
|
||||
if($result === false){
|
||||
return json_encode(array('status' => 11,'msg' => 'Status update failed' ));
|
||||
}
|
||||
|
||||
|
||||
//查询审稿人的邮箱
|
||||
$aWhere = ['user_id' => $aArticleReviewer['reviewer_id'],'state' => 0,'email' => ['<>','']];
|
||||
$aUser = Db::name('user')->field('user_id,email,realname,account')->where($aWhere)->find();
|
||||
|
||||
Reference in New Issue
Block a user