diff --git a/application/api/controller/Production.php b/application/api/controller/Production.php index 31b131d..95b3254 100644 --- a/application/api/controller/Production.php +++ b/application/api/controller/Production.php @@ -518,6 +518,12 @@ class Production extends Base $p_info = $this->production_article_obj->where('p_article_id', $data['p_article_id'])->find(); $journal_info = $this->journal_obj->where('journal_id', $p_info['journal_id'])->find(); + //是否显示图文摘要图片1是2否3默认 20260206 start + $is_graphical_abstract = empty($data['is_graphical_abstract']) ? 3 : $data['is_graphical_abstract']; + if(!in_array($is_graphical_abstract, [1,2])){ + return jsonError('Please select whether the uploaded picture should be shown as graphic abstract on the PDF title page'); + } + //是否显示图文摘要图片1是2否3默认 20260206 end $update['title'] = trim($data['title']); $update['journal_stage_id'] = $data['journal_stage_id']; @@ -537,6 +543,9 @@ class Production extends Base // $update['pub_date'] = trim($data['pub_date']); $update['npp'] = isset($data['npp']) ? $data['npp'] : ''; + //是否显示图文摘要图片1是2否3默认 20260206 start + $update['is_graphical_abstract'] = $is_graphical_abstract; + //是否显示图文摘要图片1是2否3默认 20260206 end //生成doi号 // $doi = ''; // if ($p_info['doi'] == '') { @@ -1709,6 +1718,12 @@ class Production extends Base } //判断邮箱是否重复 chengxiaoling 20250926 end + //判断是否是通讯作者 通讯地址必填 20260206 start + if(isset($data['is_report']) && $data['is_report'] == 1 && empty($data['mailing_address'])){ + return jsonError("Please enter your mailing address"); + } + //判断是否是通讯作者 通讯地址必填 20260206 end + $article_info = $this->article_obj->where('article_id', $old_article_author_info['article_id'])->find(); $updata['author_name'] = $article_info['journal_id'] == 21 ? trim($data['last_name']) . trim($data['first_name']) : trim($data['first_name']) . ' ' . trim($data['last_name']); $updata['first_name'] = trim($data['first_name']); @@ -1718,6 +1733,11 @@ class Production extends Base $updata['is_first'] = $data['is_first']; $updata['is_report'] = $data['is_report']; $updata['email'] = isset($data['email']) ? trim($data['email']) : ''; + + //通信地址 20260206 start + $updata['mailing_address'] = isset($data['mailing_address']) ? trim($data['mailing_address']) : ''; + //通信地址 20260206 end + $this->production_article_author_obj->where('p_article_author_id', $data['p_article_author_id'])->update($updata); if (is_array($data['organs'])) { $has_ids = []; @@ -1811,6 +1831,12 @@ class Production extends Base } //判断邮箱是否重复 chengxiaoling 20250926 end + //判断是否是通讯作者 通讯地址必填 20260206 start + if(isset($data['is_report']) && $data['is_report'] == 1 && empty($data['mailing_address'])){ + return jsonError("Please enter your mailing address"); + } + //判断是否是通讯作者 通讯地址必填 20260206 end + $insert['p_article_id'] = $data['p_article_id']; $insert['article_id'] = $p_info['article_id']; $insert['author_name'] = $article_info['journal_id'] == 21 ? trim($data['last_name']) . trim($data['first_name']) : trim($data['first_name']) . ' ' . trim($data['last_name']); @@ -1822,6 +1848,10 @@ class Production extends Base $insert['is_report'] = $data['is_report']; $insert['email'] = isset($data['email']) ? trim($data['email']) : ''; + //通信地址 20260206 start + $insert['mailing_address'] = isset($data['mailing_address']) ? trim($data['mailing_address']) : ''; + //通信地址 20260206 end + Db::startTrans(); $pa_id = $this->production_article_author_obj->insertGetId($insert); $or_res = true; @@ -3429,11 +3459,11 @@ class Production extends Base $tex_content .= "\\usepackage{textcomp} \n"; $tex_content .= "\\usepackage[english]{babel} \n"; $tex_content .= "\\geometry{ - a4paper, % A4纸张 - left=1.5cm, % 左页边距 - right=1.5cm, % 右页边距 - top=2cm, % 上页边距 - bottom=2cm, % 下页边距 + a4paper, % A4纸张 + left=1.5cm, % 左页边距 + right=1.5cm, % 右页边距 + top=2cm, % 上页边距 + bottom=2cm, % 下页边距 }"; $tex_content .= "\\linespread{1.05}"; $tex_content .= "\\definecolor{tablegray}{RGB}{250,231,232}\n\n";