From 389847b0783804c6bbd9acbb57c4dbdbc241d462 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Wed, 16 Aug 2023 11:44:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/lists/AccountLogLists.php | 6 ++--- .../TaskSchedulingPlan.php | 2 +- app/job/TaskInformationJob.php | 22 +++++-------------- 3 files changed, 9 insertions(+), 21 deletions(-) diff --git a/app/api/lists/AccountLogLists.php b/app/api/lists/AccountLogLists.php index d74164e6a..b4047bf3b 100755 --- a/app/api/lists/AccountLogLists.php +++ b/app/api/lists/AccountLogLists.php @@ -111,11 +111,11 @@ class AccountLogLists extends BaseApiDataLists // 变动时间 if (!empty($this->params['time'])) { $date = strtotime($this->params['time']); - $startTime = $date - 3600; // 获取该日期零点的时间戳 - $endTime = $date + 86400; // 获取该日期24小时后的时间戳 + $startTime = $date; // 获取该日期零点的时间戳 + $endTime = $date + 86399; // 获取该日期24小时后的时间戳 $where[] = ['create_time', 'between time', [$startTime, $endTime]]; }else{ - $where[] = ['create_time', 'between time', [strtotime(date('Y-m-d')), strtotime(date('Y-m-d'))+86400]]; + $where[] = ['create_time', 'between time', [strtotime(date('Y-m-d')), strtotime(date('Y-m-d'))+86366]]; } $lists = UserAccountLog::field($field) ->where($where) diff --git a/app/common/model/task_scheduling_plan/TaskSchedulingPlan.php b/app/common/model/task_scheduling_plan/TaskSchedulingPlan.php index 7995a0545..6c34cb626 100644 --- a/app/common/model/task_scheduling_plan/TaskSchedulingPlan.php +++ b/app/common/model/task_scheduling_plan/TaskSchedulingPlan.php @@ -48,7 +48,7 @@ class TaskSchedulingPlan extends BaseModel } public function templateInfo() { - return $this->hasOne(TaskTemplate::class, 'id', 'template_id')->where('status',1); + return $this->hasOne(TaskTemplate::class, 'id', 'template_id'); } public function company() { diff --git a/app/job/TaskInformationJob.php b/app/job/TaskInformationJob.php index 1810ae103..e39f6d0d1 100644 --- a/app/job/TaskInformationJob.php +++ b/app/job/TaskInformationJob.php @@ -24,26 +24,14 @@ class TaskInformationJob $arr['status'] = 0; //信息更新 if ($data['template_info']['type'] == 31) { - $task_id = explode(',', $data['task_id']); - $task_count = Task::where('id', 'in', $task_id)->field('director_uid')->with('director_info')->select(); - if (empty($task_count)) { - Log::error('列30 任务结算失败,task_count为空:' . json_encode($data)); - return false; - } - if (count($task_count) == count($task_id)) { - $name_arr = []; - foreach ($task_count as $key => $value) { - $name_arr[$key] = $value['director_info']['nickname']; - } - $name = implode('、', $name_arr); - $arr['status'] = 1; - } else { - Log::error('列41 任务结算失败,任务id:' . json_encode($data)); + if($data['template_info']['information_count'] < $data['template_info']['information_day_count']){ + Log::info('任务结算失败,信息更新未达到要求:' . json_encode($data)); return false; } + $name = '小组队长'; } elseif //交易金额 - ($data['template_info']['type'] == 32) { + ($data['template_info']['type'] == 33) { $yesterday = date('Y-m-d', strtotime('-1 day', time())); $parmas = [ "start_date" => $yesterday, @@ -88,7 +76,7 @@ class TaskInformationJob $name = '片区交易'; if ($json['status'] == 200) { $arr['total_price'] = $json['data']['total_price']; - if ($json['data']['total_price'] > 100) { + if ($json['data']['total_price'] > 58*5) { $arr['status'] = 1; $name = '片区交易'; }