tongshanglei 1 year ago
parent
commit
5ff6b0e069
1 changed files with 7 additions and 7 deletions
  1. 7 7
      catch/yunying/controller/Vehicle.php

+ 7 - 7
catch/yunying/controller/Vehicle.php

@@ -34,17 +34,17 @@ class Vehicle extends CatchController
         $param=$request->param();
         //联表条件o.rfid_id = s.id and o.owner_id = r.id 
         $cond=[
-            '_string'=>'o.rfid_id = s.id',
+            '_string'=>'o.rfid_id = s.id and o.owner_id = r.id',
         ];
         if($param['PLATE_NO']){
             $cond['o.PLATE_NO']=['like',$param['PLATE_NO']];
         }
-        if($param['ID_CARD_NUMBER']){
-            $cond['r.ID_CARD_NUMBER']=['like',$param['ID_CARD_NUMBER']];
-        }
-        if($param['MOBILE_NUMBER']){
-            $cond['r.MOBILE_NUMBER']=['like',$param['MOBILE_NUMBER']];
-        }
+        // if($param['ID_CARD_NUMBER']){
+        //     $cond['r.ID_CARD_NUMBER']=['like',$param['ID_CARD_NUMBER']];
+        // }
+        // if($param['MOBILE_NUMBER']){
+        //     $cond['r.MOBILE_NUMBER']=['like',$param['MOBILE_NUMBER']];
+        // }
         if($param['RFID_SN']){
             $cond['s.RFID_SN']=['like',$param['RFID_SN']];
         }