重复车架处理调试17

master
zcstatham 2 years ago
parent 2e83404796
commit c84b16d2ac
  1. 6
      app/controller/Task.php
  2. 7
      app/view/task/index.html

@ -62,7 +62,7 @@ class Task extends BaseController
$query = $this->model->field(['id','payload','remark', 'type', 'queue', 'download_times', $query = $this->model->field(['id','payload','remark', 'type', 'queue', 'download_times',
"(case `status` when 2 then '100' else '0' end)" => 'process', "(case `status` when 2 then '100' else '0' end)" => 'process',
'date_format(from_unixtime(create_time),"%Y-%m-%d %H:%i:%s") as create_timestamp', 'date_format(from_unixtime(create_time),"%Y-%m-%d %H:%i:%s") as create_timestamp',
"(case `type` when 1 then '导入' when 2 then '导出' when 3 then '同行电话' when 4 then '重复车架号' when 5 then '更新车辆信息' when 6 then '清除重复电话' when 7 then '删除重复数据' else '' end)" => 'type_txt', "(case `type` when 1 then '导入' when 2 then '导出' when 3 then '同行电话' when 4 then '重复车架号' when 5 then '更新车辆信息' when 6 then '清除重复电话' when 7 then '删除重复数据' when 8 then '导出删除重复数据' else '' end)" => 'type_txt',
"(case `status` when 0 then '排队中' when 1 then '处理中' when 2 then '已完成' when 3 then '失败' else '' end)" => 'status', 'create_time']); "(case `status` when 0 then '排队中' when 1 then '处理中' when 2 then '已完成' when 3 then '失败' else '' end)" => 'status', 'create_time']);
if($queue != ''){ if($queue != ''){
$query = $query->where('queue','like','%'. $queue .'%')->whereOr('payload','like','%'. str_replace(['\\','"'],['_',''],json_encode($queue)) .'%'); $query = $query->where('queue','like','%'. $queue .'%')->whereOr('payload','like','%'. str_replace(['\\','"'],['_',''],json_encode($queue)) .'%');
@ -117,9 +117,9 @@ class Task extends BaseController
$job_info = JobsT::find($params['source_id']); $job_info = JobsT::find($params['source_id']);
$job_info_payload = json_decode($job_info->payload,true)['data']['params']; $job_info_payload = json_decode($job_info->payload,true)['data']['params'];
$params = []; $params = [];
$params['export_type'] = 'repeat'; $params['export_type'] = $job_info->type == 8? 'repeat_delete': 'repeat';
$params['export_limit'] = 0; $params['export_limit'] = 0;
$params['export_table'] = $job_info->type == 3? 'peer_phone_t': ($job_info->type == 4?'repeat_frame_t':''); $params['export_table'] = $job_info->type == 3? 'peer_phone_t': ($job_info->type == 4?'repeat_frame_t':'repeat_data_t');
$params['source_id'] = $job_info->id; $params['source_id'] = $job_info->id;
} }
if (($type == 1 || $type == 5) && ( $filename == '' || ($filename != '' && !file_exists(public_path('public/storage') . $filename)))) { if (($type == 1 || $type == 5) && ( $filename == '' || ($filename != '' && !file_exists(public_path('public/storage') . $filename)))) {

@ -246,6 +246,13 @@
{{# }else if(d.type == 1){ }} {{# }else if(d.type == 1){ }}
<a class="layui-btn layui-btn-xs" href="/index/index.html?source={{d.id}}">查看</a> <a class="layui-btn layui-btn-xs" href="/index/index.html?source={{d.id}}">查看</a>
{{# } }} {{# } }}
{{# }else if(d.type == 8){ }}
{{# if(d.download_times > 0){ }}
<buton class="layui-btn layui-btn-xs" onclick="layer.confirm('已下载过,是否继续',function(index){layer.close(index);window.open('{:url(\'task/download\')}?id={{d.id}}');window.location.reload();});">下载文件</buton>
{{# }else { }}
<buton class="layui-btn layui-btn-xs" onclick="window.open('{:url(\'task/download\')}?id={{d.id}}');window.location.reload();">下载文件</buton>
{{# } }}
{{# } }}
</script> </script>
<script type="text/html" id="process-tpl"> <script type="text/html" id="process-tpl">
<div class="layui-progress layui-progress-big" lay-filter="process-{{d.id}}" lay-showPercent="yes"> <div class="layui-progress layui-progress-big" lay-filter="process-{{d.id}}" lay-showPercent="yes">

Loading…
Cancel
Save