This commit is contained in:
wangjinlei
2022-11-08 18:23:20 +08:00
parent 45532ef702
commit 4d176060f4
7 changed files with 102 additions and 9 deletions

View File

@@ -180,6 +180,7 @@ class Article extends Controller {
* @param name:state type:int require:1 desc:状态 * @param name:state type:int require:1 desc:状态
* @param name:act type:int require:1 desc:1进行中2已完成 * @param name:act type:int require:1 desc:1进行中2已完成
* @param name:sn type:string require:0 desc:流水号 * @param name:sn type:string require:0 desc:流水号
* @param name:special_num type:int require:1 desc:客座num
* @param name:pageIndex type:int require:1 desc:当前页码 * @param name:pageIndex type:int require:1 desc:当前页码
* @param name:pageSize type:int require:1 desc:每个页面的数据条数 * @param name:pageSize type:int require:1 desc:每个页面的数据条数
* *
@@ -213,7 +214,9 @@ class Article extends Controller {
if ($data['name'] != '') { if ($data['name'] != '') {
$where['t_article.title'] = array('like', "%" . $data['name'] . "%"); $where['t_article.title'] = array('like', "%" . $data['name'] . "%");
} }
if($data['special_num']!=0){
$where['t_article.special_num'] = $data['special_num'];
}
//分页查询数据 //分页查询数据
$limit_start = ($data['pageIndex'] - 1) * $data['pageSize']; $limit_start = ($data['pageIndex'] - 1) * $data['pageSize'];
$res = $this->article_obj $res = $this->article_obj

View File

@@ -161,6 +161,11 @@ class Auto extends Controller {
return $url; return $url;
} }
public function pushEmailForAuthor1(){
}
/** /**
* 推送邮件提醒作者修回稿件 * 推送邮件提醒作者修回稿件
*/ */

View File

@@ -269,7 +269,9 @@ class Chief extends Controller {
->join('t_journal','t_journal.journal_id = t_article.journal_id','left') ->join('t_journal','t_journal.journal_id = t_article.journal_id','left')
->where('t_article.journal_id',$data['journal_id']) ->where('t_article.journal_id',$data['journal_id'])
->where('t_article.state',5) ->where('t_article.state',5)
->limit($limit_start,$data['pageSize'])->select(); ->order('t_article.article_id desc')
->limit($limit_start,$data['pageSize'])
->select();
foreach ($list as $k => $v){ foreach ($list as $k => $v){
$auts = $this->article_author_obj->where('article_id',$v['article_id'])->where('state',0)->select(); $auts = $this->article_author_obj->where('article_id',$v['article_id'])->where('state',0)->select();
$au = ''; $au = '';

View File

@@ -828,6 +828,32 @@ class Production extends Controller
return jsonSuccess([]); return jsonSuccess([]);
} }
/**
* 合并到上个文献中
*/
public function referHB(){
$data = $this->request->post();
$rule = new Validate([
'p_refer_id' => 'require'
]);
if (!$rule->check($data)) {
return jsonError($rule->getError());
}
$refer_info = $this->production_article_refer_obj->where('p_refer_id',$data['p_refer_id'])->find();
$refer_rev_res = $this->production_article_refer_obj
->where('p_article_id',$refer_info['p_article_id'])
->where('state',0)
->where('p_refer_id','<',$refer_info['p_refer_id'])
->order('p_refer_id desc')
->limit(1)->select();
$refer_rev_info = $refer_rev_res[0];
$updata['refer_frag'] = $refer_rev_info['refer_frag'].$refer_info['refer_frag'];
$updata['cs'] = 0;
$this->production_article_refer_obj->where('p_refer_id',$refer_rev_info['p_refer_id'])->update($updata);
$this->production_article_refer_obj->where('p_refer_id',$refer_info['p_refer_id'])->update(['state'=>1]);
return jsonSuccess([]);
}
/** /**
* 参考文献识别doi * 参考文献识别doi
*/ */

View File

@@ -181,6 +181,52 @@ class Special extends Controller
return jsonSuccess($re); return jsonSuccess($re);
} }
/**
* 获取客座
*/
public function getSpecial(){
$data = $this->request->post();
$rule = new Validate([
'journal_id' => 'require'
]);
if (!$rule->check($data)) {
return jsonError($rule->getError());
}
$journal_info = $this->journal_obj->where('journal_id',$data['journal_id'])->find();
$base_url = Env::get('journal.base_url');
$res = object_to_array(json_decode(myPost($base_url . "/master/Special/getSpecialByIssn", ['journal_issn' => $journal_info['issn']])));
$specials = $res['data']['specials'];
foreach ($specials as $k => $v) {
unset($specials[$k]['journal_id']);
}
$re['specials'] = $specials;
return jsonSuccess($re);
}
/**
* 更改文章客座
*/
public function editArticleSpecial(){
$data = $this->request->post();
$rule = new Validate([
'article_id' => 'require',
'special_num' => 'require',
'special_title' =>'require'
]);
if (!$rule->check($data)) {
return jsonError($rule->getError());
}
$article_info = $this->article_obj->where('article_id',$data['article_id'])->find();
if($article_info['special_num']>0){
return jsonError('Failed! The attached special issue exists.');
}
$updata['special_num'] = $data['special_num'];
$updata['special_title'] = $data['special_title'];
$this->article_obj->where('article_id',$data['article_id'])->update($updata);
return jsonSuccess([]);
}
/** /**
* 获取客座审稿人文章列表 * 获取客座审稿人文章列表
*/ */
@@ -318,7 +364,7 @@ class Special extends Controller
$tt .= 'If you need more time to revise, you can send E-mial to tell us.<br>'; $tt .= 'If you need more time to revise, you can send E-mial to tell us.<br>';
$tt .= 'Sincerely,<br>Editorial Office<br>'; $tt .= 'Sincerely,<br>Editorial Office<br>';
} else if ($data['state'] == 6) { //终审 } else if ($data['state'] == 6) { //终审
$tt = 'Dear Dr. ' . ($user_info['realname'] == '' ? $user_info['account'] : $user_info['realname']) . '<br>'; $tt = 'Dear Dr. ' . ($user_info['realname'] == '' ? $user_info['account'] : $user_info['realname']) . ',<br>';
$tt .= 'Manuscript status: Your manuscript "' . $article_info['title'] . '" is under reviewing by editorial member team of ' . $journal_info['title'] . '.'; $tt .= 'Manuscript status: Your manuscript "' . $article_info['title'] . '" is under reviewing by editorial member team of ' . $journal_info['title'] . '.';
} else { } else {
$tt = '"' . $article_info['title'] . '"<br>'; $tt = '"' . $article_info['title'] . '"<br>';

View File

@@ -766,10 +766,20 @@ class User extends Controller
$this->user_act_obj->where($act_where)->update(['state' => 1]); $this->user_act_obj->where($act_where)->update(['state' => 1]);
return json(['code' => 0]); return json(['code' => 0]);
} else { } else {
return json(['code' => 1, 'msg' => '失败!']); return json(['code' => 1, 'msg' => 'fail']);
} }
} }
public function getUserForJournal(){
$data = $this->request->post();
$num = $data['num'];
$limit_start = ($num - 1) * 1000;
$list = $this->user_obj->limit($limit_start,1000)->select();
$re['list'] = $list;
return jsonSuccess($re);
}
/** /**
* 修改用户备注 * 修改用户备注
*/ */
@@ -805,13 +815,13 @@ class User extends Controller
$data = $this->request->post(); $data = $this->request->post();
//验证验证码 //验证验证码
if (!$this->my_checkcaptcha($data['code'], $data['random_num'])) { if (!$this->my_checkcaptcha($data['code'], $data['random_num'])) {
return json(['code' => 1, 'msg' => '验证码错误']); return json(['code' => 1, 'msg' => 'Wrong captcha']);
} }
$res = $this->user_obj $res = $this->user_obj
->where('account|email', $data['username']) ->where('account|email', $data['username'])
->find(); ->find();
if ($res == null) { if ($res == null) {
return json(['code' => 1, 'msg' => '查无此人']); return json(['code' => 1, 'msg' => 'Incorrect user ID or password']);
} else { } else {
return json(['code' => 0, 'email' => $res['email']]); return json(['code' => 0, 'email' => $res['email']]);
} }
@@ -854,9 +864,9 @@ class User extends Controller
$where['state'] = 0; $where['state'] = 0;
$res = $this->user_act_obj->where($where)->find(); $res = $this->user_act_obj->where($where)->find();
if ($res == null) { if ($res == null) {
return json(['code' => 1, 'msg' => '查询失败']); return json(['code' => 1, 'msg' => 'Query failed']);
} else { } else {
return json(['code' => 0, 'msg' => '查询成功']); return json(['code' => 0, 'msg' => 'Query was successful']);
} }
} }

View File

@@ -298,7 +298,8 @@ function my_doiToFrag1($data){
$f = $data['refer_content']; $f = $data['refer_content'];
}else{ }else{
$c_frag = rtrim($frag,'.'); $c_frag = rtrim($frag,'.');
$f = substr_replace($c_frag,PHP_EOL,strripos($c_frag,"http"),0); // $f = substr_replace($c_frag,PHP_EOL,strripos($c_frag,"http"),0);
$f = $c_frag." Available at: ".PHP_EOL."http://doi.org/".$data['refer_doi'];
$cs = 1; $cs = 1;
} }
$p_refer_obj->where('p_refer_id',$data['p_refer_id'])->update(['refer_frag'=>$f,"cs"=>$cs]); $p_refer_obj->where('p_refer_id',$data['p_refer_id'])->update(['refer_frag'=>$f,"cs"=>$cs]);