This commit is contained in:
王金磊
2023-04-07 16:46:21 +08:00
parent 7b473ffa5c
commit 996c082863
3 changed files with 12 additions and 7 deletions

View File

@@ -206,9 +206,12 @@ class Journal extends Controller {
return jsonError($rule->getError()); return jsonError($rule->getError());
} }
$noinjfa = $this->journal_for_author_yc_obj->where('journal_id',$data['journal_id'])->column('jfa_id'); $noinjfa = $this->journal_for_author_yc_obj->where('journal_id',$data['journal_id'])->column('jfa_id');
$journals[]=0; if($data['journal_id']!=22){
$journals[]=0;//0代表公共的项目
}
$journals[]=$data['journal_id']; $journals[]=$data['journal_id'];
$list = $this->journal_for_author->where('journal_id','in',$journals)->where('pid',0)->where('jfa_state',0)->order("sort desc")->select(); // $list = $this->journal_for_author->where('journal_id','in',$journals)->where('pid',0)->where('jfa_state',0)->order("sort desc")->select();
$list = $this->journal_for_author->where('pid',0)->where('jfa_state',0)->order("sort desc")->select();
foreach($list as $k => $v){ foreach($list as $k => $v){
$cache_list = $this->journal_for_author->where('journal_id','in',$journals)->where('jfa_id',"not in",$noinjfa)->where('pid',$v['jfa_id'])->where('jfa_state',0)->order("sort desc")->select(); $cache_list = $this->journal_for_author->where('journal_id','in',$journals)->where('jfa_id',"not in",$noinjfa)->where('pid',$v['jfa_id'])->where('jfa_state',0)->order("sort desc")->select();
$list[$k]['children'] = $cache_list; $list[$k]['children'] = $cache_list;

View File

@@ -529,7 +529,7 @@ class Article extends Controller {
if($aid&&$organ_res&&$ltai_res&&$author_res&&$ato_res&&$ca_au_id){ if($aid&&$organ_res&&$ltai_res&&$author_res&&$ato_res&&$ca_au_id){
Db::commit(); Db::commit();
$this->pushDoiToCrossref($data['doi'],$aid); $this->pushDoiToCrossref($data['doi'],$aid);
return jsonSuccess([]); return jsonSuccess(['article_id'=>$aid]);
} else { } else {
Db::rollback(); Db::rollback();
return jsonError('system error'); return jsonError('system error');
@@ -1332,10 +1332,9 @@ class Article extends Controller {
public function getArticleReportAuthors(){ public function getArticleReportAuthors(){
$num = $this->request->post('num'); $num = $this->request->post('num');
// $num = 1;
$size = 500; $size = 500;
$f = ($num-1)*$size; $f = ($num-1)*$size;
$list = $this->article_obj->where('state',0)->limit($f,$size)->select(); $list = $this->article_obj->field("j_article.*,j_journal.title journal_title")->join("j_journal",'j_journal.journal_id=j_article.journal_id','left')->where('j_article.state',0)->limit($f,$size)->select();
foreach($list as $k => $v){ foreach($list as $k => $v){
$author = $this->article_author_obj->where('article_id',$v['article_id'])->where('is_report',1)->where('state',0)->select(); $author = $this->article_author_obj->where('article_id',$v['article_id'])->where('is_report',1)->where('state',0)->select();
$list[$k]['author'] = $author; $list[$k]['author'] = $author;

View File

@@ -1428,11 +1428,14 @@ class Journal extends Controller
if (!$rule->check($data)) { if (!$rule->check($data)) {
return jsonError($rule->getError()); return jsonError($rule->getError());
} }
$journals[] = 0; if($data['journal_id'] != 22){
$journals[] = 0;
}
if ($data['journal_id'] != 0) { if ($data['journal_id'] != 0) {
$journals[] = $data['journal_id']; $journals[] = $data['journal_id'];
} }
$list = $this->journal_for_author->where('journal_id', 'in', $journals)->where('pid', 0)->where('jfa_state', 0)->order("sort desc")->select(); // $list = $this->journal_for_author->where('journal_id', 'in', $journals)->where('pid', 0)->where('jfa_state', 0)->order("sort desc")->select();
$list = $this->journal_for_author->where('pid', 0)->where('jfa_state', 0)->order("sort desc")->select();
foreach ($list as $k => $v) { foreach ($list as $k => $v) {
$cache_list = $this->journal_for_author->where('journal_id', 'in', $journals)->where('pid', $v['jfa_id'])->where('jfa_state', 0)->order("sort desc")->select(); $cache_list = $this->journal_for_author->where('journal_id', 'in', $journals)->where('pid', $v['jfa_id'])->where('jfa_state', 0)->order("sort desc")->select();
foreach ($cache_list as $key => $val) { foreach ($cache_list as $key => $val) {