From d518097f180f941191c2116db78e35bf9a8ad5bc Mon Sep 17 00:00:00 2001 From: chengxl Date: Fri, 30 Jan 2026 15:07:12 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=8E=92=E7=89=88=E5=85=AC=E5=85=B1?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common/LatexContent.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/common/LatexContent.php b/application/common/LatexContent.php index 0d9934d..45f0f74 100644 --- a/application/common/LatexContent.php +++ b/application/common/LatexContent.php @@ -105,6 +105,7 @@ page={{stage_page}},%号 } } //子刊信息 + $aJournalStage = []; $iJournalStageId = empty($aProductionArticle['journal_stage_id']) ? 0 : $aProductionArticle['journal_stage_id']; if(!empty($iJournalStageId)){ $aJournalStage = $this->getJournalStage(['journal_stage_id' => $iJournalStageId]); @@ -321,7 +322,7 @@ page={{stage_page}},%号 // } //下载图片 $sImagePath = trim($this->sSubmissionUrl,'/').$this->sArticleMainImage.'/'.$aImageInfo['url']; - $aResult = $this->getImage($sImagePath,$aProductionArticle['p_article_id']); + $aResult = $this->getImage($sImagePath,$aProductionArticle['article_id']); if(empty($aResult['data'])){ continue; } From a80897644e0524168d28be8d68fcb6de83e595b2 Mon Sep 17 00:00:00 2001 From: chengxl Date: Fri, 30 Jan 2026 15:58:17 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/controller/Production.php | 50 +++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/application/api/controller/Production.php b/application/api/controller/Production.php index 4045557..828e08e 100644 --- a/application/api/controller/Production.php +++ b/application/api/controller/Production.php @@ -4438,4 +4438,54 @@ class Production extends Base Db::commit(); return json_encode(array('status' => 1,'msg' => 'PDF generated successfully')); } + /** + * 获取排版生成PDF历史版本 + * @param p_article_id 文章ID + */ + public function getProductionArticlePdf($aParam = []){ + + //获取参数 + $aParam = empty($aParam) ? $this->request->post() : $aParam; + + //必填值验证 + $iPArticleId = empty($aParam['p_article_id']) ? '' : $aParam['p_article_id']; + if(empty($iPArticleId)){ + return json_encode(array('status' => 2,'msg' => 'Please select an article' )); + } + + //查询文章 + $aWhere = ['p_article_id' => $iPArticleId,'state' => ['in',[0,2]]]; + $aProductionArticle = Db::name('production_article')->field('article_id,pdf_id')->where($aWhere)->find(); + if(empty($aProductionArticle)){ + return json_encode(array('status' => 3,'msg' => 'No articles found' )); + } + $iArticleId = empty($aProductionArticle['article_id']) ? 0 : $aProductionArticle['article_id']; + if(empty($iArticleId)){ + return json_encode(array('status' => 4,'msg' => 'Unbound article' )); + } + //日志查询 + $aWhere = ['article_id' => $iArticleId,'p_article_id' => $iPArticleId,'state' => 2]; + $aPdf = Db::name('production_article_pdf')->field('pdf_id,url,create_time')->where($aWhere)->select(); + return json_encode(array('status' => 1,'msg' => 'success','data' => $aPdf)); + } + /** + * 获取生产文章信息 + * @param p_article_id 文章ID + */ + public function getProductionArticle($aParam = []){ + + //获取参数 + $aParam = empty($aParam) ? $this->request->post() : $aParam; + + //必填值验证 + $iPArticleId = empty($aParam['p_article_id']) ? '' : $aParam['p_article_id']; + if(empty($iPArticleId)){ + return json_encode(array('status' => 2,'msg' => 'Please select an article' )); + } + + //查询文章 + $aWhere = ['p_article_id' => $iPArticleId,'state' => ['in',[0,2]]]; + $aProductionArticle = Db::name('production_article')->field('pdf_id,file_sub_table')->where($aWhere)->find(); + return json_encode(array('status' => 1,'msg' => 'success','data' => $aPdf)); + } }