重复车架处理调试12

master
zcstatham 2 years ago
parent f43932290e
commit 89004169f6
  1. 14
      app/model/RepeatDataT.php
  2. 3
      extend/service/CarInfoHandle.php

@ -0,0 +1,14 @@
<?php
declare (strict_types = 1);
namespace app\model;
use think\Model;
/**
* @mixin think\Model
*/
class RepeatDataT extends Model
{
//
}

@ -8,6 +8,7 @@ use app\model\CarInfoT;
use app\model\ExportLogT; use app\model\ExportLogT;
use app\model\JobsT; use app\model\JobsT;
use app\model\PeerPhoneT; use app\model\PeerPhoneT;
use app\model\RepeatDataT;
use app\model\RepeatFrameT; use app\model\RepeatFrameT;
use excel\Excel; use excel\Excel;
use file\FileSystem; use file\FileSystem;
@ -145,7 +146,7 @@ class CarInfoHandle
$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);
} }
if ($data['export_type'] == 'repeat_delete') if ($data['export_type'] == 'repeat_delete')
$query = Db::table('repeat_data_t')->alias('car_info_t')->where(empty($where) ? 1:$where) $query = RepeatDataT::alias('car_info_t')->where(empty($where) ? 1:$where)
->where(function ($query) use ($map_or1, $map_or2) { ->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]);

Loading…
Cancel
Save