tongshanglei 1 vuosi sitten
vanhempi
commit
05f74c714f
2 muutettua tiedostoa jossa 17 lisäystä ja 1 poistoa
  1. 16 0
      app/common.php
  2. 1 1
      catch/yunying/controller/Vehicle.php

+ 16 - 0
app/common.php

@@ -1500,5 +1500,21 @@ use think\facade\Cache;
         $redis=Cache::store('redis')->handler();
         $redis->rpush('ningbo_fangdao_sync_data', json_encode($data,JSON_UNESCAPED_UNICODE));
     }
+    /**
+     * Notes: 脱敏格式化字符串
+     * @param string $str 需要脱敏字符
+     * @return mixed|string
+     */
+    function formatDataCardNumber($str)
+    {
+        $res = '';
+        if (empty($str)) {
+            return $res;
+        }
+        $len = strlen($str);
+        $res = substr_replace($str, str_repeat('*', ($len - 4)), 0, $len - 4);
+               
+        return $res;
+    }
 
 

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

@@ -54,7 +54,7 @@ class Vehicle extends CatchController
         // $count=100000;
         $cond['page']=isset($param['page'])?$param['page']:1;
         $cond['limit']=isset($param['limit'])?$param['limit']:10;
-        $rows=queryOracleSelect('DSSC3.W_DW_NON_MOTOR o,DSSC3.W_DW_NON_MOTOR_OWNER r,DSSC3.W_DW_RFID_TAGS s',$cond,'o.PLATE_NO,s.RFID_SN,r. NAME,r.ID_CARD_NUMBER,r.MOBILE_NUMBER,r.HOME_ADDRESS');
+        $rows=queryOracleSelect('DSSC3.W_DW_NON_MOTOR o,DSSC3.W_DW_NON_MOTOR_OWNER r,DSSC3.W_DW_RFID_TAGS s',$cond,'o.PLATE_NO,o.CAR_TYPE,o.CAR_BRAND,o.CAR_VIN,s.RFID_SN,s.INSTALLER,to_char(s.INSTA_DATE,\'yyyy-mm-dd hh24:mi:ss\') INSTA_DATE,r.NAME,r.ID_CARD_NUMBER,r.MOBILE_NUMBER,r.HOME_ADDRESS');
         // $rows=queryOracleSelect('DSSC3.W_DW_NON_MOTOR o,DSSC3.W_DW_RFID_TAGS s',$cond,'o.PLATE_NO,o.CAR_TYPE,o.CAR_BRAND,s.ID,s.RFID_SN,s.INSTALLER,to_char(s.INSTA_DATE,\'yyyy-mm-dd hh24:mi:ss\') INSTA_DATE');
         foreach($rows as &$val){
             $val['CAR_BRAND_TEXT']=(new SysDictData())->getValueByCode('CAR_BRAND_OPTION',$val['CAR_BRAND']);