添加保单号判断

dev
曾超新 5 years ago
parent 2966d222ea
commit 193f8e1787
  1. 14
      frontend/controllers/InsurerController.php

@ -930,6 +930,20 @@ class InsurerController extends BaseController
$insurer2_no= trim($insurer2_no); $insurer2_no= trim($insurer2_no);
$insurer2_no=str_replace(" ","",$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(); $tran = OrderT::getDb()->beginTransaction();
try { try {

Loading…
Cancel
Save