Compare commits
16 Commits
e109a84eff
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b215fc1ab8 | ||
|
|
71c94933f9 | ||
|
|
46ebbc3f0e | ||
|
|
dad360489e | ||
|
|
efc766cf1c | ||
|
|
9c0f14d8d7 | ||
|
|
736d32bf91 | ||
|
|
e9bcaa5c24 | ||
|
|
c55e764a48 | ||
|
|
44b88a83ca | ||
|
|
6f417f6e9f | ||
|
|
8319777d3e | ||
|
|
71ec3c2ccd | ||
|
|
56dd707f9b | ||
|
|
d2fe34a7a3 | ||
|
|
2f921a4ea2 |
@@ -129,6 +129,12 @@ class Article extends Base
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$res[$key]['proof'] = $proof_state;
|
$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
|
//查询终审意见 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]);
|
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)");
|
die("Please update your browser cache and resubmit your submission (shortcut key: Ctrl+F5)");
|
||||||
//接受参数,查询信息
|
//接受参数,查询信息
|
||||||
// $data = $this->request->post();
|
$data = $this->request->post();
|
||||||
//
|
|
||||||
// $user_res = $this->user_obj->where('account', $data['username'])->find();
|
$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();
|
$black_check = $this->user_black_obj->where('user_id', $user_res['user_id'])->where('black_state', 0)->find();
|
||||||
// if ($black_check) {
|
if ($black_check) {
|
||||||
// return jsonError("Your account has been blocked. Please contact the publisher for details: publisher@tmrjournals.com.");
|
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'){
|
// 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.']);
|
// 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();
|
$journal_info = $this->journal_obj->where('journal_id', $data['journal'])->find();
|
||||||
// //首先查重是否重复投稿
|
//首先查重是否重复投稿
|
||||||
// $checkArticle = $this->article_obj->where("title", trim($data['title']))->select();
|
$checkArticle = $this->article_obj->where("title", trim($data['title']))->select();
|
||||||
// foreach ($checkArticle as $v) {
|
foreach ($checkArticle as $v) {
|
||||||
// if ($v['state'] != 3) {
|
if ($v['state'] != 3) {
|
||||||
// return json(['code' => 1, 'msg' => 'Warning: you are re-submitting the article!']);
|
return json(['code' => 1, 'msg' => 'Warning: you are re-submitting the article!']);
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// Db::startTrans();
|
Db::startTrans();
|
||||||
//
|
|
||||||
// //添加文章基础信息
|
//添加文章基础信息
|
||||||
// $inset_data['user_id'] = $user_res['user_id'];
|
$inset_data['user_id'] = $user_res['user_id'];
|
||||||
// $inset_data['journal_id'] = $data['journal'];
|
$inset_data['journal_id'] = $data['journal'];
|
||||||
// $inset_data['editor_id'] = $journal_info['editor_id'];
|
$inset_data['editor_id'] = $journal_info['editor_id'];
|
||||||
// $inset_data['title'] = trim($data['title']);
|
$inset_data['title'] = trim($data['title']);
|
||||||
// $inset_data['keywords'] = $data['keyWords'];
|
$inset_data['keywords'] = $data['keyWords'];
|
||||||
// $inset_data['fund'] = trim($data['fund']);
|
$inset_data['fund'] = trim($data['fund']);
|
||||||
// $inset_data['accept_sn'] = getArticleSN($journal_info['abbr'], $data['type']);
|
$inset_data['accept_sn'] = getArticleSN($journal_info['abbr'], $data['type']);
|
||||||
// $inset_data['type'] = $data['type'];
|
$inset_data['type'] = $data['type'];
|
||||||
// $inset_data['major_id'] = $data['major'];
|
$inset_data['major_id'] = $data['major'];
|
||||||
// // $inset_data['cmajor_id'] = $data['cmajor'];
|
// $inset_data['cmajor_id'] = $data['cmajor'];
|
||||||
// $inset_data['approval'] = $data['approval'] == 'true' ? 1 : 0;
|
$inset_data['approval'] = $data['approval'] == 'true' ? 1 : 0;
|
||||||
// $inset_data['abstrart'] = $data['abstrart'];
|
$inset_data['abstrart'] = $data['abstrart'];
|
||||||
// $inset_data['author_act'] = 1;
|
$inset_data['author_act'] = 1;
|
||||||
// $inset_data['ctime'] = time();
|
$inset_data['ctime'] = time();
|
||||||
// $res = $this->article_obj->insertGetId($inset_data);
|
$res = $this->article_obj->insertGetId($inset_data);
|
||||||
//
|
|
||||||
// //上传文章作者信息
|
//上传文章作者信息
|
||||||
// $author_email = [];
|
$author_email = [];
|
||||||
// $authors = [];
|
$authors = [];
|
||||||
// $res_add_user = true;
|
$res_add_user = true;
|
||||||
// foreach ($data['authorList'] as $v) {
|
foreach ($data['authorList'] as $v) {
|
||||||
// if ($v['firstname'] == '') {
|
if ($v['firstname'] == '') {
|
||||||
// continue;
|
continue;
|
||||||
// }
|
}
|
||||||
// $i['article_id'] = $res;
|
$i['article_id'] = $res;
|
||||||
// $i['firstname'] = trim($v['firstname']);
|
$i['firstname'] = trim($v['firstname']);
|
||||||
// $i['lastname'] = trim($v['lastname']);
|
$i['lastname'] = trim($v['lastname']);
|
||||||
// $i['orcid'] = trim($v['orcid']);
|
$i['orcid'] = trim($v['orcid']);
|
||||||
// $i['company'] = trim($v['company']);
|
$i['company'] = trim($v['company']);
|
||||||
// $i['department'] = trim($v['department']);
|
$i['department'] = trim($v['department']);
|
||||||
// $i['author_title'] = $v['title'];
|
$i['author_title'] = $v['title'];
|
||||||
// $i['country'] = $v['country'];
|
$i['country'] = $v['country'];
|
||||||
// $i['email'] = trim($v['email']);
|
$i['email'] = trim($v['email']);
|
||||||
// $i['address'] = trim($v['address']);
|
$i['address'] = trim($v['address']);
|
||||||
// $i['is_super'] = $v['isSuper'] == 'true' ? 1 : 0;
|
$i['is_super'] = $v['isSuper'] == 'true' ? 1 : 0;
|
||||||
// $i['is_report'] = $v['isReport'] == 'true' ? 1 : 0;
|
$i['is_report'] = $v['isReport'] == 'true' ? 1 : 0;
|
||||||
// $authors[] = $i;
|
$authors[] = $i;
|
||||||
// $cache['email'] = trim($v['email']);
|
$cache['email'] = trim($v['email']);
|
||||||
// $cache['name'] = trim($v['firstname']) . ' ' . trim($v['lastname']);
|
$cache['name'] = trim($v['firstname']) . ' ' . trim($v['lastname']);
|
||||||
// $author_email[] = $cache;
|
$author_email[] = $cache;
|
||||||
//
|
|
||||||
// //通讯作者用户添加
|
//通讯作者用户添加
|
||||||
// if ($v['isReport'] == "true") {
|
if ($v['isReport'] == "true") {
|
||||||
// $re_user_check = $this->user_obj->where('account|email', trim($v['email']))->find();
|
$re_user_check = $this->user_obj->where('account|email', trim($v['email']))->find();
|
||||||
// if (!$re_user_check) {
|
if (!$re_user_check) {
|
||||||
// $password = getRandPassword();
|
$password = getRandPassword();
|
||||||
// $inser_data['account'] = trim($v['email']);
|
$inser_data['account'] = trim($v['email']);
|
||||||
// $inser_data['password'] = md5($password);
|
$inser_data['password'] = md5($password);
|
||||||
// $inser_data['email'] = trim($v['email']);
|
$inser_data['email'] = trim($v['email']);
|
||||||
// $inser_data['realname'] = trim($v['firstname']) . ' ' . trim($v['lastname']);
|
$inser_data['realname'] = trim($v['firstname']) . ' ' . trim($v['lastname']);
|
||||||
// $inser_data['ctime'] = time();
|
$inser_data['ctime'] = time();
|
||||||
// $c_res_add_user = $this->user_obj->insertGetId($inser_data);
|
$c_res_add_user = $this->user_obj->insertGetId($inser_data);
|
||||||
// if ($res_add_user) {
|
if ($res_add_user) {
|
||||||
// $res_add_user = $c_res_add_user;
|
$res_add_user = $c_res_add_user;
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// //发送提示邮件给通讯作者
|
//发送提示邮件给通讯作者
|
||||||
// $report_tt = "Dear " . $inser_data['realname'] . ',<br/><br/>';
|
$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 .= "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 .= "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 .= "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 .= "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 .= "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'];
|
$report_tt .= "Best regards,<br>" . $journal_info['title'];
|
||||||
// $maidata['email'] = trim($v['email']);
|
$maidata['email'] = trim($v['email']);
|
||||||
// $maidata['title'] = $journal_info['title'];
|
$maidata['title'] = $journal_info['title'];
|
||||||
// $maidata['content'] = $report_tt;
|
$maidata['content'] = $report_tt;
|
||||||
// $maidata['tmail'] = $journal_info['email'];
|
$maidata['tmail'] = $journal_info['email'];
|
||||||
// $maidata['tpassword'] = $journal_info['epassword'];
|
$maidata['tpassword'] = $journal_info['epassword'];
|
||||||
// Queue::push('app\api\job\mail@fire', $maidata, "tmail");
|
Queue::push('app\api\job\mail@fire', $maidata, "tmail");
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// $res_author = $this->article_author_obj->insertAll($authors);
|
$res_author = $this->article_author_obj->insertAll($authors);
|
||||||
//
|
|
||||||
// //增加转投信息
|
//增加转投信息
|
||||||
// $transr = true;
|
$transr = true;
|
||||||
// if ($data['istransfer'] == 'true') {
|
if ($data['istransfer'] == 'true') {
|
||||||
// foreach ($data['checkedjours'] as $val) {
|
foreach ($data['checkedjours'] as $val) {
|
||||||
// $trans_insert['article_id'] = $res;
|
$trans_insert['article_id'] = $res;
|
||||||
// $trans_insert['journal_id'] = $val;
|
$trans_insert['journal_id'] = $val;
|
||||||
// $trans_insert['ctime'] = time();
|
$trans_insert['ctime'] = time();
|
||||||
// $transr = $transr ? $this->article_transfer_obj->insert($trans_insert) : false;
|
$transr = $transr ? $this->article_transfer_obj->insert($trans_insert) : false;
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
//
|
|
||||||
// //增加articlefile表的信息
|
//增加articlefile表的信息
|
||||||
// $res_file1 = self::save_article_file($res, $user_res['user_id'], $user_res['account'], $data['coverLetter'], 'coverLetter');
|
$res_file1 = self::save_article_file($res, $user_res['user_id'], $user_res['account'], $data['coverLetter'], 'coverLetter');
|
||||||
// $res_file2 = true;
|
$res_file2 = true;
|
||||||
// if (isset($data['picturesAndTables'])) {
|
if (isset($data['picturesAndTables'])) {
|
||||||
// foreach ($data['picturesAndTables'] as $v) {
|
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_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_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');
|
$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();
|
$editor_info = $this->user_obj->where('user_id', $journal_info['editor_id'])->find();
|
||||||
// $tt = 'Dear editor,<br>';
|
$tt = 'Dear editor,<br>';
|
||||||
// $tt .= 'Please check the new manuscript in the submission system.';
|
$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']);
|
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();
|
$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>';
|
$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>';
|
$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 期刊发送收到文章邮件
|
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 .= '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 .= '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 .= 'Thank you for choosing to submit your manuscript to Life Research.<br><br><br>';
|
||||||
// $tt1 .= 'Yours sincerely,<br>Haoran Zhang<br><br>';
|
$tt1 .= 'Yours sincerely,<br>Haoran Zhang<br><br>';
|
||||||
// $tt1 .= 'Manuscript Administration, Life Research<br>https://www.tmrjournals.com/lr/';
|
$tt1 .= 'Manuscript Administration, Life Research<br>https://www.tmrjournals.com/lr/';
|
||||||
// } else { //其他期刊发送邮件
|
} 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 .= '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 .= 'Thank you for choosing to submit your manuscript to ' . $journal_info['title'] . '.<br><br><br>';
|
||||||
// $tt1 .= 'Sincerely,<br>Editorial Office<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 .= '<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 .= $journal_info['title'] . '<br>';
|
||||||
// $tt1 .= 'Email: ' . $journal_info['email'] . '<br>';
|
$tt1 .= 'Email: ' . $journal_info['email'] . '<br>';
|
||||||
// $tt1 .= 'Website: ' . $journal_info['website'] . '<br>';
|
$tt1 .= 'Website: ' . $journal_info['website'] . '<br>';
|
||||||
// $tt1 .= '<hr/>If you have any questions, please contact us: <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';
|
$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']);
|
sendEmail($user_res['email'], $journal_info['title'], $journal_info['title'], $tt_t . $tt1, $journal_info['email'], $journal_info['epassword']);
|
||||||
//
|
|
||||||
// foreach ($author_email as $v) {
|
foreach ($author_email as $v) {
|
||||||
// $cache_str = 'Dear Dr. ' . $v['name'] . ',<br><br>';
|
$cache_str = 'Dear Dr. ' . $v['name'] . ',<br><br>';
|
||||||
// $maidata['email'] = $v['email'];
|
$maidata['email'] = $v['email'];
|
||||||
// $maidata['title'] = $journal_info['title'];
|
$maidata['title'] = $journal_info['title'];
|
||||||
// $maidata['content'] = $cache_str . $tt1;
|
$maidata['content'] = $cache_str . $tt1;
|
||||||
// $maidata['tmail'] = $journal_info['email'];
|
$maidata['tmail'] = $journal_info['email'];
|
||||||
// $maidata['tpassword'] = $journal_info['epassword'];
|
$maidata['tpassword'] = $journal_info['epassword'];
|
||||||
// Queue::push('app\api\job\mail@fire', $maidata, "tmail");
|
Queue::push('app\api\job\mail@fire', $maidata, "tmail");
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// //增加用户操作log
|
//增加用户操作log
|
||||||
// $log_data['user_id'] = $user_res['user_id'];
|
$log_data['user_id'] = $user_res['user_id'];
|
||||||
// $log_data['type'] = 0;
|
$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['content'] = $user_res['account'] . "(" . $user_res['realname'] . "),上传了一篇文章:" . $data['title'] . ",上传时间是:" . date('Y-m-d H:i:s', time());
|
||||||
// $log_data['ctime'] = time();
|
$log_data['ctime'] = time();
|
||||||
// $res_log = $this->user_log_obj->insert($log_data);
|
$res_log = $this->user_log_obj->insert($log_data);
|
||||||
//
|
|
||||||
// //增加usermsg
|
//增加usermsg
|
||||||
// $res_msg = add_usermsg($journal_info['editor_id'], 'New manuscript', '/articleDetailEditor?id=' . $res);
|
$res_msg = add_usermsg($journal_info['editor_id'], 'New manuscript', '/articleDetailEditor?id=' . $res);
|
||||||
//
|
|
||||||
// //通讯作者转为审稿人
|
//通讯作者转为审稿人
|
||||||
// $this->addReviewerFromArticle($res, $journal_info['journal_id']);
|
$this->addReviewerFromArticle($res, $journal_info['journal_id']);
|
||||||
//
|
|
||||||
// //推荐审稿人
|
//推荐审稿人
|
||||||
// $recommend_res = true;
|
$recommend_res = true;
|
||||||
// $reviewers = isset($data['reviewers']) ? $data['reviewers'] : [];
|
$reviewers = isset($data['reviewers']) ? $data['reviewers'] : [];
|
||||||
// foreach ($reviewers as $v) {
|
foreach ($reviewers as $v) {
|
||||||
// $recommend_res = $this->addRecommentReviewer($v, $journal_info['journal_id'], $user_res['user_id'], $res);
|
$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) {
|
if ($res && $res_author && $transr && $res_add_user && $res_file1 && $res_file2 && $res_file3 && $res_file4 && $res_log && $res_msg && $recommend_res) {
|
||||||
// Db::commit();
|
Db::commit();
|
||||||
// $this->ai_scor($res);
|
$this->ai_scor($res);
|
||||||
// return json(['code' => 0]);
|
return json(['code' => 0]);
|
||||||
// } else {
|
} else {
|
||||||
// Db::rollback();
|
Db::rollback();
|
||||||
// return json(['code' => 1]);
|
return json(['code' => 1]);
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1167,9 +1167,17 @@ class Finalreview extends Base
|
|||||||
if(empty($aReviewerFinal)){
|
if(empty($aReviewerFinal)){
|
||||||
return json_encode(['status' => 3,'msg' => 'Review record does not exist or review has been completed']);
|
return json_encode(['status' => 3,'msg' => 'Review record does not exist or review has been completed']);
|
||||||
}
|
}
|
||||||
|
//查询审稿人基本信息
|
||||||
$aWhere = ['user_id' => $iReviewerId];
|
$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['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]);
|
return json_encode(['status' => 1,'msg' => 'success','data' => $aReviewerFinal]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ use think\log;
|
|||||||
class Production extends Base
|
class Production extends Base
|
||||||
{
|
{
|
||||||
|
|
||||||
private $supportedTags = ['sup', 'sub', 'blue', 'b', 'i', 't', 'r', 'wmath'];
|
private $supportedTags = ['sup', 'sub', 'blue', 'b', 'i', 't', 'r', 'wmath','myh3'];
|
||||||
// 颜色映射(自定义标签颜色对应LaTeX的HTML十六进制颜色)
|
// 颜色映射(自定义标签颜色对应LaTeX的HTML十六进制颜色)
|
||||||
private $colorMap = [
|
private $colorMap = [
|
||||||
'blue' => '0082AA',
|
'blue' => '0082AA',
|
||||||
@@ -518,6 +518,12 @@ class Production extends Base
|
|||||||
$p_info = $this->production_article_obj->where('p_article_id', $data['p_article_id'])->find();
|
$p_info = $this->production_article_obj->where('p_article_id', $data['p_article_id'])->find();
|
||||||
$journal_info = $this->journal_obj->where('journal_id', $p_info['journal_id'])->find();
|
$journal_info = $this->journal_obj->where('journal_id', $p_info['journal_id'])->find();
|
||||||
|
|
||||||
|
//是否显示图文摘要图片1是2否3默认 20260206 start
|
||||||
|
$is_graphical_abstract = empty($data['is_graphical_abstract']) ? 3 : $data['is_graphical_abstract'];
|
||||||
|
if(!in_array($is_graphical_abstract, [1,2])){
|
||||||
|
return jsonError('Please select whether the uploaded picture should be shown as graphic abstract on the PDF title page');
|
||||||
|
}
|
||||||
|
//是否显示图文摘要图片1是2否3默认 20260206 end
|
||||||
|
|
||||||
$update['title'] = trim($data['title']);
|
$update['title'] = trim($data['title']);
|
||||||
$update['journal_stage_id'] = $data['journal_stage_id'];
|
$update['journal_stage_id'] = $data['journal_stage_id'];
|
||||||
@@ -537,6 +543,9 @@ class Production extends Base
|
|||||||
// $update['pub_date'] = trim($data['pub_date']);
|
// $update['pub_date'] = trim($data['pub_date']);
|
||||||
$update['npp'] = isset($data['npp']) ? $data['npp'] : '';
|
$update['npp'] = isset($data['npp']) ? $data['npp'] : '';
|
||||||
|
|
||||||
|
//是否显示图文摘要图片1是2否3默认 20260206 start
|
||||||
|
$update['is_graphical_abstract'] = $is_graphical_abstract;
|
||||||
|
//是否显示图文摘要图片1是2否3默认 20260206 end
|
||||||
//生成doi号
|
//生成doi号
|
||||||
// $doi = '';
|
// $doi = '';
|
||||||
// if ($p_info['doi'] == '') {
|
// if ($p_info['doi'] == '') {
|
||||||
@@ -1709,6 +1718,12 @@ class Production extends Base
|
|||||||
}
|
}
|
||||||
//判断邮箱是否重复 chengxiaoling 20250926 end
|
//判断邮箱是否重复 chengxiaoling 20250926 end
|
||||||
|
|
||||||
|
//判断是否是通讯作者 通讯地址必填 20260206 start
|
||||||
|
if(isset($data['is_report']) && $data['is_report'] == 1 && empty($data['mailing_address'])){
|
||||||
|
return jsonError("Please enter your mailing address");
|
||||||
|
}
|
||||||
|
//判断是否是通讯作者 通讯地址必填 20260206 end
|
||||||
|
|
||||||
$article_info = $this->article_obj->where('article_id', $old_article_author_info['article_id'])->find();
|
$article_info = $this->article_obj->where('article_id', $old_article_author_info['article_id'])->find();
|
||||||
$updata['author_name'] = $article_info['journal_id'] == 21 ? trim($data['last_name']) . trim($data['first_name']) : trim($data['first_name']) . ' ' . trim($data['last_name']);
|
$updata['author_name'] = $article_info['journal_id'] == 21 ? trim($data['last_name']) . trim($data['first_name']) : trim($data['first_name']) . ' ' . trim($data['last_name']);
|
||||||
$updata['first_name'] = trim($data['first_name']);
|
$updata['first_name'] = trim($data['first_name']);
|
||||||
@@ -1718,6 +1733,11 @@ class Production extends Base
|
|||||||
$updata['is_first'] = $data['is_first'];
|
$updata['is_first'] = $data['is_first'];
|
||||||
$updata['is_report'] = $data['is_report'];
|
$updata['is_report'] = $data['is_report'];
|
||||||
$updata['email'] = isset($data['email']) ? trim($data['email']) : '';
|
$updata['email'] = isset($data['email']) ? trim($data['email']) : '';
|
||||||
|
|
||||||
|
//通信地址 20260206 start
|
||||||
|
$updata['mailing_address'] = isset($data['mailing_address']) ? trim($data['mailing_address']) : '';
|
||||||
|
//通信地址 20260206 end
|
||||||
|
|
||||||
$this->production_article_author_obj->where('p_article_author_id', $data['p_article_author_id'])->update($updata);
|
$this->production_article_author_obj->where('p_article_author_id', $data['p_article_author_id'])->update($updata);
|
||||||
if (is_array($data['organs'])) {
|
if (is_array($data['organs'])) {
|
||||||
$has_ids = [];
|
$has_ids = [];
|
||||||
@@ -1811,6 +1831,12 @@ class Production extends Base
|
|||||||
}
|
}
|
||||||
//判断邮箱是否重复 chengxiaoling 20250926 end
|
//判断邮箱是否重复 chengxiaoling 20250926 end
|
||||||
|
|
||||||
|
//判断是否是通讯作者 通讯地址必填 20260206 start
|
||||||
|
if(isset($data['is_report']) && $data['is_report'] == 1 && empty($data['mailing_address'])){
|
||||||
|
return jsonError("Please enter your mailing address");
|
||||||
|
}
|
||||||
|
//判断是否是通讯作者 通讯地址必填 20260206 end
|
||||||
|
|
||||||
$insert['p_article_id'] = $data['p_article_id'];
|
$insert['p_article_id'] = $data['p_article_id'];
|
||||||
$insert['article_id'] = $p_info['article_id'];
|
$insert['article_id'] = $p_info['article_id'];
|
||||||
$insert['author_name'] = $article_info['journal_id'] == 21 ? trim($data['last_name']) . trim($data['first_name']) : trim($data['first_name']) . ' ' . trim($data['last_name']);
|
$insert['author_name'] = $article_info['journal_id'] == 21 ? trim($data['last_name']) . trim($data['first_name']) : trim($data['first_name']) . ' ' . trim($data['last_name']);
|
||||||
@@ -1822,6 +1848,10 @@ class Production extends Base
|
|||||||
$insert['is_report'] = $data['is_report'];
|
$insert['is_report'] = $data['is_report'];
|
||||||
$insert['email'] = isset($data['email']) ? trim($data['email']) : '';
|
$insert['email'] = isset($data['email']) ? trim($data['email']) : '';
|
||||||
|
|
||||||
|
//通信地址 20260206 start
|
||||||
|
$insert['mailing_address'] = isset($data['mailing_address']) ? trim($data['mailing_address']) : '';
|
||||||
|
//通信地址 20260206 end
|
||||||
|
|
||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
$pa_id = $this->production_article_author_obj->insertGetId($insert);
|
$pa_id = $this->production_article_author_obj->insertGetId($insert);
|
||||||
$or_res = true;
|
$or_res = true;
|
||||||
@@ -2637,6 +2667,9 @@ class Production extends Base
|
|||||||
$style['color'] = $this->colorMap['r'];
|
$style['color'] = $this->colorMap['r'];
|
||||||
break;
|
break;
|
||||||
// tr标签已被移除,无需处理
|
// tr标签已被移除,无需处理
|
||||||
|
case 'myh3':
|
||||||
|
$style['h3'] = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2678,6 +2711,10 @@ class Production extends Base
|
|||||||
$content = '$_{{'.$content.'}}$';
|
$content = '$_{{'.$content.'}}$';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 处理h3标签
|
||||||
|
if (isset($style['h3']) && $style['h3']) {
|
||||||
|
$content = "\\textbf{{$content}}";
|
||||||
|
}
|
||||||
return $content;
|
return $content;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3270,6 +3307,16 @@ class Production extends Base
|
|||||||
$article_info = $this->article_obj->where('article_id', $p_info['article_id'])->find();
|
$article_info = $this->article_obj->where('article_id', $p_info['article_id'])->find();
|
||||||
$journal_info = $this->journal_obj->where('journal_id', $article_info['journal_id'])->find();
|
$journal_info = $this->journal_obj->where('journal_id', $article_info['journal_id'])->find();
|
||||||
$user_info = $this->user_obj->where('user_id', $article_info['user_id'])->find();
|
$user_info = $this->user_obj->where('user_id', $article_info['user_id'])->find();
|
||||||
|
|
||||||
|
//查询文章是否有Accept记录 20260210 start
|
||||||
|
$article_info_id = empty($article_info['article_id']) ? 0 : $article_info['article_id'];
|
||||||
|
$aMsgWhere = ['article_id' => $article_info_id,'state_to' => 5];
|
||||||
|
$aArticleMsg = Db::name('article_msg')->field('msg_id')->where($aMsgWhere)->find();
|
||||||
|
if(empty($aArticleMsg)){
|
||||||
|
return jsonError("Please set the paper as Accept before asking the author to confirm");
|
||||||
|
}
|
||||||
|
//查询文章是否有Accept记录 20260210 end
|
||||||
|
|
||||||
$this->pdfAddProof($p_info['article_id']);
|
$this->pdfAddProof($p_info['article_id']);
|
||||||
if ($p_info['file_pdf'] == '') {
|
if ($p_info['file_pdf'] == '') {
|
||||||
return jsonError('To the editor: PROOF is the final form before the article goes online. The PROOF link step not be opened if you have not completed the previous steps.');
|
return jsonError('To the editor: PROOF is the final form before the article goes online. The PROOF link step not be opened if you have not completed the previous steps.');
|
||||||
@@ -3429,11 +3476,11 @@ class Production extends Base
|
|||||||
$tex_content .= "\\usepackage{textcomp} \n";
|
$tex_content .= "\\usepackage{textcomp} \n";
|
||||||
$tex_content .= "\\usepackage[english]{babel} \n";
|
$tex_content .= "\\usepackage[english]{babel} \n";
|
||||||
$tex_content .= "\\geometry{
|
$tex_content .= "\\geometry{
|
||||||
a4paper, % A4纸张
|
a4paper, % A4纸张
|
||||||
left=1.5cm, % 左页边距
|
left=1.5cm, % 左页边距
|
||||||
right=1.5cm, % 右页边距
|
right=1.5cm, % 右页边距
|
||||||
top=2cm, % 上页边距
|
top=2cm, % 上页边距
|
||||||
bottom=2cm, % 下页边距
|
bottom=2cm, % 下页边距
|
||||||
}";
|
}";
|
||||||
$tex_content .= "\\linespread{1.05}";
|
$tex_content .= "\\linespread{1.05}";
|
||||||
$tex_content .= "\\definecolor{tablegray}{RGB}{250,231,232}\n\n";
|
$tex_content .= "\\definecolor{tablegray}{RGB}{250,231,232}\n\n";
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class Supplementary extends Base
|
|||||||
public function getJournalBoard(){
|
public function getJournalBoard(){
|
||||||
|
|
||||||
|
|
||||||
//获取参数
|
//获取参数
|
||||||
$aParam = $this->request->post();
|
$aParam = $this->request->post();
|
||||||
|
|
||||||
//参数验证
|
//参数验证
|
||||||
@@ -38,17 +38,17 @@ class Supplementary extends Base
|
|||||||
$aWhere = ['state' => 0,'issn' => ['in',$sIssn]];
|
$aWhere = ['state' => 0,'issn' => ['in',$sIssn]];
|
||||||
$aJournal = Db::name('journal')->where($aWhere)->column('journal_id,issn');
|
$aJournal = Db::name('journal')->where($aWhere)->column('journal_id,issn');
|
||||||
if(empty($aJournal)){
|
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)]];
|
$aWhere = ['state' => 0,'journal_id' => ['in',array_keys($aJournal)]];
|
||||||
if(isset($aParam['type'])){//编辑类型
|
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();
|
$aJournalBoard = Db::name('board_to_journal')->field('journal_id,user_id')->where($aWhere)->select();
|
||||||
if(empty($aJournalBoard)){
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
$sRealName = empty($aUser[$value['user_id']]) ? '' : $aUser[$value['user_id']];
|
$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;
|
$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;
|
$iState = isset($aParam['state']) ? $aParam['state'] : -2;
|
||||||
//空的查询条件
|
//空的查询条件
|
||||||
$aWhere = [];
|
$aWhere = ['accept_sn' => ['not like','Draft%']];
|
||||||
//SN
|
//SN
|
||||||
$sAcceptSn = empty($aParam['accept_sn']) ? '': $aParam['accept_sn'];
|
$sAcceptSn = empty($aParam['accept_sn']) ? '': $aParam['accept_sn'];
|
||||||
if(!empty($sAcceptSn)){
|
if(!empty($sAcceptSn)){
|
||||||
@@ -181,6 +181,10 @@ class Workbench extends Base
|
|||||||
$aArticle[$key]['report'] = $aAuthorInfo;
|
$aArticle[$key]['report'] = $aAuthorInfo;
|
||||||
$aArticle[$key]['country'] = empty($aAuthorInfo) ? [] : array_unique(array_column($aAuthorInfo, 'country'));
|
$aArticle[$key]['country'] = empty($aAuthorInfo) ? [] : array_unique(array_column($aAuthorInfo, 'country'));
|
||||||
$aArticle[$key]['type_name'] = translateType($value['type']);
|
$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']];
|
// $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['realname'] = empty($aUser['realname']) ? '' : $aUser['realname'];
|
||||||
$aArticleReviewer['email'] = empty($aUser['email']) ? '' : $aUser['email'];
|
$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];
|
$aData = ['article' => $aArticle,'article_reviewer' => $aArticleReviewer];
|
||||||
@@ -641,13 +651,31 @@ class Workbench extends Base
|
|||||||
|
|
||||||
//查询审稿记录
|
//查询审稿记录
|
||||||
$aWhere = ['art_rev_id' => $iArtRevId];
|
$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)){
|
if(empty($aArticleReviewer)){
|
||||||
return json_encode(['status' => 4,'msg' => 'Review record does not exist']);
|
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']);
|
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']];
|
$aWhere = ['article_id' => $aArticleReviewer['article_id']];
|
||||||
@@ -685,7 +713,7 @@ class Workbench extends Base
|
|||||||
$aUser = array_column($aUser, null,'user_id');
|
$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]);
|
$result = Db::name('article_reviewer')->where($aWhere)->limit(1)->update(['is_reapply' => 1,'reapply_time' => time(),'reviewer_act' => 1]);
|
||||||
if($result === false){
|
if($result === false){
|
||||||
return json_encode(array('status' => 11,'msg' => 'Application to reopen link failed' ));
|
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];
|
$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)){
|
if(empty($aArticleReviewer)){
|
||||||
return json_encode(['status' => 4,'msg' => 'Review record does not exist']);
|
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']);
|
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']];
|
$aWhere = ['article_id' => $aArticleReviewer['article_id']];
|
||||||
$aArticle = Db::name('article')->field('article_id,abstrart,title,type,accept_sn,journal_id,state')->where($aWhere)->find();
|
$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];
|
$aWhere = ['art_rev_id' => $iArtRevId];
|
||||||
$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]);
|
$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){
|
if($result === false){
|
||||||
return json_encode(array('status' => 11,'msg' => 'Status update failed' ));
|
return json_encode(array('status' => 11,'msg' => 'Status update failed' ));
|
||||||
}
|
}
|
||||||
|
|
||||||
//查询审稿人的邮箱
|
//查询审稿人的邮箱
|
||||||
$aWhere = ['user_id' => $aArticleReviewer['reviewer_id'],'state' => 0,'email' => ['<>','']];
|
$aWhere = ['user_id' => $aArticleReviewer['reviewer_id'],'state' => 0,'email' => ['<>','']];
|
||||||
$aUser = Db::name('user')->field('user_id,email,realname,account')->where($aWhere)->find();
|
$aUser = Db::name('user')->field('user_id,email,realname,account')->where($aWhere)->find();
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ class LatexContent{
|
|||||||
\end{figure}' ;
|
\end{figure}' ;
|
||||||
//首页内容
|
//首页内容
|
||||||
private $sFirst = '\documentclass[
|
private $sFirst = '\documentclass[
|
||||||
|
articletype={{article_type}},
|
||||||
journal={{journal_abbr}},
|
journal={{journal_abbr}},
|
||||||
journalname={{{{journal_title}}}},
|
journalname={{{{journal_title}}}},
|
||||||
layout=largetwo,
|
layout=largetwo,
|
||||||
@@ -43,6 +44,7 @@ page={{stage_page}},%号
|
|||||||
\journalweb{{{website}}}
|
\journalweb{{{website}}}
|
||||||
|
|
||||||
\usepackage{amsmath}
|
\usepackage{amsmath}
|
||||||
|
\usepackage{balance}
|
||||||
\usepackage[nopatch]{microtype}
|
\usepackage[nopatch]{microtype}
|
||||||
\usepackage{booktabs}
|
\usepackage{booktabs}
|
||||||
\usepackage[backend=biber]{biblatex}
|
\usepackage[backend=biber]{biblatex}
|
||||||
@@ -55,22 +57,23 @@ page={{stage_page}},%号
|
|||||||
|
|
||||||
{{author_info}}
|
{{author_info}}
|
||||||
|
|
||||||
{{correspondence_info}}
|
\Correspondence{{{correspondence_info}}}
|
||||||
|
|
||||||
|
|
||||||
\keywords{keyword entry 1, keyword entry 2, keyword entry 3} %% First letter not capped
|
\keywords{keyword entry 1, keyword entry 2, keyword entry 3} %% First letter not capped
|
||||||
|
|
||||||
{{author_contribution}}
|
\authorcontributions{{{author_contribution}}}
|
||||||
\competinginterests{The authors declare no conflicts of interest.}
|
\competinginterests{The authors declare no conflicts of interest.}
|
||||||
{{article_acknowledgment}}
|
\Acknowledgments{{{article_acknowledgment}}}
|
||||||
\Peerreviewinformation{{{journal_title}} thanks all anonymous reviewers for their contribution to the peer review of this paper}
|
\Peerreviewinformation{\textit{{{journal_title}}} thanks all anonymous reviewers for their contribution to the peer review of this paper}
|
||||||
{{article_abbreviation}}
|
\Abbreviations{{{article_abbreviation}}}
|
||||||
{{article_cite}}
|
\Citation{{{article_cite}}}
|
||||||
\received{{{received_date}}}
|
\received{{{received_date}}}
|
||||||
\revised{{{revision_date}}}
|
\revised{{{revision_date}}}
|
||||||
\accepted{{{accepted_date}}}
|
\accepted{{{accepted_date}}}
|
||||||
\Availableonline{{{pub_date}}}
|
\Availableonline{{{pub_date}}}
|
||||||
{{executive_editor}}
|
\EditorialAdvisoryBoard{{{editorial_advisory_board}}}
|
||||||
|
\Executiveeditor{{{executive_editor}}}
|
||||||
{{abstract}}
|
{{abstract}}
|
||||||
{{keywords}}
|
{{keywords}}
|
||||||
|
|
||||||
@@ -83,6 +86,7 @@ page={{stage_page}},%号
|
|||||||
{{article_main}}
|
{{article_main}}
|
||||||
\nocite{*}
|
\nocite{*}
|
||||||
\printbibliography[title={References}]
|
\printbibliography[title={References}]
|
||||||
|
\balance
|
||||||
\end{document}';
|
\end{document}';
|
||||||
/**
|
/**
|
||||||
* 生成初稿-基本内容
|
* 生成初稿-基本内容
|
||||||
@@ -119,9 +123,9 @@ page={{stage_page}},%号
|
|||||||
//年
|
//年
|
||||||
$iYear = empty($aJournalStage['stage_year']) ? date('Y') : $aJournalStage['stage_year'];
|
$iYear = empty($aJournalStage['stage_year']) ? date('Y') : $aJournalStage['stage_year'];
|
||||||
//卷
|
//卷
|
||||||
$iVolume = empty($aJournalStage['stage_vol']) ? 0 : $aJournalStage['stage_vol'];
|
$iVolume = empty($aJournalStage['stage_vol']) ? '' : $aJournalStage['stage_vol'];
|
||||||
//期
|
//期
|
||||||
$iPeriod = empty($aJournalStage['stage_no']) ? 0 : $aJournalStage['stage_no'];
|
$iPeriod = empty($aJournalStage['stage_no']) ? '' : $aJournalStage['stage_no'];
|
||||||
//页
|
//页
|
||||||
$sPage = empty($aProductionArticle['npp']) ? '' : $aProductionArticle['npp'];
|
$sPage = empty($aProductionArticle['npp']) ? '' : $aProductionArticle['npp'];
|
||||||
|
|
||||||
@@ -139,7 +143,7 @@ page={{stage_page}},%号
|
|||||||
$aAuthoInfo = $this->dealAuthor(['p_article_id' => $aProductionArticle['p_article_id']]);
|
$aAuthoInfo = $this->dealAuthor(['p_article_id' => $aProductionArticle['p_article_id']]);
|
||||||
$aSearch['{{author_info}}'] = empty($aAuthoInfo['author']) ? '' : $aAuthoInfo['author'];
|
$aSearch['{{author_info}}'] = empty($aAuthoInfo['author']) ? '' : $aAuthoInfo['author'];
|
||||||
//通讯作者信息
|
//通讯作者信息
|
||||||
$aSearch['{{correspondence_info}}'] = empty($aAuthoInfo['correspondence']) ? '' : '\Correspondence{'.$aAuthoInfo['correspondence'].'}';
|
$aSearch['{{correspondence_info}}'] = empty($aAuthoInfo['correspondence']) ? '' : $aAuthoInfo['correspondence'];
|
||||||
|
|
||||||
//文章基本信息处理
|
//文章基本信息处理
|
||||||
//标题
|
//标题
|
||||||
@@ -157,34 +161,41 @@ page={{stage_page}},%号
|
|||||||
}
|
}
|
||||||
$aSearch['{{article_title}}'] = $sTitle;
|
$aSearch['{{article_title}}'] = $sTitle;
|
||||||
//author_contribution
|
//author_contribution
|
||||||
$aSearch['{{author_contribution}}'] = empty($aProductionArticle['author_contribution']) ? '' : '\authorcontributions{'.$this->dealContent($aProductionArticle['author_contribution']).'}';
|
$aSearch['{{author_contribution}}'] = empty($aProductionArticle['author_contribution']) ? '' : $this->dealContent($aProductionArticle['author_contribution']);
|
||||||
//acknowledgment
|
//acknowledgment
|
||||||
$aSearch['{{article_acknowledgment}}'] = empty($aProductionArticle['acknowledgment']) ? '' : '\Acknowledgments{'.$this->dealContent($aProductionArticle['acknowledgment']).'}';
|
$aSearch['{{article_acknowledgment}}'] = empty($aProductionArticle['acknowledgment']) ? '' : $this->dealContent($aProductionArticle['acknowledgment']);
|
||||||
//abbreviation
|
//abbreviation
|
||||||
$aSearch['{{article_abbreviation}}'] = empty($aProductionArticle['abbreviation']) ? '' : '\Abbreviations{'.$this->dealContent($aProductionArticle['abbreviation']).'}';
|
$aSearch['{{article_abbreviation}}'] = empty($aProductionArticle['abbreviation']) ? '' : $this->dealContent($aProductionArticle['abbreviation']);
|
||||||
|
|
||||||
//文章引用信息
|
//文章引用信息
|
||||||
$sCite = $this->getArticleCite($aProductionArticle,$aJournal,$aJournalStage);
|
$sCite = $this->getArticleCite($aProductionArticle,$aJournal,$aJournalStage);
|
||||||
$aSearch['{{article_cite}}'] = empty($sCite) ? '' : '\Citation{'.$sCite.'}';
|
$aSearch['{{article_cite}}'] = empty($sCite) ? '' : $sCite;
|
||||||
|
|
||||||
|
//文章类型
|
||||||
|
$aSearch['{{article_type}}'] = empty($aProductionArticle['type']) ? 'ARTICLE' : strtoupper($aProductionArticle['type']);
|
||||||
//获取文章时间
|
//获取文章时间
|
||||||
$aTime = $this->getArticleTime(['article_id' => $aProductionArticle['article_id']]);
|
$aTime = $this->getArticleTime(['article_id' => $aProductionArticle['article_id']]);
|
||||||
$aTime = empty($aTime['data']) ? [] : $aTime['data'];
|
$aTime = empty($aTime['data']) ? [] : $aTime['data'];
|
||||||
$aSearch['{{received_date}}'] = empty($aTime['received_date']) ? '' : $aTime['received_date'];
|
$aSearch['{{received_date}}'] = empty($aTime['received_date']) ? '' : $aTime['received_date'];
|
||||||
$aSearch['{{revision_date}}'] = empty($aTime['revision_date']) ? '' : $aTime['revision_date'];
|
$aSearch['{{revision_date}}'] = '';
|
||||||
|
if(in_array( $aSearch['{{article_type}}'], ['ARTICLE','REVIEW','MINI REVIEW'])){
|
||||||
|
$aSearch['{{revision_date}}'] = empty($aTime['revision_date']) ? '' : '\textbf{Revised:}'.$aTime['revision_date'].'; ';
|
||||||
|
}
|
||||||
|
|
||||||
$aSearch['{{accepted_date}}'] = empty($aTime['accepted_date']) ? '' : $aTime['accepted_date'];
|
$aSearch['{{accepted_date}}'] = empty($aTime['accepted_date']) ? '' : $aTime['accepted_date'];
|
||||||
$aSearch['{{pub_date}}'] = empty($aProductionArticle['pub_date']) ? '' : $aProductionArticle['pub_date'];
|
$aSearch['{{pub_date}}'] = empty($aProductionArticle['pub_date']) ? '' : $aProductionArticle['pub_date'];
|
||||||
|
//终审编委名字
|
||||||
|
$aSearch['{{editorial_advisory_board}}'] = empty($aTime['editorial_advisory_board']) ? '' : $aTime['editorial_advisory_board'];
|
||||||
//获取编辑信息
|
//获取编辑信息
|
||||||
$executive_editor = empty($aProductionArticle['executive_editor']) ? '' : '\Executiveeditor{'.$this->dealContent($aProductionArticle['executive_editor']).'}';
|
$executive_editor = empty($aProductionArticle['executive_editor']) ? '' : $this->dealContent($aProductionArticle['executive_editor']);
|
||||||
$executive_editor_realname = empty($aUser['realname']) ? '' : '\Executiveeditor{'.$this->dealContent($aUser['realname']).'}';
|
$executive_editor_realname = empty($aUser['realname']) ? '' : $this->dealContent($aUser['realname']);
|
||||||
$executive_editor = empty($executive_editor) ? $executive_editor_realname : $executive_editor;
|
$executive_editor = empty($executive_editor) ? $executive_editor_realname : $executive_editor;
|
||||||
$aSearch['{{executive_editor}}'] = $executive_editor;
|
$aSearch['{{executive_editor}}'] = $executive_editor;
|
||||||
|
|
||||||
//摘要替换
|
//摘要替换
|
||||||
$sAbstract = empty($aProductionArticle['abstract']) ? '' : $this->dealContent($aProductionArticle['abstract']);
|
$sAbstract = empty($aProductionArticle['abstract']) ? '' : $this->dealContent($aProductionArticle['abstract']);
|
||||||
if(!empty($sAbstract)){
|
if(!empty($sAbstract)){
|
||||||
$aRelace = ['Background:' => '\textcolor[HTML]{0070C0}{\textbf{Background:}}','Methods:' => '\textcolor[HTML]{0070C0}{\textbf{Methods:}}','Results:' => '\textcolor[HTML]{0070C0}{\textbf{Results:}}','Conclusion:' => '\textcolor[HTML]{0070C0}{\textbf{Conclusion:}}'];
|
$aRelace = ['Background:' => '\textcolor[HTML]{0070C0}{\textbf{Background:}}','Methods:' => '\\ \textcolor[HTML]{0070C0}{\textbf{Methods:}}','Results:' => '\\ \textcolor[HTML]{0070C0}{\textbf{Results:}}','Conclusion:' => '\\ \textcolor[HTML]{0070C0}{\textbf{Conclusion:}}'];
|
||||||
$sAbstract = str_replace(array_keys($aRelace), array_values($aRelace), $sAbstract);
|
$sAbstract = str_replace(array_keys($aRelace), array_values($aRelace), $sAbstract);
|
||||||
$sAbstract = '\tmrabstract{'.$sAbstract.'}';
|
$sAbstract = '\tmrabstract{'.$sAbstract.'}';
|
||||||
}
|
}
|
||||||
@@ -195,12 +206,13 @@ page={{stage_page}},%号
|
|||||||
|
|
||||||
//文章图片地址
|
//文章图片地址
|
||||||
$sIcon = empty($aProductionArticle['icon']) ? '' : $aProductionArticle['icon'];
|
$sIcon = empty($aProductionArticle['icon']) ? '' : $aProductionArticle['icon'];
|
||||||
|
$is_graphical_abstract = empty($aProductionArticle['is_graphical_abstract']) ? 3 : $aProductionArticle['is_graphical_abstract'];//是否显示图文摘要1是2否3未选择
|
||||||
if(!empty($sIcon)){
|
if(!empty($sIcon)){
|
||||||
$sIconUrl = ROOT_PATH.trim($this->sArticleIcon,'/').'/'.$sIcon;
|
$sIconUrl = ROOT_PATH.trim($this->sArticleIcon,'/').'/'.$sIcon;
|
||||||
if(file_exists($sIconUrl)){
|
if(file_exists($sIconUrl) && $is_graphical_abstract == 1){
|
||||||
$sIconUrl = str_replace(ROOT_PATH.'public/', '', $sIconUrl);
|
$sIconUrl = str_replace(ROOT_PATH.'public/', '', $sIconUrl);
|
||||||
$sIconUrl = '../../'.$sIconUrl;
|
$sIconUrl = '../../'.$sIconUrl;
|
||||||
$sIcon = '\KeywordImage{'.$sIconUrl.'}';
|
$sIcon = $sIconUrl;
|
||||||
}else{
|
}else{
|
||||||
$sIcon = '';
|
$sIcon = '';
|
||||||
}
|
}
|
||||||
@@ -214,7 +226,7 @@ page={{stage_page}},%号
|
|||||||
// $sIcon = '';
|
// $sIcon = '';
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
$aSearch['{{article_icon}}'] = $sIcon;
|
$aSearch['{{article_icon}}'] = '\KeywordImage{'.$sIcon.'}';
|
||||||
$aSearch['{{keywords}}'] = $sKeywords;
|
$aSearch['{{keywords}}'] = $sKeywords;
|
||||||
// $aSearch['{{CLSFILEURL}}'] = ROOT_PATH.'public/latex/cls';
|
// $aSearch['{{CLSFILEURL}}'] = ROOT_PATH.'public/latex/cls';
|
||||||
$aSearch['{{article_id}}'] = $aProductionArticle['article_id'];
|
$aSearch['{{article_id}}'] = $aProductionArticle['article_id'];
|
||||||
@@ -258,6 +270,7 @@ page={{stage_page}},%号
|
|||||||
//查询正文信息
|
//查询正文信息
|
||||||
$aWhere = ['article_id' => $aProductionArticle['article_id'],'state' => 0];
|
$aWhere = ['article_id' => $aProductionArticle['article_id'],'state' => 0];
|
||||||
$aArticleMain = Db::name('article_main')->field('am_id,article_id,type,content,ami_id,amt_id,is_h1,is_h2,is_h3,sort')->where($aWhere)->order('sort')->select();
|
$aArticleMain = Db::name('article_main')->field('am_id,article_id,type,content,ami_id,amt_id,is_h1,is_h2,is_h3,sort')->where($aWhere)->order('sort')->select();
|
||||||
|
|
||||||
if(!empty($aArticleMain)){
|
if(!empty($aArticleMain)){
|
||||||
|
|
||||||
//查询图片
|
//查询图片
|
||||||
@@ -308,7 +321,13 @@ page={{stage_page}},%号
|
|||||||
}
|
}
|
||||||
if($value['is_h1'] == 0 && $value['is_h2'] == 0 && $value['is_h3'] == 0){
|
if($value['is_h1'] == 0 && $value['is_h2'] == 0 && $value['is_h3'] == 0){
|
||||||
if($value['type'] == 0 ){
|
if($value['type'] == 0 ){
|
||||||
$sMain .= $this->dealContent($value['content'],$aReferences)."\\par\n";
|
//处理内容
|
||||||
|
$sMainContent = $this->dealContent($value['content'],$aReferences);
|
||||||
|
// //替换myh3标签
|
||||||
|
// $contentpattern = '/<myh3>(.*?)<\/myh3>/is';
|
||||||
|
// $contentreplacement = '\\subsubsection{$1}';
|
||||||
|
// $sMainContent = preg_replace($contentpattern, $contentreplacement, $sMainContent);
|
||||||
|
$sMain .= $sMainContent."\\par\n";
|
||||||
}
|
}
|
||||||
if($value['type'] == 1 ){//图片
|
if($value['type'] == 1 ){//图片
|
||||||
$aImageInfo = empty($aArticleMainImage[$value['ami_id']]) ? [] : $aArticleMainImage[$value['ami_id']];
|
$aImageInfo = empty($aArticleMainImage[$value['ami_id']]) ? [] : $aArticleMainImage[$value['ami_id']];
|
||||||
@@ -355,7 +374,6 @@ page={{stage_page}},%号
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$aSearch['{{article_main}}'] = empty($sMain) ? '' : $sMain."\n";
|
$aSearch['{{article_main}}'] = empty($sMain) ? '' : $sMain."\n";
|
||||||
//模版内容替换
|
//模版内容替换
|
||||||
$sTemplateInfo = str_replace(array_keys($aSearch), array_values($aSearch), $sTemplateInfo);
|
$sTemplateInfo = str_replace(array_keys($aSearch), array_values($aSearch), $sTemplateInfo);
|
||||||
@@ -384,7 +402,7 @@ page={{stage_page}},%号
|
|||||||
}
|
}
|
||||||
//查询作者机构
|
//查询作者机构
|
||||||
$aWhere['p_article_author_id'] = ['in',array_column($aAuthor, 'p_article_author_id')];
|
$aWhere['p_article_author_id'] = ['in',array_column($aAuthor, 'p_article_author_id')];
|
||||||
$aAuthorOrgan = Db::name('production_article_author_to_organ')->field('p_article_author_id,p_article_organ_id')->where($aWhere)->select();
|
$aAuthorOrgan = Db::name('production_article_author_to_organ')->field('p_article_author_id,p_article_organ_id')->where($aWhere)->order('p_article_author_id asc,p_article_organ_id asc')->select();
|
||||||
//查询机构信息
|
//查询机构信息
|
||||||
$aAuthorOrganList = [];
|
$aAuthorOrganList = [];
|
||||||
if(!empty($aAuthorOrgan)){
|
if(!empty($aAuthorOrgan)){
|
||||||
@@ -403,9 +421,10 @@ page={{stage_page}},%号
|
|||||||
}
|
}
|
||||||
//处理作者
|
//处理作者
|
||||||
$sAuthor = $sCorrespondence = '';
|
$sAuthor = $sCorrespondence = '';
|
||||||
|
$iFirstNum = 0;
|
||||||
foreach ($aAuthor as $key => $value) {
|
foreach ($aAuthor as $key => $value) {
|
||||||
//作者姓名
|
//作者姓名
|
||||||
$sName = empty($value['fifirst_name']) ? '' : $value['fifirst_name'];
|
$sName = empty($value['first_name']) ? '' : $value['first_name'];
|
||||||
$sName = empty($sName) ? '' : $sName . ' ' .$value['last_name'];
|
$sName = empty($sName) ? '' : $sName . ' ' .$value['last_name'];
|
||||||
if(empty($sName)){
|
if(empty($sName)){
|
||||||
$sName = empty($value['author_name']) ? '' : $value['author_name'];
|
$sName = empty($value['author_name']) ? '' : $value['author_name'];
|
||||||
@@ -436,21 +455,32 @@ page={{stage_page}},%号
|
|||||||
}
|
}
|
||||||
if($value['is_first'] == 1){
|
if($value['is_first'] == 1){
|
||||||
$sAuthor .= '\firstauthor'."\n";
|
$sAuthor .= '\firstauthor'."\n";
|
||||||
|
$iFirstNum++;
|
||||||
}
|
}
|
||||||
if(!empty($value['orcid'])){
|
if(!empty($value['orcid'])){
|
||||||
$sAuthor .= '\orcid{'.$this->dealContent($value['orcid']).'}'."\n";
|
$sAuthor .= '\orcid{'.$this->dealContent($value['orcid']).'}'."\n";
|
||||||
}
|
}
|
||||||
if($value['is_report'] == 1){
|
if($value['is_report'] == 1){
|
||||||
$sCorrespondence .= $sName;
|
$sCorrespondenceInfo = $sName;
|
||||||
if(!empty($aOrganList[0])){
|
// if(!empty($aOrganList[0])){
|
||||||
$sCorrespondence .= ','.trim($this->dealContent($aOrganList[0]),'.');
|
// $sCorrespondence .= ','.trim($this->dealContent($aOrganList[0]),'.');
|
||||||
|
// }
|
||||||
|
if(!empty($value['mailing_address'])){//通讯地址
|
||||||
|
$value['mailing_address'] = trim($value['mailing_address']);
|
||||||
|
$sCorrespondenceInfo .= ','.trim($this->dealContent($value['mailing_address']),'.');
|
||||||
}
|
}
|
||||||
if(!empty($value['email'])){
|
if(!empty($value['email'])){
|
||||||
$sCorrespondence .= '.E-mail: '.trim($this->dealContent($value['email']),'.').'.';
|
$sCorrespondenceInfo .= '. E-mail:'.trim($this->dealContent($value['email']),'.').'.';
|
||||||
|
}else{
|
||||||
|
$sCorrespondenceInfo .= trim($sCorrespondenceInfo,'.').'.';
|
||||||
}
|
}
|
||||||
|
$sCorrespondence .= $sCorrespondenceInfo .' ';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ['author' => $sAuthor,'correspondence' => $sCorrespondence];
|
if($iFirstNum == 1 && !empty($sAuthor)){
|
||||||
|
$sAuthor = str_replace('\firstauthor'."\n", '', $sAuthor);
|
||||||
|
}
|
||||||
|
return ['author' => $sAuthor,'correspondence' => trim($sCorrespondence)];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -478,28 +508,29 @@ page={{stage_page}},%号
|
|||||||
$jabbr = empty($aJournal['jabbr']) ? '' : $aJournal['jabbr'];
|
$jabbr = empty($aJournal['jabbr']) ? '' : $aJournal['jabbr'];
|
||||||
$stage_year = empty($aJournalStage['stage_year']) ? '' : $aJournalStage['stage_year'];
|
$stage_year = empty($aJournalStage['stage_year']) ? '' : $aJournalStage['stage_year'];
|
||||||
$stage_vol = empty($aJournalStage['stage_vol']) ? '' : $aJournalStage['stage_vol'];
|
$stage_vol = empty($aJournalStage['stage_vol']) ? '' : $aJournalStage['stage_vol'];
|
||||||
|
$sAbbr = empty($aArticle['abbr']) ? '' : trim(trim($aArticle['abbr'],'.'));
|
||||||
$aAbbr = empty($aArticle['abbr']) ? '' : explode(',', trim($aArticle['abbr']));
|
// $aAbbr = empty( $sAbbr ) ? [] : explode(',', trim( $sAbbr ));
|
||||||
if(!empty($aAbbr)){
|
// if(!empty($aAbbr)){
|
||||||
$sEnd = end($aAbbr);
|
// $sEnd = end($aAbbr);
|
||||||
if($sEnd != 'et al'){
|
// if($sEnd != 'et al'){
|
||||||
$aArticle['abbr'] = implode(',', array_slice($aAbbr, 0,3));
|
// $aThree = array_slice($aAbbr, 0,3);
|
||||||
if(!empty($aArticle['abbr'])){
|
// $sAbbr = implode(',', $aThree);
|
||||||
$aArticle['abbr'] .= ', et al';
|
// if(!empty( $sAbbr ) && count($aThree) > 3){
|
||||||
}
|
// $sAbbr .= ', et al';
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
$sCite = '';
|
$sCite = '';
|
||||||
if ($aArticle['journal_id'] == 22) {
|
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'];
|
$sCite = $sAbbr . '. ' . $aArticle['title'] . '[J]. ' . choiseJabbr($aArticle['article_id'],$jabbr) . ',' . $stage_year . ',' . $stage_vol . $no . $aArticle['npp'] . '. doi:' . $aArticle['doi'];
|
||||||
$sCite = $this->dealContent($sCite);
|
$sCite = $this->dealContent($sCite);
|
||||||
} else {
|
} else {
|
||||||
$sCite = $this->dealContent($aArticle['abbr']) . '. ' . $this->dealContent($aArticle['title']) . '. \textit{' . $this->dealContent(choiseJabbr($aArticle['article_id'], $jabbr)) . '}. ' . $stage_year . ';' . $stage_vol . $no . $aArticle['npp'] . '. doi:' . $aArticle['doi'];
|
$sCite = $this->dealContent($sAbbr) . '. ' . $this->dealContent($aArticle['title']) . '. \textit{' . $this->dealContent(choiseJabbr($aArticle['article_id'], $jabbr)) . '}. ' . $stage_year . ';' . $stage_vol . $no . $aArticle['npp'] . '. doi:' . $aArticle['doi'];
|
||||||
}
|
}
|
||||||
return $sCite;
|
return $sCite;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getArticleTime($aParam = []){
|
public function getArticleTime($aParam = []){
|
||||||
//必填值验证
|
//必填值验证
|
||||||
$iArticleId = empty($aParam['article_id']) ? '' : $aParam['article_id'];
|
$iArticleId = empty($aParam['article_id']) ? '' : $aParam['article_id'];
|
||||||
if(empty($iArticleId)){
|
if(empty($iArticleId)){
|
||||||
@@ -511,6 +542,15 @@ page={{stage_page}},%号
|
|||||||
if(empty($aArticle)){
|
if(empty($aArticle)){
|
||||||
return array('status' => 2,'msg' => 'The article does not exist' );
|
return array('status' => 2,'msg' => 'The article does not exist' );
|
||||||
}
|
}
|
||||||
|
//查询终审-审稿记录
|
||||||
|
$aWhere = ['article_id' => $iArticleId,'state' => ['in',[1,2,3]]];
|
||||||
|
$aFinalReviewerId = Db::name('article_reviewer_final')->order('review_time desc')->where($aWhere)->column('reviewer_id');
|
||||||
|
//查询审稿人姓名
|
||||||
|
$aUserName = [];
|
||||||
|
if(!empty($aFinalReviewerId)){
|
||||||
|
$aWhere = ['user_id' => ['in',array_unique($aFinalReviewerId)],'state' => 0,'realname' => ['<>','']];
|
||||||
|
$aUserName = Db::name('user')->where($aWhere)->column('realname');
|
||||||
|
}
|
||||||
//获取文章记录
|
//获取文章记录
|
||||||
$aWhere = ['article_id' => $iArticleId,'state' => 0,'state_to' => ['in',[0,1,5]]];
|
$aWhere = ['article_id' => $iArticleId,'state' => 0,'state_to' => ['in',[0,1,5]]];
|
||||||
$aArticleMsg = Db::name('article_msg')->field('state_from,state_to,ctime')->where($aWhere)->order('ctime deac')->select();
|
$aArticleMsg = Db::name('article_msg')->field('state_from,state_to,ctime')->where($aWhere)->order('ctime deac')->select();
|
||||||
@@ -534,6 +574,7 @@ page={{stage_page}},%号
|
|||||||
$aTime['received_date'] = empty($iReceivedTime) ? '' : $this->timestampToEnglishDate($iReceivedTime);
|
$aTime['received_date'] = empty($iReceivedTime) ? '' : $this->timestampToEnglishDate($iReceivedTime);
|
||||||
$aTime['revision_date'] = empty($iRevisionTime) ? '' : $this->timestampToEnglishDate($iRevisionTime);
|
$aTime['revision_date'] = empty($iRevisionTime) ? '' : $this->timestampToEnglishDate($iRevisionTime);
|
||||||
$aTime['accepted_date'] = empty($iAcceptedTime) ? '' : $this->timestampToEnglishDate($iAcceptedTime);
|
$aTime['accepted_date'] = empty($iAcceptedTime) ? '' : $this->timestampToEnglishDate($iAcceptedTime);
|
||||||
|
$aTime['editorial_advisory_board'] = empty($aUserName) ? '' : implode(',', $aUserName);
|
||||||
return ['status' => 1,'msg' => 'success','data' => $aTime];
|
return ['status' => 1,'msg' => 'success','data' => $aTime];
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user