From 193f8e1787dc7232598765399b7ecb9ce964bc89 Mon Sep 17 00:00:00 2001 From: zengchaoxin Date: Tue, 5 Nov 2019 20:31:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BF=9D=E5=8D=95=E5=8F=B7?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/controllers/InsurerController.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/frontend/controllers/InsurerController.php b/frontend/controllers/InsurerController.php index 2522c73..b6c7fa4 100644 --- a/frontend/controllers/InsurerController.php +++ b/frontend/controllers/InsurerController.php @@ -930,6 +930,20 @@ class InsurerController extends BaseController $insurer2_no= trim($insurer2_no); $insurer2_no=str_replace(" ","",$insurer2_no); + $tmp_count = OrderT::find() + ->where('insurer1_no=:insurer1_no or insurer2_no=:insurer1_no', [':insurer1_no'=>$insurer1_no]) + ->count(); + if($tmp_count > 0) { + $result['msg'] = '商业保单号已经存在!'; + return $result; + } + $tmp_count = OrderT::find() + ->where('insurer1_no=:insurer2_no or insurer2_no=:insurer2_no', [':insurer2_no'=>$insurer2_no]) + ->count(); + if($tmp_count > 0) { + $result['msg'] = '交强保单号已经存在!'; + return $result; + } $tran = OrderT::getDb()->beginTransaction(); try {