From 5e49ac4484641eed9c65463328285158bb9f03b0 Mon Sep 17 00:00:00 2001 From: wanghongjun <1445693971@qq,com> Date: Thu, 1 Aug 2024 11:11:42 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E5=BC=80=E7=A5=A8=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E4=BC=98=E5=8C=96=20=E5=A2=9E=E5=8A=A0=E4=BA=8B?= =?UTF-8?q?=E5=8A=A12?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/InvoiceIssuance.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controller/api/InvoiceIssuance.php b/app/controller/api/InvoiceIssuance.php index 812430e..90b6554 100644 --- a/app/controller/api/InvoiceIssuance.php +++ b/app/controller/api/InvoiceIssuance.php @@ -33,6 +33,9 @@ class InvoiceIssuance extends Base if ($id) { $where[] = ['id', '!=', $id]; } + + Db::startTrans(); + $query_id = InvoiceIssuanceModel::where($data)->where($where)->value('id'); if ($query_id) { throw new \Exception('当前开票项目已申请开票'); @@ -42,7 +45,6 @@ class InvoiceIssuance extends Base $data['mobile'] = $params['mobile']; $data['email'] = $params['email']; - Db::startTrans(); //验证 、 新建抬头、获取抬头id validate(InvoiceHeadValidate::class)->scene('type')->check($data); validate(InvoiceHeadValidate::class)->scene('type'.$data['type'])->check($data);