电话导出调试5

master
zcstatham 2 years ago
parent 73cec23b7f
commit 101c6df595
  1. 4
      extend/service/CarInfoHandle.php

@ -141,7 +141,7 @@ class CarInfoHandle
if (count($map_or2) > 0) { if (count($map_or2) > 0) {
$map_or2 = array_merge([['car_info_t.insurer1_date', '=', ''], ['car_info_t.insurer2_date', '<>', '']], $map_or2); $map_or2 = array_merge([['car_info_t.insurer1_date', '=', ''], ['car_info_t.insurer2_date', '<>', '']], $map_or2);
} }
$query = CarInfoT::where($where)->where(function ($query) use ($map_or1, $map_or2) { $query = CarInfoT::where(empty($where) ? 1:$where)->where(function ($query) use ($map_or1, $map_or2) {
if (count($map_or1) > 0 && count($map_or2) > 0) { if (count($map_or1) > 0 && count($map_or2) > 0) {
$query->whereOr([$map_or1, $map_or2]); $query->whereOr([$map_or1, $map_or2]);
} }
@ -156,8 +156,6 @@ class CarInfoHandle
->where('peer_phone_t.source', $data['source_id']) ->where('peer_phone_t.source', $data['source_id'])
->where('car_info_t.car_number', 'REGEXP', '^[1-9][[:digit:]]{7}((0[[:digit:]])|(1[0-2]))(([0|1|2][[:digit:]])|3[0-1])[[:digit:]]{3}$|^[1-9][[:digit:]]{5}[1-9][[:digit:]]{3}((0[[:digit:]])|(1[0-2]))(([0|1|2][[:digit:]])|3[0-1])[[:digit:]]{3}([0-9]|X)$') ->where('car_info_t.car_number', 'REGEXP', '^[1-9][[:digit:]]{7}((0[[:digit:]])|(1[0-2]))(([0|1|2][[:digit:]])|3[0-1])[[:digit:]]{3}$|^[1-9][[:digit:]]{5}[1-9][[:digit:]]{3}((0[[:digit:]])|(1[0-2]))(([0|1|2][[:digit:]])|3[0-1])[[:digit:]]{3}([0-9]|X)$')
->field('car_info_t.*')->order('car_info_t.car_phone asc'); ->field('car_info_t.*')->order('car_info_t.car_phone asc');
$query->first();
echo $query->getLastSql();exit();
} }
}else { }else {
$query = $query->order('register_date asc'); $query = $query->order('register_date asc');

Loading…
Cancel
Save