This commit is contained in:
wangjinlei
2024-10-16 14:53:44 +08:00
parent 4a84c9f21c
commit 10bdd968af
4 changed files with 87 additions and 7 deletions

View File

@@ -3411,6 +3411,19 @@ class Article extends Base
return json($res); return json($res);
} }
public function getJournalByAbbr(){
$data = $this->request->post();
$rule = new Validate([
"abbr"=>"require"
]);
if(!$rule->check($data)){
return jsonError($rule->getError());
}
$journal_info = $this->journal_obj->where("abbr",$data['abbr'])->find();
$re['detail'] = $journal_info;
return jsonSuccess($re);
}
/** /**
* 获取审核人详情 * 获取审核人详情
*/ */

View File

@@ -268,14 +268,16 @@ class Board extends Base {
return jsonError($rule->getError()); return jsonError($rule->getError());
} }
$journal_info = $this->journal_obj->where('journal_id',$data['journal_id'])->find(); $journal_info = $this->journal_obj->where('journal_id',$data['journal_id'])->find();
$boards = $this->board_to_journal_obj->field("t_board_to_journal.*,t_user.google_index,t_user.google_time,t_user.wos_index,t_user.wos_time") $boards = $this->board_to_journal_obj->field("t_board_to_journal.*,t_user.google_index,t_user.google_time,t_user.wos_index,t_user.wos_time,t_user_reviewer_info.country")
->join("t_user","t_user.user_id = t_board_to_journal.user_id","left") ->join("t_user","t_user.user_id = t_board_to_journal.user_id","left")
->join("t_user_reviewer_info","t_user_reviewer_info.reviewer_id = t_board_to_journal.user_id","left")
->where("t_board_to_journal.journal_id",$data['journal_id']) ->where("t_board_to_journal.journal_id",$data['journal_id'])
->where('t_board_to_journal.state',0)->select(); ->where('t_board_to_journal.state',0)->select();
$ca_board = $this->getBoardsForJournal($data['journal_id']); $ca_board = $this->getBoardsForJournal($data['journal_id']);
$journal_info["boards"] = $ca_board; $journal_info["boards"] = $ca_board;
$journal_info['boards_count'] = count($boards); $journal_info['boards_count'] = count($boards);
$board_index = []; $board_index = [];
$china_num = 0;
$sum = 0; $sum = 0;
foreach ($boards as $val){ foreach ($boards as $val){
if($val['wos_index']>0){ if($val['wos_index']>0){
@@ -285,12 +287,18 @@ class Board extends Base {
$board_index[] = $val['google_index']; $board_index[] = $val['google_index'];
$sum += $val['google_index']; $sum += $val['google_index'];
} }
if($val['country']=="China"){
$china_num++;
}
} }
$journal_info['index_num'] = count($board_index); $journal_info['index_num'] = count($board_index);
$journal_info['median'] = count($board_index)==0?0:zw_array($board_index); $journal_info['median'] = count($board_index)==0?0:zw_array($board_index);
$journal_info['avg'] = count($board_index)==0?0:round($sum/count($board_index),2); $journal_info['avg'] = count($board_index)==0?0:round($sum/count($board_index),2);
$re['journal'] = $journal_info; $re['journal'] = $journal_info;
$re['boards'] = $this->getBoardsForJournal($data['journal_id'],true); $re['boards'] = $this->getBoardsForJournal($data['journal_id'],true);
$re['boards_count'] = count($boards);
$re['china_count'] = $china_num;
return jsonSuccess($re); return jsonSuccess($re);
} }

View File

@@ -70,6 +70,62 @@ class Journal extends Base {
} }
/**获取连续出刊的当年分期信息
* @return void
*/
public function getJournalStageLX(){
$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();
$url = "http://journalapi.tmrjournals.com/public/index.php/master/Journal/getJournalStageLXForSubmission";
$program['issn'] = $journal_info['issn'];
$res = object_to_array(json_decode(myPost($url,$program)));
$list = $res['data']['detail'];
$re['detail'] = $list;
return jsonSuccess($re);
}
public function getJournalStageArticles(){
$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();
$url = "http://journalapi.tmrjournals.com/public/index.php/master/Journal/getJournalStageArticlesForSubmission";
$program['issn'] = $journal_info['issn'];
$res = object_to_array(json_decode(myPost($url,$program)));
$list = $res['data']['list'];
$re['list'] = $list;
return jsonSuccess($re);
}
public function pushArticleToPublic(){
$data = $this->request->post();
$rule = new Validate([
"article_id"=>"require"
]);
if(!$rule->check($data)){
return jsonError($rule->getError());
}
//推送数据到数据库
//更改文章状态
$url = "http://journalapi.tmrjournals.com/public/index.php/master/Journal/getJournalStageArticlesForSubmission";
$program['article_id'] = $data['article_id'];
$res = object_to_array(json_decode(myPost($url,$program)));
return jsonSuccess([]);
}
public function editJournalLeftZc(){ public function editJournalLeftZc(){
$data = $this->request->post(); $data = $this->request->post();
$rule = new Validate([ $rule = new Validate([

View File

@@ -114,25 +114,28 @@ class User extends Base
} }
$where = []; $where = [];
if(isset($data['keywords'])&&$data['keywords']!=''){ if(isset($data['keywords'])&&$data['keywords']!=''){
$where['email'] = ["like","%".trim($data['keywords'])."%"]; $where['t_article_author.email'] = ["like","%".trim($data['keywords'])."%"];
}else{ }else{
$where['email'] = ["<>",""]; $where['t_article_author.email'] = ["<>",""];
} }
if(isset($data['doi'])&&$data['doi']!=''){ if(isset($data['doi'])&&$data['doi']!=''){
if(strpos($data['doi'],"10.53388/")){ if(strpos($data['doi'],".53388")){
$doi = substr($data['doi'],9); $doi = substr($data['doi'],9);
}else{ }else{
$doi = trim($data['doi']); $doi = trim($data['doi']);
} }
$p_info = $this->production_article_obj->where("doi",$doi)->where("state",2)->find(); $p_info = $this->production_article_obj->where("doi",$doi)->where("state",2)->find();
if($p_info&&$p_info['article_id']>0){ if($p_info&&$p_info['article_id']>0){
$where['article_id'] = $p_info['article_id']; $where['t_article_author.article_id'] = $p_info['article_id'];
}else{ }else{
return jsonError("not find"); return jsonError("not find");
} }
} }
$authors = $this->article_author_obj->where($where)->group("email")->order("art_aut_id desc")->page($data['page'],$data['limit'])->select(); if(isset($data['journal_id'])&&$data['journal_id']!=0){
$count = $this->article_author_obj->where($where)->group("email")->order("art_aut_id desc")->count(); $where['t_article.journal_id'] = $data['journal_id'];
}
$authors = $this->article_author_obj->field("t_article_author.*")->join("t_article","t_article.article_id = t_article_author.article_id","left")->where($where)->group("t_article_author.email")->order("t_article_author.art_aut_id desc")->page($data['page'],$data['limit'])->select();
$count = $this->article_author_obj->join("t_article","t_article.article_id = t_article_author.article_id","left")->where($where)->group("email")->order("art_aut_id desc")->count();
foreach ($authors as $k =>$v){ foreach ($authors as $k =>$v){
$articles = $this->article_author_obj $articles = $this->article_author_obj
->field("t_article_author.*,t_article.title,t_journal.jabbr journal_jabbr") ->field("t_article_author.*,t_article.title,t_journal.jabbr journal_jabbr")