From 7009332c9f4713d433a9b053130af40b9b5411d8 Mon Sep 17 00:00:00 2001 From: chengxl Date: Thu, 27 Nov 2025 09:51:24 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/controller/Workbench.php | 65 +++++++++++++++++++++++- 1 file changed, 64 insertions(+), 1 deletion(-) diff --git a/application/api/controller/Workbench.php b/application/api/controller/Workbench.php index 1eb8431..651f516 100644 --- a/application/api/controller/Workbench.php +++ b/application/api/controller/Workbench.php @@ -45,7 +45,7 @@ class Workbench extends Base //标题 $sTitle = empty($aParam['title']) ? '': $aParam['title']; if(!empty($sTitle)){ - $aWhere = ['title' => trim($sTitle)]; + $aWhere = ['title' => ['like','%'.trim($sTitle).'%']]; } //国家 $sCountry = -1; @@ -400,4 +400,67 @@ class Workbench extends Base Db::commit(); return json_encode(['status' => 1,'msg' => 'Update successful']); } + + /** + * 获取审稿记录详情 + */ + public function getArticleReviewDetail(){ + //获取参数 + $aParam = empty($aParam) ? $this->request->post() : $aParam; + //获取文章ID + $iArticleId = empty($aParam['article_id']) ? 0 : $aParam['article_id']; + if(empty($iArticleId)){ + return json_encode(['status' => 2,'msg' => 'Please select the article']); + } + + //获取审稿记录ID + $iArtRevId = empty($aParam['art_rev_id']) ? 0 : $aParam['art_rev_id']; + if(empty($iArtRevId)){ + return json_encode(['status' => 2,'msg' => 'Please select a record']); + } + //获取复审记录ID + $iArtRevRepId = empty($aParam['art_rev_rep_id']) ? 0 : $aParam['art_rev_rep_id']; + if(empty($iArtRevId) && empty($iArtRevRepId)){ + return json_encode(['status' => 2,'msg' => 'Please select a record']); + } + + //查询文章 + $aArticle = json_decode($this->get($aParam),true); + $iStatus = empty($aArticle['status']) ? 0 : $aArticle['status']; + if($iStatus != 1){ + return json_encode($aArticle); + } + $aArticle = empty($aArticle['data']) ? [] : $aArticle['data']; + + //查询审稿记录 + $aWhere = ['art_rev_id' => $iArtRevId,'article_id' => $iArticleId]; + $aArticleReviewer = Db::name('article_reviewer')->field('art_rev_id,reviewer_id,ctime')->where($aWhere)->find(); + if(empty($aArticleReviewer)){ + return json_encode(['status' => 3,'msg' => 'Review record does not exist']); + } + if(empty($iArtRevRepId)){ + //查询初审问卷 + $aWhere = ['art_rev_id' => $iArtRevId]; + $aQuestion = Db::name('article_reviewer_question')->field('is_anonymous')->where($aWhere)->find(); + $aArticleReviewer['is_anonymous'] = empty($aQuestion['is_anonymous']) ? 0 : $aQuestion['is_anonymous']; + } + //查询审稿人姓名 + $iUserId = empty($aArticleReviewer['reviewer_id']) ? 0 : $aArticleReviewer['reviewer_id']; + if(!empty($iUserId)){ + $aWhere = ['user_id' => $iUserId,'state' => 0]; + $aUser = Db::name('user')->field('realname,email')->where($aWhere)->find(); + $aArticleReviewer['realname'] = empty($aUser['realname']) ? '' : $aUser['realname']; + $aArticleReviewer['email'] = empty($aUser['email']) ? '' : $aUser['email']; + } + + //组装信息 + $aData = ['article' => $aArticle,'article_reviewer' => $aArticleReviewer]; + //查询复审信息 + if(!empty($iArtRevRepId)){ + //查询初审问卷 + $aWhere = ['art_rev_id' => $iArtRevId,'art_rev_rep_id' => $iArtRevRepId]; + $aData['article_reviewer_repeat'] = Db::name('article_reviewer_repeat')->where($aWhere)->find(); + } + return json_encode(['status' => 1,'msg' => 'success','data' => $aData]); + } } From 42c6c887ad57395efbfb38550b107f50a18807d0 Mon Sep 17 00:00:00 2001 From: chengxl Date: Thu, 27 Nov 2025 09:54:09 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=8F=82=E8=80=83=E6=96=87=E7=8C=AE?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/controller/Production.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/application/api/controller/Production.php b/application/api/controller/Production.php index 769f20f..38c2a99 100644 --- a/application/api/controller/Production.php +++ b/application/api/controller/Production.php @@ -592,14 +592,17 @@ class Production extends Base $this->refuseReferIndex($data['p_article_id']); $dois = $this->production_article_refer_obj->where("p_article_id", $data['p_article_id'])->where("refer_doi","<>","")->where("state",0)->group("refer_doi")->having("count(*)>1")->column("refer_doi"); $list = $this->production_article_refer_obj->where('p_article_id', $data['p_article_id'])->where('state', 0)->order("index")->select(); + $aRepeat = []; foreach ($list as $k => $v){ if(in_array($v['refer_doi'],$dois)){ $list[$k]['is_repeat'] = 1; + $aRepeat[$v['refer_doi']][] = $v['index']; }else{ $list[$k]['is_repeat'] = 0; } } $re['refers'] = $list; + $re['repeat'] = empty($aRepeat) ? [] : $aRepeat; return jsonSuccess($re); } From 325710815d1556ab900e1f24d94e8fa1a7956d3b Mon Sep 17 00:00:00 2001 From: chengxl Date: Thu, 27 Nov 2025 10:00:49 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=8F=82=E8=80=83=E6=96=87=E7=8C=AE?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/controller/Preaccept.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/application/api/controller/Preaccept.php b/application/api/controller/Preaccept.php index 07d9576..1cdbd26 100644 --- a/application/api/controller/Preaccept.php +++ b/application/api/controller/Preaccept.php @@ -37,14 +37,17 @@ class Preaccept extends Base } $dois = $this->production_article_refer_obj->where("p_article_id", $production_info['p_article_id'])->where("refer_doi","<>","")->where("state",0)->group("refer_doi")->having("count(*)>1")->column("refer_doi"); $list = $this->production_article_refer_obj->where("p_article_id", $production_info['p_article_id'])->where('state', 0)->order("index")->select(); + $aRepeat = []; foreach ($list as $k => $v){ if(in_array($v['refer_doi'],$dois)){ $list[$k]['is_repeat'] = 1; + $aRepeat[$v['refer_doi']][] = $v['index']; }else{ $list[$k]['is_repeat'] = 0; } } $re["refers"] = $list; + $re['repeat'] = empty($aRepeat) ? [] : $aRepeat; return jsonSuccess($re); }