20201112
This commit is contained in:
@@ -26,6 +26,7 @@ class Admin extends Controller {
|
|||||||
protected $user_reviewer_info_obj = '';
|
protected $user_reviewer_info_obj = '';
|
||||||
protected $user_reviewer_obj = '';
|
protected $user_reviewer_obj = '';
|
||||||
protected $user_msg_obj = '';
|
protected $user_msg_obj = '';
|
||||||
|
protected $article_reviewer_obj = '';
|
||||||
|
|
||||||
public function __construct(\think\Request $request = null) {
|
public function __construct(\think\Request $request = null) {
|
||||||
parent::__construct($request);
|
parent::__construct($request);
|
||||||
@@ -43,6 +44,7 @@ class Admin extends Controller {
|
|||||||
$this->article_msg_obj = Db::name('article_msg');
|
$this->article_msg_obj = Db::name('article_msg');
|
||||||
$this->article_author_obj = Db::name('article_author');
|
$this->article_author_obj = Db::name('article_author');
|
||||||
$this->country_obj = Db::name('country');
|
$this->country_obj = Db::name('country');
|
||||||
|
$this->article_reviewer_obj = Db::name('article_reviewer');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -50,6 +52,48 @@ class Admin extends Controller {
|
|||||||
$data = $this->request->post();
|
$data = $this->request->post();
|
||||||
return jsonSuccess(['mycode'=>md5($data['mmm'])]);
|
return jsonSuccess(['mycode'=>md5($data['mmm'])]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// public function retest(){
|
||||||
|
// $frag = [];
|
||||||
|
// $emails = $this->user_obj->where("state",0)->group("email")->having("count(*)>1")->column("email");
|
||||||
|
// $list = $this->user_obj->where("email","in",$emails)->select();
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// foreach ($list as $v){
|
||||||
|
// $frag[$v['email']][] = $v;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// foreach ($frag as $val){
|
||||||
|
// $this->aaaaa($val);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// foreach ($list as $v){
|
||||||
|
// $c1 = $this->article_obj->where('user_id',$v['user_id'])->find();
|
||||||
|
// $c2 = $this->reviewer_to_journal_obj->where('reviewer_id',$v['user_id'])->where('state',0)->find();
|
||||||
|
// if($c1==null&&$c2==null){
|
||||||
|
// $frag[] = $v;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// foreach ($frag as $val){
|
||||||
|
// $this->user_obj->where('user_id',$val['user_id'])->delete();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// private function aaaaa($arr){
|
||||||
|
// $a = $arr[0];
|
||||||
|
// $b = $arr[1];
|
||||||
|
// $this->article_obj->where('user_id',$b['user_id'])->update(['user_id'=>$a['user_id']]);
|
||||||
|
// $this->article_reviewer_obj->where('reviewer_id',$b['user_id'])->update(['reviewer_id'=>$a['user_id']]);
|
||||||
|
// $this->reviewer_to_journal_obj->where("reviewer_id",$b['user_id'])->update(['reviewer_id'=>$a['user_id'],'account'=>$a['account']]);
|
||||||
|
// $this->user_reviewer_info_obj->where('reviewer_id',$b['user_id'])->delete();
|
||||||
|
// $this->user_obj->where('user_id',$b['user_id'])->delete();
|
||||||
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取编辑人员列表(分页)
|
* 获取编辑人员列表(分页)
|
||||||
@@ -350,6 +394,8 @@ class Admin extends Controller {
|
|||||||
* 导入reviewer
|
* 导入reviewer
|
||||||
*/
|
*/
|
||||||
public function reviewerImport() {
|
public function reviewerImport() {
|
||||||
|
|
||||||
|
die("server stoped");
|
||||||
//接收信息
|
//接收信息
|
||||||
$data = $this->request->post();
|
$data = $this->request->post();
|
||||||
|
|
||||||
|
|||||||
@@ -462,7 +462,7 @@ class Article extends Controller {
|
|||||||
$user_rev_info = $this->user_reviewer_info_obj->where("reviewer_id",$user_info['user_id'])->find();
|
$user_rev_info = $this->user_reviewer_info_obj->where("reviewer_id",$user_info['user_id'])->find();
|
||||||
|
|
||||||
|
|
||||||
if($data['state']==3 && count($transfer_list)>0){//拒绝转投
|
if($data['state']==3 && count($transfer_list)>0){
|
||||||
//查询转投期刊信息
|
//查询转投期刊信息
|
||||||
$transfer_journal = $this->journal_obj->where('journal_id',$transfer_list[0]['journal_id'])->find();
|
$transfer_journal = $this->journal_obj->where('journal_id',$transfer_list[0]['journal_id'])->find();
|
||||||
//转投
|
//转投
|
||||||
|
|||||||
@@ -706,7 +706,7 @@ class Chief extends Controller {
|
|||||||
$article_info = $this->article_obj->where('article_id',$data['article_id'])->find();
|
$article_info = $this->article_obj->where('article_id',$data['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();
|
||||||
$board_info = $this->user_obj->where('user_id',$data['board_id'])->find();
|
$board_info = $this->user_obj->where('user_id',$data['board_id'])->find();
|
||||||
$board_rev_info = $this->user_reviewer_info_obj->where("reviewer_id",$board_info['user_id'])->find();
|
// $board_rev_info = $this->user_reviewer_info_obj->where("reviewer_id",$board_info['user_id'])->find();
|
||||||
$check = $this->article_to_board_obj->where('article_id',$data['article_id'])->where('board_id',$data['board_id'])->find();
|
$check = $this->article_to_board_obj->where('article_id',$data['article_id'])->where('board_id',$data['board_id'])->find();
|
||||||
if($check!=null){
|
if($check!=null){
|
||||||
return jsonError('Applied!');
|
return jsonError('Applied!');
|
||||||
|
|||||||
@@ -829,6 +829,10 @@ class Reviewer extends Controller {
|
|||||||
$re['icon'] = 'reviewerZS' . DS . $data['art_rev_id'] . '.jpg';
|
$re['icon'] = 'reviewerZS' . DS . $data['art_rev_id'] . '.jpg';
|
||||||
return jsonSuccess($re);
|
return jsonSuccess($re);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建证书方法
|
* 创建证书方法
|
||||||
@@ -850,7 +854,7 @@ class Reviewer extends Controller {
|
|||||||
->text('awarded ' . date('d, F, Y', $article_info['rtime'] == 0 ? $article_info['ctime'] : $article_info['rtime']) . ' to', $ziti, 60, '#000000', [1600, 1500])
|
->text('awarded ' . date('d, F, Y', $article_info['rtime'] == 0 ? $article_info['ctime'] : $article_info['rtime']) . ' to', $ziti, 60, '#000000', [1600, 1500])
|
||||||
->text('In recognitioin of the review made for the journal', $ziti, 80, '#000000', [900, 1900])
|
->text('In recognitioin of the review made for the journal', $ziti, 80, '#000000', [900, 1900])
|
||||||
->text('The Editors of', $ziti, 65, '#000000', [230, 2345])
|
->text('The Editors of', $ziti, 65, '#000000', [230, 2345])
|
||||||
->text($journal_info['title'], $ziti, 60, '#000000', [910, 2345])
|
->text($journal_info['title'], $ziti, 60, '#000000', [830, 2345])
|
||||||
->text('Cockle Bay Rd, Auckland, New Zealand, 2014', $ziti, 60, '#000000', [230, 2500])
|
->text('Cockle Bay Rd, Auckland, New Zealand, 2014', $ziti, 60, '#000000', [230, 2500])
|
||||||
->save(ROOT_PATH . 'public' . DS . 'reviewerZS' . DS . $art_rev_id . '.jpg');
|
->save(ROOT_PATH . 'public' . DS . 'reviewerZS' . DS . $art_rev_id . '.jpg');
|
||||||
}
|
}
|
||||||
@@ -1264,7 +1268,7 @@ class Reviewer extends Controller {
|
|||||||
$info_insert['cmajor'] = $data['cmajor'];
|
$info_insert['cmajor'] = $data['cmajor'];
|
||||||
$info_insert['field'] = trim($data['field']);
|
$info_insert['field'] = trim($data['field']);
|
||||||
$info_insert['qualifications'] = trim($data['cv']);
|
$info_insert['qualifications'] = trim($data['cv']);
|
||||||
if ($reviewer_info != null) {
|
if ($reviewer_info == null) {
|
||||||
$this->user_reviewer_info_obj->insertGetId($info_insert);
|
$this->user_reviewer_info_obj->insertGetId($info_insert);
|
||||||
} else {
|
} else {
|
||||||
$this->user_reviewer_info_obj->where('reviewer_info_id', $reviewer_info['reviewer_info_id'])->update($info_insert);
|
$this->user_reviewer_info_obj->where('reviewer_info_id', $reviewer_info['reviewer_info_id'])->update($info_insert);
|
||||||
|
|||||||
@@ -48,12 +48,6 @@ class Special extends Controller {
|
|||||||
public function register() {
|
public function register() {
|
||||||
$data = $this->request->post();
|
$data = $this->request->post();
|
||||||
|
|
||||||
// $data['username'] = '123';
|
|
||||||
// $data['password'] = '123123';
|
|
||||||
// $data['realname'] = '123';
|
|
||||||
// $data['phone'] = '12312312312';
|
|
||||||
// $data['email'] = '123@123.com';
|
|
||||||
//
|
|
||||||
//检测是否用户名和密码已经占用
|
//检测是否用户名和密码已经占用
|
||||||
$account = $data['username'];
|
$account = $data['username'];
|
||||||
$email = $data['email'];
|
$email = $data['email'];
|
||||||
|
|||||||
@@ -662,6 +662,12 @@ class User extends Controller {
|
|||||||
return jsonError("user no find!");
|
return jsonError("user no find!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$check = $this->reviewer_to_journal_obj->where("journal_id",$journal_info['journal_id'])->where('reviewer_id',$user_info['user_id'])->where('state',0)->find();
|
||||||
|
|
||||||
|
if($check){
|
||||||
|
return jsonError("has reviewer");
|
||||||
|
}
|
||||||
|
|
||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
|
|
||||||
$insert_info['reviewer_id'] = $user_info['user_id'];
|
$insert_info['reviewer_id'] = $user_info['user_id'];
|
||||||
@@ -711,14 +717,14 @@ class User extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过审核人
|
* 通过审稿人
|
||||||
*/
|
*/
|
||||||
public function reviewerAdopt() {
|
public function reviewerAdopt() {
|
||||||
$reviewerId = $this->request->post('reviewerApplyId');
|
$reviewerId = $this->request->post('reviewerApplyId');
|
||||||
$where['reviewer_apply_id'] = $reviewerId;
|
$where['reviewer_apply_id'] = $reviewerId;
|
||||||
$apply_info = $this->user_reviewer_obj->where($where)->find();
|
$apply_info = $this->user_reviewer_obj->where($where)->find();
|
||||||
$journal_info = $this->journal_obj->where('journal_id', $apply_info['journal_id'])->find();
|
$journal_info = $this->journal_obj->where('journal_id', $apply_info['journal_id'])->find();
|
||||||
$has_res = $this->user_obj->where('account', $apply_info['name'])->find();
|
$has_res = $this->user_obj->where('account', $apply_info['name'])->whereOr("email",$apply_info['email'])->find();
|
||||||
//检测是否已经存在此审稿人
|
//检测是否已经存在此审稿人
|
||||||
if($has_res){
|
if($has_res){
|
||||||
$check = $this->reviewer_to_journal_obj->where('reviewer_id',$has_res['user_id'])->where('journal_id',$journal_info['journal_id'])->where('state',0)->find();
|
$check = $this->reviewer_to_journal_obj->where('reviewer_id',$has_res['user_id'])->where('journal_id',$journal_info['journal_id'])->where('state',0)->find();
|
||||||
|
|||||||
Reference in New Issue
Block a user