From 42c6c887ad57395efbfb38550b107f50a18807d0 Mon Sep 17 00:00:00 2001 From: chengxl Date: Thu, 27 Nov 2025 09:54:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=82=E8=80=83=E6=96=87=E7=8C=AE=E5=88=97?= =?UTF-8?q?=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); }