1
This commit is contained in:
@@ -25,6 +25,7 @@ class Article extends Controller {
|
|||||||
protected $journal_notices_obj = '';
|
protected $journal_notices_obj = '';
|
||||||
protected $journal_abs_obj = '';
|
protected $journal_abs_obj = '';
|
||||||
protected $article_to_topic_obj = '';
|
protected $article_to_topic_obj = '';
|
||||||
|
protected $article_main_obj = '';
|
||||||
|
|
||||||
public function __construct(\think\Request $request = null) {
|
public function __construct(\think\Request $request = null) {
|
||||||
parent::__construct($request);
|
parent::__construct($request);
|
||||||
@@ -40,6 +41,7 @@ class Article extends Controller {
|
|||||||
$this->journal_notices_obj = Db::name('journal_notices');
|
$this->journal_notices_obj = Db::name('journal_notices');
|
||||||
$this->journal_abs_obj = Db::name('journal_abstracting');
|
$this->journal_abs_obj = Db::name('journal_abstracting');
|
||||||
$this->article_to_topic_obj = Db::name('article_to_topic');
|
$this->article_to_topic_obj = Db::name('article_to_topic');
|
||||||
|
$this->article_main_obj = Db::name('article_main');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -87,7 +89,13 @@ class Article extends Controller {
|
|||||||
$cite = $article_info['abbr'] . '. ' . $article_info['title'] . '. <i>' . choiseJabbr($article_info['article_id'], $journal_info['jabbr']) . '</i>. ' . $stage_info['stage_year'] . ';' . $stage_info['stage_vol'] . $no . $article_info['npp'] . '. doi:' . $article_info['doi'];
|
$cite = $article_info['abbr'] . '. ' . $article_info['title'] . '. <i>' . choiseJabbr($article_info['article_id'], $journal_info['jabbr']) . '</i>. ' . $stage_info['stage_year'] . ';' . $stage_info['stage_vol'] . $no . $article_info['npp'] . '. doi:' . $article_info['doi'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// echo ($article_info['article_id']<1799&&$article_info['npp']=='Cancer Adv'?'TMR Cancer':$article_info['npp']);
|
//获取html
|
||||||
|
if($article_info['file_html']==''){
|
||||||
|
$caches = $this->article_main_obj->where('article_id',$article_info['article_id'])->where('state',0)->select();
|
||||||
|
if($caches){
|
||||||
|
$article_info['file_html'] = $caches;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (stripos($article_info['npp'], '-')) {
|
if (stripos($article_info['npp'], '-')) {
|
||||||
$cc = explode('-', $article_info['npp']);
|
$cc = explode('-', $article_info['npp']);
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ class Special extends Controller {
|
|||||||
$f = [];
|
$f = [];
|
||||||
//获取作者
|
//获取作者
|
||||||
foreach ($list as $k => $v){
|
foreach ($list as $k => $v){
|
||||||
if(strtotime($v['deadline'])< time()){
|
if(strtotime($v['deadline'])<= time()){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$frag = '';
|
$frag = '';
|
||||||
@@ -180,6 +180,7 @@ class Special extends Controller {
|
|||||||
$v['editor'] = $frag;
|
$v['editor'] = $frag;
|
||||||
$f[] = $v;
|
$f[] = $v;
|
||||||
}
|
}
|
||||||
|
$re['is_show'] = count($list)>0?'true':'false';
|
||||||
$re['specials'] = $f;
|
$re['specials'] = $f;
|
||||||
return jsonSuccess($re);
|
return jsonSuccess($re);
|
||||||
}
|
}
|
||||||
@@ -265,6 +266,12 @@ class Special extends Controller {
|
|||||||
->select();
|
->select();
|
||||||
//获取作者
|
//获取作者
|
||||||
foreach ($list as $k => $v){
|
foreach ($list as $k => $v){
|
||||||
|
if(strtotime($v['deadline'])<= time()){
|
||||||
|
$cou = $this->article_obj->where('journal_special_id',$v['journal_special_id'])->where('state',0)->count();
|
||||||
|
if($cou<3){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
$frag = '';
|
$frag = '';
|
||||||
$caches = $this->journal_special_to_editor_obj
|
$caches = $this->journal_special_to_editor_obj
|
||||||
->field('j_journal_special_editor.*')
|
->field('j_journal_special_editor.*')
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -35,6 +35,7 @@ class Submision extends Controller {
|
|||||||
protected $subscribe_base_topic_obj = '';
|
protected $subscribe_base_topic_obj = '';
|
||||||
protected $medicament_obj = '';
|
protected $medicament_obj = '';
|
||||||
protected $article_to_medicament_obj = '';
|
protected $article_to_medicament_obj = '';
|
||||||
|
protected $article_main_obj = '';
|
||||||
|
|
||||||
public function __construct(\think\Request $request = null) {
|
public function __construct(\think\Request $request = null) {
|
||||||
parent::__construct($request);
|
parent::__construct($request);
|
||||||
@@ -57,6 +58,7 @@ class Submision extends Controller {
|
|||||||
$this->subscribe_base_topic_obj = Db::name('subscribe_base_topic');
|
$this->subscribe_base_topic_obj = Db::name('subscribe_base_topic');
|
||||||
$this->medicament_obj = Db::name('medicament');
|
$this->medicament_obj = Db::name('medicament');
|
||||||
$this->article_to_medicament_obj = Db::name('ArticleToMedicament');
|
$this->article_to_medicament_obj = Db::name('ArticleToMedicament');
|
||||||
|
$this->article_main_obj = Db::name("article_main");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getJournalStages(){
|
public function getJournalStages(){
|
||||||
@@ -114,6 +116,45 @@ class Submision extends Controller {
|
|||||||
return jsonSuccess($re);
|
return jsonSuccess($re);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getTopicsByIssn(){
|
||||||
|
$data = $this->request->post();
|
||||||
|
$rule = new Validate([
|
||||||
|
'issn'=>"require"
|
||||||
|
]);
|
||||||
|
if(!$rule->check($data)){
|
||||||
|
return jsonError($rule->getError());
|
||||||
|
}
|
||||||
|
$journal_info = $this->journal_obj->where('issn', $data['issn'])->find();
|
||||||
|
$res = $this->journal_topic_obj
|
||||||
|
->where('journal_id', $journal_info['journal_id'])
|
||||||
|
->where('state', 0)
|
||||||
|
->select();
|
||||||
|
//处理数组
|
||||||
|
$frag = [];
|
||||||
|
foreach ($res as $v) {
|
||||||
|
if ($v['parent_id'] == 0) {
|
||||||
|
$frag[] = $v;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
foreach ($frag as $kk => $vv) {
|
||||||
|
$frag[$kk] = $this->getChieldarr($vv, $res);
|
||||||
|
}
|
||||||
|
$re['topics'] = $frag;
|
||||||
|
return jsonSuccess($re);
|
||||||
|
}
|
||||||
|
private function getChieldarr($vv, $res)
|
||||||
|
{
|
||||||
|
if ($vv['is_final'] == 1) {
|
||||||
|
return $vv;
|
||||||
|
}
|
||||||
|
foreach ($res as $v) {
|
||||||
|
if ($v['parent_id'] == $vv['journal_topic_id']) {
|
||||||
|
$vv['children'][] = $this->getChieldarr($v, $res);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $vv;
|
||||||
|
}
|
||||||
|
|
||||||
private function getAuthor($article)
|
private function getAuthor($article)
|
||||||
{
|
{
|
||||||
$where['article_id'] = $article['article_id'];
|
$where['article_id'] = $article['article_id'];
|
||||||
@@ -126,4 +167,32 @@ class Submision extends Controller {
|
|||||||
return $frag;
|
return $frag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getArticleMains(){
|
||||||
|
$data = $this->request->post();
|
||||||
|
$rule = new Validate([
|
||||||
|
"article_id"=>"require"
|
||||||
|
]);
|
||||||
|
if(!$rule->check($data)){
|
||||||
|
return jsonError($rule->getError());
|
||||||
|
}
|
||||||
|
$mains = $this->article_main_obj->where('article_id',$data['article_id'])->where('state',0)->select();
|
||||||
|
$re['mains'] = $mains;
|
||||||
|
return jsonSuccess($re);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function delArticleMain(){
|
||||||
|
$data = $this->request->post();
|
||||||
|
$rule = new Validate([
|
||||||
|
"article_main_id"=>"require"
|
||||||
|
]);
|
||||||
|
if(!$rule->check($data)){
|
||||||
|
return jsonError($rule->getError());
|
||||||
|
}
|
||||||
|
$this->article_main_obj->where('article_main_id',$data['article_main_id'])->update(['state'=>1]);
|
||||||
|
return jsonSuccess([]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user