1
This commit is contained in:
@@ -34,7 +34,24 @@ class Publish extends Base
|
|||||||
$pra = [];
|
$pra = [];
|
||||||
$pra['issn'] = $t_journal_info['issn'];
|
$pra['issn'] = $t_journal_info['issn'];
|
||||||
$res = object_to_array(json_decode(myPost($url, $pra)));
|
$res = object_to_array(json_decode(myPost($url, $pra)));
|
||||||
$re['stages'] = $res['data']['stages'];
|
|
||||||
|
$stages = $res['data']['stages'];
|
||||||
|
foreach ($stages as $k =>$v){
|
||||||
|
foreach ($v['articles'] as $key =>$val){
|
||||||
|
$a = explode('/',$val['doi']);
|
||||||
|
if(!isset($a[1])){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$pro_info = $this->production_article_obj->where('doi',$a[1])->where('state',2)->find();
|
||||||
|
if (!$pro_info){
|
||||||
|
$stages[$k]['articles'][$key]['tg_article_id'] = 0 ;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$stages[$k]['articles'][$key]['tg_article_id'] = $pro_info['article_id'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$re['stages'] = $stages;
|
||||||
return jsonSuccess($re);
|
return jsonSuccess($re);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -167,7 +184,7 @@ class Publish extends Base
|
|||||||
if(!$check){
|
if(!$check){
|
||||||
$this->addArticleMainEx($product['article_id']);
|
$this->addArticleMainEx($product['article_id']);
|
||||||
}
|
}
|
||||||
$mains = $this->article_main_obj->where("article_id",$data['article_id'])->whereIn("state",[0,2])->order("sort asc")->select();
|
$mains = $this->article_main_obj->where("article_id",$product['article_id'])->whereIn("state",[0,2])->order("sort asc")->select();
|
||||||
if(!$mains){
|
if(!$mains){
|
||||||
return jsonError("error");
|
return jsonError("error");
|
||||||
}
|
}
|
||||||
@@ -204,7 +221,7 @@ class Publish extends Base
|
|||||||
if(!$check){
|
if(!$check){
|
||||||
return jsonError("not find");
|
return jsonError("not find");
|
||||||
}
|
}
|
||||||
$mains = $this->article_main_obj->where("article_id",$data['article_id'])->whereIn("state",[0,2])->order("sort asc")->select();
|
$mains = $this->article_main_obj->where("article_id",$product['article_id'])->whereIn("state",[0,2])->order("sort asc")->select();
|
||||||
foreach ($mains as $k=>$main) {
|
foreach ($mains as $k=>$main) {
|
||||||
if($main['type']==0){
|
if($main['type']==0){
|
||||||
continue;
|
continue;
|
||||||
@@ -255,10 +272,12 @@ class Publish extends Base
|
|||||||
if (!$pro_info){
|
if (!$pro_info){
|
||||||
$pid = $this->createEmptyProduction($v);
|
$pid = $this->createEmptyProduction($v);
|
||||||
$articles[$k]['refers'] = [];
|
$articles[$k]['refers'] = [];
|
||||||
|
$articles[$k]['tg_article_id'] = 0 ;
|
||||||
$articles[$k]['p_article_id'] = $pid;
|
$articles[$k]['p_article_id'] = $pid;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$articles[$k]['p_article_id'] = $pro_info['p_article_id'];
|
$articles[$k]['p_article_id'] = $pro_info['p_article_id'];
|
||||||
|
$articles[$k]['tg_article_id'] = $pro_info['article_id'];
|
||||||
$articles[$k]['refers'] = [];//$this->production_article_refer_obj->where("p_article_id",$pro_info['p_article_id'])->where('state',0)->order("index")->select();
|
$articles[$k]['refers'] = [];//$this->production_article_refer_obj->where("p_article_id",$pro_info['p_article_id'])->where('state',0)->order("index")->select();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user