From 9092f0ca8e9710a3b66ed5912c9af23dd8b41f09 Mon Sep 17 00:00:00 2001 From: wangjinlei <751475802@qq.com> Date: Fri, 29 May 2026 13:53:47 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=9F=A5=E9=87=8D=E6=95=B0=E5=AD=97?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/controller/Base.php | 30 ++++++++++++++++++++++++ application/api/controller/Workbench.php | 4 ++++ 2 files changed, 34 insertions(+) diff --git a/application/api/controller/Base.php b/application/api/controller/Base.php index 3b2c4627..380066a2 100644 --- a/application/api/controller/Base.php +++ b/application/api/controller/Base.php @@ -741,6 +741,36 @@ class Base extends Controller return $list; } + /** + * 获取文章查重百分比 + * + * 规则:优先取自动查重(t_plagiarism_check)最新一条已完成(state=3)的 similarity_score; + * 没有自动查重结果时,回落到主表 t_article.repetition。 + * + * @param int $article_id + * @return float 查重百分比(如 12.34) + */ + public function getArticleRepetition($article_id) + { + $article_id = intval($article_id); + if ($article_id <= 0) { + return 0.0; + } + + $auto = Db::name('plagiarism_check') + ->where('article_id', $article_id) + ->where('state', 3) + ->order('check_id desc') + ->value('similarity_score'); + + if ($auto !== null && $auto !== '') { + return floatval($auto); + } + + $repetition = $this->article_obj->where('article_id', $article_id)->value('repetition'); + return floatval($repetition); + } + /**获取标准化用户库的人 * @return void */ diff --git a/application/api/controller/Workbench.php b/application/api/controller/Workbench.php index e8d28443..448a7a44 100644 --- a/application/api/controller/Workbench.php +++ b/application/api/controller/Workbench.php @@ -186,6 +186,10 @@ class Workbench extends Base $aArticle[$key]['is_draft'] = 1; } + //查重信息 + $aArticle[$key]['repetition'] = $this->getArticleRepetition($value['article_id']); + + // //付款信息 // $iPsId = empty($aOrder[$value['article_id']]) ? 0 : $aOrder[$value['article_id']]; // $aArticle[$key]['pay_time'] = empty($aPaystation[$iPsId]['pay_time']) ? '' : $aPaystation[$iPsId]['pay_time']; From 0ee6a575f73317f576a40b9939d57c95a003cbdf Mon Sep 17 00:00:00 2001 From: wangjinlei <751475802@qq.com> Date: Fri, 29 May 2026 15:07:50 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=9F=A5=E9=87=8D=E6=95=B0=E5=AD=97?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E8=B0=83=E6=95=B4=EF=BC=8C=E6=8E=A5=E5=8F=97?= =?UTF-8?q?=E6=96=87=E7=AB=A0=E7=9A=84=E6=9F=A5=E9=87=8D=E9=99=90=E5=88=B6?= =?UTF-8?q?=E5=8F=98=E6=88=90=E8=87=AA=E5=8A=A8=E5=92=8C=E6=89=8B=E5=8A=A8?= =?UTF-8?q?=E9=9A=8F=E6=9C=BA=E7=9A=84=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/controller/Article.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/api/controller/Article.php b/application/api/controller/Article.php index 39572f85..f14695e1 100644 --- a/application/api/controller/Article.php +++ b/application/api/controller/Article.php @@ -1574,8 +1574,8 @@ class Article extends Base return json(['code' => 1, 'msg' => "Before proceeding to the next step, you need more than two available reviewer comments, and the total number of accept is greater than the total number of rejected."]); } } - //接收必须查重小于20% - if ($data['state'] == 6 && $article_info['repetition'] > 25) { + //接收必须查重小于25%,2026.5.29更改,获取查重的来源 + if ($data['state'] == 6 && $this->getArticleRepetition($article_info['article_id']) > 25) { return jsonError("Submissions with a repetition rate greater than thirty percent will not be accepted"); } //预接收有时间限定必须大于14天 From 32ce69fa5f6f3a48e69ead65a0e8fa367dda2d72 Mon Sep 17 00:00:00 2001 From: wangjinlei <751475802@qq.com> Date: Fri, 29 May 2026 15:43:54 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E9=82=A3=E4=B8=AA=E7=BA=A2=E8=89=B2?= =?UTF-8?q?=E7=9A=84=E6=98=BE=E7=A4=BA=EF=BC=8C=E5=8F=98=E6=88=90=E6=89=93?= =?UTF-8?q?=E5=BC=80=E6=96=87=E7=AB=A0=E8=AF=A6=E6=83=85=E5=B0=B1=E5=8F=98?= =?UTF-8?q?=E5=9B=9E=E5=8E=9F=E6=9D=A5=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/controller/Workbench.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/application/api/controller/Workbench.php b/application/api/controller/Workbench.php index 448a7a44..1ca0085d 100644 --- a/application/api/controller/Workbench.php +++ b/application/api/controller/Workbench.php @@ -349,6 +349,11 @@ class Workbench extends Base public function updateArticleState(){ //获取参数 $aParam = empty($aParam) ? $this->request->post() : $aParam; + + + Db::name('article')->where('article_id' ,$aParam['article_id'])->limit(1)->update(['is_user_act' => 2]); + + //主键ID $iActId = empty($aParam['act_id']) ? 0 : $aParam['act_id']; //主键父ID