1
This commit is contained in:
@@ -55,7 +55,7 @@ class Production extends Base
|
||||
$program['fileRoute'] = "https://submission.tmrjournals.com/public/" . $files[0]['file_url'];
|
||||
$res = object_to_array(json_decode(myPost($url, $program)));
|
||||
|
||||
return jsonSuccess($program);
|
||||
// return jsonSuccess($program);
|
||||
$file_runs = $res['data'];
|
||||
|
||||
//整理信息
|
||||
@@ -345,6 +345,7 @@ class Production extends Base
|
||||
$article_info = $this->article_obj->where('article_id', $p_info['article_id'])->find();
|
||||
$journal_info = $this->journal_obj->where('journal_id', $article_info['journal_id'])->find();
|
||||
$authors = $this->production_article_author_obj->where('p_article_id', $data['p_article_id'])->where('state', 0)->select();
|
||||
$report_authors = [];
|
||||
foreach ($authors as $k => $v) {
|
||||
$cache = $this->production_article_author_to_organ_obj
|
||||
->field('t_production_article_organ.organ_name')
|
||||
@@ -353,6 +354,11 @@ class Production extends Base
|
||||
->where('t_production_article_author_to_organ.state', 0)
|
||||
->select();
|
||||
$authors[$k]['organs'] = $cache;
|
||||
if($v['is_report']==1){
|
||||
$c_user = $this->user_obj->where('email',$v['email'])->find();
|
||||
$cac['user_id'] = $c_user['user_id'];
|
||||
$report_authors[] = $cac;
|
||||
}
|
||||
}
|
||||
$organs = $this->production_article_organ_obj->where('p_article_id', $data['p_article_id'])->where('state', 0)->select();
|
||||
//check信息是否完整
|
||||
@@ -400,6 +406,13 @@ class Production extends Base
|
||||
$res = object_to_array(json_decode(myPost($url, $pra)));
|
||||
if ($res['code'] == 0) {
|
||||
$this->production_article_obj->where('p_article_id', $data['p_article_id'])->update(['state' => 2]);
|
||||
foreach($report_authors as $v){
|
||||
$iua['user_id'] = $v['user_id'];
|
||||
$iua['w_article_id'] = $res['date']['article_id'];
|
||||
$iua['w_article_doi'] = '10.53388/'.$p_info['doi'];
|
||||
$iua['journal_title'] = $journal_info['title'];
|
||||
$this->user_author_obj->insert($iua);
|
||||
}
|
||||
return jsonSuccess([]);
|
||||
} else {
|
||||
return jsonError('system error:' . $res['msg']);
|
||||
|
||||
Reference in New Issue
Block a user