diff --git a/app/controller/Task.php b/app/controller/Task.php
index 7174211..d4a5a1a 100644
--- a/app/controller/Task.php
+++ b/app/controller/Task.php
@@ -135,7 +135,7 @@ class Task extends BaseController
$this->json_data['code'] = 0;
$this->json_data['msg'] = '请先填写注册日期';
return json($this->json_data);
- } else if ($type == 2 && isset($params['export_type']) && $params['export_type'] != '' && !in_array($params['export_type'], ['bhx', 'bmc', 'failed', 'repeat', 'failed_bmc', 'none_bmc', 'success_bmc'])) {
+ } else if ($type == 2 && isset($params['export_type']) && $params['export_type'] != '' && !in_array($params['export_type'], ['bhx', 'bmc', 'failed', 'repeat', 'failed_bmc', 'none_bmc', 'success_bmc', 'repeat_delete'])) {
$this->json_data['code'] = 0;
$this->json_data['msg'] = '导出类型错误,请选择正确的导出类型';
return json($this->json_data);
diff --git a/app/view/repeat/index.html b/app/view/repeat/index.html
index 4455da2..bba2f7d 100644
--- a/app/view/repeat/index.html
+++ b/app/view/repeat/index.html
@@ -4,6 +4,25 @@
.layui-table-cell {
padding: 0 5px;
}
+ .layui-input, .layui-select, .layui-textarea {
+ height: 28px;
+ }
+ .layui-input-block {
+ height: 28px;
+ min-height: auto;
+ }
+ .layui-form-label {
+ padding: 4px 15px;
+ }
+ .layui-form-item {
+ margin-bottom: 4px;
+ }
+ .layui-form-mid {
+ padding: 0 !important;
+ }
+ .layui-table td, .layui-table th {
+ padding: 0 15px;
+ }
{/block}
{block name="body"}
@@ -118,6 +137,11 @@
class="layui-input" value="{$params.tag | default=''}">
+
diff --git a/app/view/task/index.html b/app/view/task/index.html
index 686c396..fed6cb3 100644
--- a/app/view/task/index.html
+++ b/app/view/task/index.html
@@ -73,6 +73,7 @@
+
diff --git a/extend/service/CarInfoHandle.php b/extend/service/CarInfoHandle.php
index ee8600d..8dc1d95 100644
--- a/extend/service/CarInfoHandle.php
+++ b/extend/service/CarInfoHandle.php
@@ -144,7 +144,15 @@ class CarInfoHandle
if (count($map_or2) > 0) {
$map_or2 = array_merge([['car_info_t.insurer1_date', '=', ''], ['car_info_t.insurer2_date', '<>', '']], $map_or2);
}
- $query = CarInfoT::where(empty($where) ? 1:$where)->where(function ($query) use ($map_or1, $map_or2) {
+ if ($data['export_type'] == 'repeat_delete')
+ $query = Db::table('repeat_data_t')->alias('car_info_t')->where(empty($where) ? 1:$where)
+ ->where(function ($query) use ($map_or1, $map_or2) {
+ if (count($map_or1) > 0 && count($map_or2) > 0) {
+ $query->whereOr([$map_or1, $map_or2]);
+ }
+ });
+ else
+ $query = CarInfoT::where(empty($where) ? 1:$where)->where(function ($query) use ($map_or1, $map_or2) {
if (count($map_or1) > 0 && count($map_or2) > 0) {
$query->whereOr([$map_or1, $map_or2]);
}
@@ -160,7 +168,7 @@ class CarInfoHandle
->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.id asc');
}
- }else {
+ }elseif ($data['export_type'] != 'repeat_delete') {
$query = $query->order('car_info_t.id asc');
}
$count = $query->count();
@@ -701,7 +709,7 @@ class CarInfoHandle
}
if($export_limit != 0 && $export_type == 'success_bmc'){
CarInfoT::where('id', 'in', $ids)->update(['is_export_bmc' => 0]);
- } else if($export_limit != 0) {
+ } else if($export_limit != 0 && $export_type == 'repeat_delete') {
CarInfoT::where('id', 'in', $ids)->update(['is_export_' . $export_type => $id]);
}
} else {
@@ -719,7 +727,7 @@ class CarInfoHandle
}
if($export_limit != 0 && $export_type == 'success_bmc'){
CarInfoT::where('id', 'in', $ids)->update(['is_export_bmc' => 0]);
- } else if($export_limit != 0) {
+ } else if($export_limit != 0 && $export_type == 'repeat_delete') {
CarInfoT::where('id', 'in', $ids)->update(['is_export_' . $export_type => $id]);
}
$limit -= 3000;
@@ -757,8 +765,8 @@ class CarInfoHandle
$bhxFields = ['car_no', 'car_frame_no'];
}
$bmcFields = ['register_date', 'car_no', 'car_frame_no', 'engine_no', 'factory_model', 'car_year', 'displacement', 'car_man', 'car_number', 'car_phone', 'purchase_price', 'id_man', 'id_number', 'id_phone', 'insured_man', 'insured_number', 'insured_phone', 'company', 'insurer1_date', 'insurer2_date', 'insurer_type', 'linkman', 'linkphone', 'linkman', 'linkphone', 'linkman', 'linkphone'];
- $titles = in_array($export_type, ['bmc','failed_bmc','none_bmc']) ? $bmcTitles : ($export_type == 'repeat' ? $orgTitles : $bhxTitles);
- $fields = in_array($export_type, ['bmc','failed_bmc','none_bmc']) ? $bmcFields : ($export_type == 'repeat' ? $orgFields : $bhxFields);
+ $titles = in_array($export_type, ['bmc','failed_bmc','none_bmc']) ? $bmcTitles : ($export_type == 'repeat' || $export_type == 'repeat_delete' ? $orgTitles : $bhxTitles);
+ $fields = in_array($export_type, ['bmc','failed_bmc','none_bmc']) ? $bmcFields : ($export_type == 'repeat' || $export_type == 'repeat_delete' ? $orgFields : $bhxFields);
return [$titles, $fields];
}