20201112
This commit is contained in:
@@ -31,6 +31,8 @@ class Journal extends Controller {
|
||||
protected $journal_paper_art_obj = '';
|
||||
protected $subscribe_journal_obj = '';
|
||||
protected $subscribe_topic_obj = '';
|
||||
protected $board_obj = '';
|
||||
protected $board_group_obj = '';
|
||||
|
||||
public function __construct(\think\Request $request = null) {
|
||||
parent::__construct($request);
|
||||
@@ -51,6 +53,8 @@ class Journal extends Controller {
|
||||
$this->journal_paper_art_obj = Db::name('journal_paper_art');
|
||||
$this->subscribe_journal_obj = Db::name('subscribe_journal');
|
||||
$this->subscribe_topic_obj = Db::name('subscribe_topic');
|
||||
$this->board_obj = Db::name('board');
|
||||
$this->board_group_obj = Db::name('board_group');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -648,6 +652,43 @@ class Journal extends Controller {
|
||||
$re['article'] = $article;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取期刊编委信息
|
||||
* @description 获取期刊编委信息
|
||||
* @author wangjinlei
|
||||
* @url /api/Journal/getBoard
|
||||
* @method POST
|
||||
*
|
||||
* @param name:journal_id type:int require:1 desc:期刊id
|
||||
*
|
||||
* @return boards:编委array#
|
||||
*/
|
||||
public function getBoard(){
|
||||
$data = $this->request->post();
|
||||
$list = $this->board_obj
|
||||
->field('j_board.*,j_board_group.group_name')
|
||||
->join('j_board_group','j_board.board_group_id = j_board_group.board_group_id','left')
|
||||
->where('j_board.journal_id',$data['journal_id'])
|
||||
->where('j_board.state',0)
|
||||
->select();
|
||||
$frag = [];
|
||||
foreach ($list as $k => $v){
|
||||
if($v['type']==0){
|
||||
$frag['main'][] = $v;
|
||||
}elseif($v['type']==1){
|
||||
$frag['remain'][] = $v;
|
||||
}else{
|
||||
if($v['board_group_id']==0){
|
||||
$frag['member'][] = $v;
|
||||
}else{
|
||||
$frag['member'][$v['group_name']][] = $v;
|
||||
}
|
||||
}
|
||||
}
|
||||
$re['boards'] = $frag;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取期刊话题列表
|
||||
@@ -693,7 +734,9 @@ class Journal extends Controller {
|
||||
$insert['email'] = $data['email'];
|
||||
$id = $this->subscribe_journal_obj->insertGetId($insert);
|
||||
//发送邮件感谢
|
||||
$tt = 'Dear Researcher,<br><br>';
|
||||
$tt = 'Dear Researcher,<br>';
|
||||
$tt .= 'Aims & Scope<br>Traditional Medicine Research (TMR) (ISSN 2413-3973 CODEN TMRRCP) is a peer-reviewed open access journal managed by TMR Publishing Group. TMR is dedicated to protecting and developing all types of traditional medicines, including traditional Chinese medicine, Persian medicine, Ayurveda, Siddha, minority medicine, etc., using the latest achievements in modern science. TMR emphasizes the historical origin and developmental pipeline of the research objective and encourages authors to analyze the theoretical significance underlying a study and the application of traditional medicine in clinical practice. In addition to editorial, review, article and letter, the following topics are welcome. News column follows important current medical, policy, and archaeological events in the field of traditional medicine, and the comment column discusses the progress of latest and salient research.<br>';
|
||||
$tt .= 'Abstracting and Indexing<br>Traditional Medicine Research has been included in Emerging Sources Citation Index (ESCI), Embase, DOAJ, ProQuest, J-Gate, EuroPub, WHO-COVID-19 Database, Google Scholar, EBSCO, ISC, ICI, MIAR, MIT Barton Catalog, OAJI, BASE, Cosmos, ESJI, Universiteitsbibliotheek Gent, ResearchBib, Argentina.gob.ar, GoOA Database, Research4Life (AGORA), National Science Library-Chinese Academy of Sciences, Ingenta Connect, CNKI Scholar, Baidu Scholar, CSTJ, VIP, Superstar Journals Database and Wanfang Data.<br>';
|
||||
$tt .= 'Welcome you to the email alert for the latest research and more. Thank you for your interest in our publications and topics.<br>';
|
||||
$tt .= '<a href="http://journalapi.tmrjournals.com/public/index.php/api/Journal/UnsubscribeJournal/snum/'.$id.'">Unsubscribe</a><br>';
|
||||
$tt .= 'This service is provided by TMR Publishing Group | New Zealand<br>';
|
||||
@@ -701,7 +744,7 @@ class Journal extends Controller {
|
||||
$tt .= 'Email: publisher@tmrjournals.com';
|
||||
$tt .= 'www.tmrjournals.com';
|
||||
$maidata['email'] = $data['email'];
|
||||
$maidata['title'] = 'Thank you for subscribing.';
|
||||
$maidata['title'] = 'Traditional Medicine Research ISSN 2413-3973';
|
||||
$maidata['content'] = $tt;
|
||||
$maidata['tmail'] = 'publicrelations@tmrjournals.com';
|
||||
$maidata['tpassword'] = 'pRWU999999';
|
||||
|
||||
@@ -29,6 +29,8 @@ class Journal extends Controller {
|
||||
protected $journal_paper_art_obj = '';
|
||||
protected $subscribe_journal_obj = '';
|
||||
protected $subscribe_topic_obj = '';
|
||||
protected $board_obj = '';
|
||||
protected $board_group_obj = '';
|
||||
|
||||
public function __construct(\think\Request $request = null) {
|
||||
parent::__construct($request);
|
||||
@@ -48,6 +50,8 @@ class Journal extends Controller {
|
||||
$this->journal_paper_art_obj = Db::name('journal_paper_art');
|
||||
$this->subscribe_journal_obj = Db::name('subscribe_journal');
|
||||
$this->subscribe_topic_obj = Db::name('subscribe_topic');
|
||||
$this->board_obj = Db::name('board');
|
||||
$this->board_group_obj = Db::name('board_group');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -260,6 +264,179 @@ class Journal extends Controller {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取编委列表
|
||||
* @description 获取编委列表
|
||||
* @author wangjinlei
|
||||
* @url /master/Journal/getBoardList
|
||||
* @method POST
|
||||
*
|
||||
* @param name:journal_id type:int require:1 desc:期刊id
|
||||
*
|
||||
* @return boards:编委列表array#
|
||||
* @return journal:期刊信息#
|
||||
*/
|
||||
public function getBoardList(){
|
||||
$data = $this->request->post();
|
||||
$journal_info = $this->journal_obj->where('journal_id',$data['journal_id'])->find();
|
||||
$list = $this->board_obj
|
||||
->field('j_board.*,j_board_group.group_name')
|
||||
->join('j_board_group','j_board.board_group_id = j_board_group.board_group_id','LEFT')
|
||||
->where('j_board.journal_id',$data['journal_id'])
|
||||
->where('j_board.state',0)
|
||||
->order('j_board.type')
|
||||
->select();
|
||||
$re['boards'] = $list;
|
||||
$re['journal'] = $journal_info;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取编委成员分类列表
|
||||
* @description 获取编委成员分类列表
|
||||
* @author wangjinlei
|
||||
* @url /master/Journal/getBoardGroups
|
||||
* @method POST
|
||||
*
|
||||
* @param name:journal_id type:int require:1 desc:期刊id
|
||||
*
|
||||
* @return groups:编委分类列表array#
|
||||
*/
|
||||
public function getBoardGroups(){
|
||||
$data = $this->request->post();
|
||||
$list = $this->board_group_obj->where('journal_id',$data['journal_id'])->where('state',0)->select();
|
||||
$re['groups'] = $list;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 添加编委成员分组
|
||||
* @description 添加编委成员分组
|
||||
* @author wangjinlei
|
||||
* @url /master/Journal/addBoardGroup
|
||||
* @method POST
|
||||
*
|
||||
* @param name:journal_id type:int require:1 desc:期刊id
|
||||
* @param name:group_name type:string require:1 desc:分组名字
|
||||
*/
|
||||
public function addBoardGroup(){
|
||||
$data = $this->request->post();
|
||||
$insert['journal_id'] = $data['journal_id'];
|
||||
$insert['group_name'] = $data['group_name'];
|
||||
$this->board_group_obj->insert($insert);
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 删除编委成员分组
|
||||
* @description 删除编委成员分组
|
||||
* @author wangjinlei
|
||||
* @url /master/Journal/delBoardGroup
|
||||
* @method POST
|
||||
*
|
||||
* @param name:board_group_id type:int require:1 desc:编委分组id
|
||||
*/
|
||||
public function delBoardGroup(){
|
||||
$data = $this->request->post();
|
||||
$this->board_group_obj->where('board_group_id',$data['board_group_id'])->update(['state'=>1]);
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 编辑编委成员分组信息
|
||||
* @description 编辑编委成员分组信息
|
||||
* @author wangjinlei
|
||||
* @url /master/Journal/editBoardGroup
|
||||
* @method POST
|
||||
*
|
||||
* @param name:board_group_id type:int require:1 desc:编委分组id
|
||||
* @param name:group_name type:string require:1 desc:分组名字
|
||||
*/
|
||||
public function editBoardGroup(){
|
||||
$data = $this->request->post();
|
||||
$this->board_group_obj->where('board_group_id',$data['board_group_id'])->update(['group_name'=>$data['group_name']]);
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 添加编委
|
||||
* @description 添加编委
|
||||
* @author wangjinlei
|
||||
* @url /master/Journal/addBoard
|
||||
* @method POST
|
||||
*
|
||||
* @param name:journal_id type:int require:1 desc:期刊id
|
||||
* @param name:type type:int require:1 desc:编委类型0主编1副主编2编委成员
|
||||
* @param name:name type:string require:1 desc:编委姓名
|
||||
* @param name:website type:string require:1 desc:个人主页地址
|
||||
* @param name:dr type:string require:1 desc:学位
|
||||
* @param name:title type:string require:1 desc:职称
|
||||
* @param name:address type:string require:1 desc:单位
|
||||
* @param name:country type:string require:1 desc:国家
|
||||
* @param name:board_group_id type:int require:1 desc:编委分组id
|
||||
*/
|
||||
public function addBoard(){
|
||||
$data = $this->request->post();
|
||||
$insert['journal_id'] = $data['journal_id'];
|
||||
$insert['type'] = $data['type'];
|
||||
$insert['name'] = $data['name'];
|
||||
$insert['website'] = $data['website'];
|
||||
$insert['dr'] = $data['dr'];
|
||||
$insert['title'] = $data['title'];
|
||||
$insert['address'] = $data['address'];
|
||||
$insert['country'] = $data['country'];
|
||||
$insert['board_group_id'] = $data['board_group_id'];
|
||||
$this->board_obj->insert($insert);
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 删除编委
|
||||
* @description 删除编委
|
||||
* @author wangjinlei
|
||||
* @url /master/Journal/delBoard
|
||||
* @method POST
|
||||
*
|
||||
* @param name:board_id type:int require:1 desc:编委id
|
||||
*/
|
||||
public function delBoard(){
|
||||
$data = $this->request->post();
|
||||
$this->board_obj->where('board_id',$data['board_id'])->update(['state'=>1]);
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 编辑编委信息
|
||||
* @description 编辑编委信息
|
||||
* @author wangjinlei
|
||||
* @url /master/Journal/editBoard
|
||||
* @method POST
|
||||
*
|
||||
* @param name:board_id type:int require:1 desc:编委id
|
||||
* @param name:type type:int require:1 desc:编委类型0主编1副主编2编委成员
|
||||
* @param name:name type:string require:1 desc:编委姓名
|
||||
* @param name:website type:string require:1 desc:个人主页地址
|
||||
* @param name:dr type:string require:1 desc:学位
|
||||
* @param name:title type:string require:1 desc:职称
|
||||
* @param name:address type:string require:1 desc:单位
|
||||
* @param name:country type:string require:1 desc:国家
|
||||
* @param name:board_group_id type:int require:1 desc:编委分组id
|
||||
*/
|
||||
public function editBoard(){
|
||||
$data = $this->request->post();
|
||||
$insert['type'] = $data['type'];
|
||||
$insert['name'] = $data['name'];
|
||||
$insert['website'] = $data['website'];
|
||||
$insert['dr'] = $data['dr'];
|
||||
$insert['title'] = $data['title'];
|
||||
$insert['address'] = $data['address'];
|
||||
$insert['country'] = $data['country'];
|
||||
$insert['board_group_id'] = $data['board_group_id'];
|
||||
|
||||
$this->board_obj->where('board_id',$data['board_id'])->update($insert);
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 增加话题
|
||||
* @description 增加话题
|
||||
|
||||
@@ -15,6 +15,7 @@ class Publish extends Controller{
|
||||
const JURL = 'http://api.tmrjournals.com/public/index.php/api/Article/getArticleForJournal';
|
||||
const TJ_URL = 'http://api.tmrjournals.com/public/index.php/api/Super/main';
|
||||
const AL_URL = 'http://api.tmrjournals.com/public/index.php/api/Super/getAllArticle';
|
||||
const CCA_URL = 'http://api.tmrjournals.com/public/index.php/api/Super/getCCArticles';
|
||||
|
||||
protected $admin_obj = '';
|
||||
protected $journal_obj = '';
|
||||
@@ -59,8 +60,8 @@ class Publish extends Controller{
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取期刊列表
|
||||
* @description 获取期刊列表
|
||||
* @title 获取期刊列表(出刊时间)
|
||||
* @description 获取期刊列表(出刊时间)
|
||||
* @author wangjinlei
|
||||
* @url /super/Publish/getMain
|
||||
* @method POST
|
||||
@@ -85,10 +86,11 @@ class Publish extends Controller{
|
||||
$cs['ctime'] = $ctime;
|
||||
$journals[$k]['last_time'] = $ctime;
|
||||
$cache_arts = $this->object_to_array(json_decode(myPost(self::JURL,$cs)));
|
||||
// $journals[$k]['arts'] = $cache_arts['data'];
|
||||
$count = is_array($cache_arts['data']['articles'])?count($cache_arts['data']['articles']):0;
|
||||
$journals[$k]['artCount'] = $count;
|
||||
}
|
||||
|
||||
//按照危险值排序
|
||||
for($i=0;$i<count($journals);$i++){
|
||||
for($j=$i+1;$j<count($journals);$j++){
|
||||
if($journals[$i]['mark']['mk']<$journals[$j]['mark']['mk']){
|
||||
@@ -117,6 +119,26 @@ class Publish extends Controller{
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 验证登录
|
||||
* @description 验证登录
|
||||
* @author wangjinlei
|
||||
* @url /super/Publish/check_login
|
||||
* @method POST
|
||||
*
|
||||
* @param name:account type:string require:1 desc:账户密码
|
||||
* @param name:password type:string require:1 desc:密码
|
||||
*
|
||||
*/
|
||||
public function check_login(){
|
||||
$data = $this->request->post();
|
||||
if($data['account'] == 'supervise'&&$data['password']=='wu751019'){
|
||||
return jsonSuccess([]);
|
||||
} else {
|
||||
return jsonError('check error!');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取合规检测
|
||||
* @description 获取合规检测
|
||||
@@ -124,6 +146,9 @@ class Publish extends Controller{
|
||||
* @url /super/Publish/getTjJournal
|
||||
* @method POST
|
||||
*
|
||||
* @param name:start type:string require:1 desc:开始时间
|
||||
* @param name:end type:string require:1 desc:结束时间
|
||||
*
|
||||
* @return dates:数据@
|
||||
* @dates LYL:录用率
|
||||
* @dates CC:查重
|
||||
@@ -131,7 +156,33 @@ class Publish extends Controller{
|
||||
* @dates SJ:时间
|
||||
*/
|
||||
public function getTjJournal(){
|
||||
$res = myPost(self::TJ_URL);
|
||||
$data = $this->request->post();
|
||||
$pa['start'] = $data['start'];
|
||||
$pa['end'] = $data['end'];
|
||||
$res = myPost(self::TJ_URL,$pa);
|
||||
return $res;
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取查重文章
|
||||
* @description 获取查重文章
|
||||
* @author wangjinlei
|
||||
* @url /super/Publish/getCCArticle
|
||||
* @method POST
|
||||
*
|
||||
* @param name:issn type:int require:1 desc:期刊id
|
||||
* @param name:type type:string require:1 desc:重复类型
|
||||
* @param name:start type:string require:1 desc:开始时间
|
||||
* @param name:end type:string require:1 desc:结束时间
|
||||
*
|
||||
*/
|
||||
public function getCCArticle(){
|
||||
$data = $this->request->post();
|
||||
$pa['issn'] = $data['issn'];
|
||||
$pa['type'] = $data['type'];
|
||||
$pa['start'] = $data['start'];
|
||||
$pa['end'] = $data['end'];
|
||||
$res = myPost(self::CCA_URL,$pa);
|
||||
return $res;
|
||||
}
|
||||
|
||||
@@ -183,7 +234,12 @@ class Publish extends Controller{
|
||||
$frag = [];
|
||||
$frag['all'] = 0;
|
||||
for($i=2016;$i<= intval(date('Y'));$i++){
|
||||
$cstages = $this->journal_stage_obj->where('journal_id',$journal_id)->where('stage_year',$i)->where('state',0)->column('journal_stage_id');
|
||||
$cstages = $this->journal_stage_obj
|
||||
->where('journal_id',$journal_id)
|
||||
->where('stage_year',$i)
|
||||
->where('is_publish',1)
|
||||
->where('state',0)
|
||||
->column('journal_stage_id');
|
||||
$frag[$i] = $this->article_obj->where('journal_stage_id','in',$cstages)->where('state',0)->count();
|
||||
$frag['all'] += $frag[$i];
|
||||
}
|
||||
@@ -192,7 +248,12 @@ class Publish extends Controller{
|
||||
|
||||
|
||||
private function getLX($journal_id){
|
||||
$arts = $this->article_obj->where('journal_id',$journal_id)->where('state',0)->select();
|
||||
$stages = $this->journal_stage_obj
|
||||
->where('journal_id',$journal_id)
|
||||
->where('is_publish',1)
|
||||
->where('state',0)
|
||||
->column('journal_stage_id');
|
||||
$arts = $this->article_obj->where('journal_id',$journal_id)->where('journal_stage_id','in',$stages)->where('state',0)->select();
|
||||
$frag = [];
|
||||
foreach ($arts as $v){
|
||||
if(isset($frag[$v['type']])){
|
||||
@@ -207,7 +268,12 @@ class Publish extends Controller{
|
||||
}
|
||||
|
||||
private function getGJH($journal_id){
|
||||
$arts = $this->article_obj->where('journal_id',$journal_id)->where('state',0)->column('article_id');
|
||||
$stages = $this->journal_stage_obj
|
||||
->where('journal_id',$journal_id)
|
||||
->where('is_publish',1)
|
||||
->where('state',0)
|
||||
->column('journal_stage_id');
|
||||
$arts = $this->article_obj->where('journal_id',$journal_id)->where('journal_stage_id','in',$stages)->where('state',0)->column('article_id');
|
||||
$auts = $this->article_author_obj->where('article_id','in',$arts)->where('state',0)->select();
|
||||
$frag = [];
|
||||
$frag['list'] = [];
|
||||
@@ -260,30 +326,6 @@ class Publish extends Controller{
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
public function test(){
|
||||
echo strtotime('2021-02-24');
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
echo THINK_VERSION;
|
||||
}
|
||||
|
||||
|
||||
public function mymy(){
|
||||
$last_stage = $this->journal_stage_obj
|
||||
->where('journal_id',22)
|
||||
->where('is_publish',1)
|
||||
->where('state',0)
|
||||
->order('journal_stage_id desc')
|
||||
->limit(1)
|
||||
->select();
|
||||
echo '<pre>';
|
||||
var_dump($last_stage);
|
||||
echo '</pre>';
|
||||
die;
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算危险指数
|
||||
*/
|
||||
@@ -301,20 +343,24 @@ class Publish extends Controller{
|
||||
->limit(1)
|
||||
->select();
|
||||
$stage_now = $last_stage?$last_stage[0]:['issue_date'=>'2020-05-15'];
|
||||
$cday = intval((time()-strtotime($stage_now['issue_date']))/(3600*24));
|
||||
$cycle = $journal_info['cycle']==0?2:$journal_info['cycle'];
|
||||
$art_num = $journal_info['art_num']==0?5:$journal_info['art_num'];
|
||||
$cday = intval((time()-strtotime($stage_now['issue_date']))/(3600*24));//过去了多少天
|
||||
$cycle = $journal_info['cycle']==0?2:$journal_info['cycle'];//出刊期限
|
||||
$art_num = $journal_info['art_num']==0?5:$journal_info['art_num'];//期刊文章数量
|
||||
|
||||
$next_time = strtotime("+$cycle month",strtotime($stage_now['issue_date']));//下次出刊时间
|
||||
|
||||
$all_days = intval(($next_time-strtotime($stage_now['issue_date']))/(3600*24));//这两次出刊时间差,天数
|
||||
|
||||
$frag = [];
|
||||
$frag['count'] = $count;
|
||||
$frag['sy'] = $cycle*30 - $cday;
|
||||
$frag['ntime'] = strtotime($stage_now['issue_date'])+($cycle*30*3600*24);
|
||||
$frag['sy'] = intval(($next_time- time())/(3600*24));//$cycle*30 - $cday;
|
||||
$frag['ntime'] = $next_time;//strtotime($stage_now['issue_date'])+($cycle*30*3600*24);
|
||||
|
||||
if($cday>($cycle*30)){
|
||||
if(time()>$next_time){
|
||||
$frag['mk'] = 100;
|
||||
return $frag;
|
||||
}
|
||||
$lart = intval($cday*$art_num/($cycle*30));
|
||||
$lart = intval($cday*$art_num/$all_days);
|
||||
if($count>=$lart){
|
||||
$frag['mk'] = 0;
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user