From dd9a0b5b21cb5681c5866d3b49b4ad80e40e02eb Mon Sep 17 00:00:00 2001 From: chenbo <709206448@qq.com> Date: Wed, 25 Oct 2023 14:22:55 +0800 Subject: [PATCH] update --- app/api/controller/CronController.php | 7 ++++++- app/common/logic/task/TaskLogic.php | 9 +++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/app/api/controller/CronController.php b/app/api/controller/CronController.php index aded07c40..b1a3fd0ed 100644 --- a/app/api/controller/CronController.php +++ b/app/api/controller/CronController.php @@ -106,7 +106,12 @@ class CronController extends BaseApiController //任务下发 $time = strtotime(date('Y-m-d')); // 查询系统 所有镇农科公司 未下发 的 任务安排 - $taskSchedulingList = TaskScheduling::where('cron_time', '<', $time)->where('status', 1)->where('company_type', 41)->with('company_info')->select()->toArray(); + $taskSchedulingList = TaskScheduling::where('cron_time', '<', $time) + ->where('status', 1) + ->where('company_type', 41) + ->with('company_info') + ->select() + ->toArray(); $taskSchedulingIds = []; $companyIds = []; diff --git a/app/common/logic/task/TaskLogic.php b/app/common/logic/task/TaskLogic.php index 11bcce8ee..ebd408c32 100644 --- a/app/common/logic/task/TaskLogic.php +++ b/app/common/logic/task/TaskLogic.php @@ -439,13 +439,13 @@ class TaskLogic extends BaseLogic $time = strtotime(date('Y-m-d')); $directorUid = 0; // 指派给 if ($taskTemplate['extend']['task_role'] == 2) { - $marketingManagerUser = User::where(['company_id'=>$taskTemplate['company_id'], 'group_id'=> 16])->find(); + $marketingManagerUser = (new User())->searchMarketingManager($taskTemplate['company_id']); Log::info(['镇农科公司定时任务下发-市场部长user信息', $marketingManagerUser]); $directorUid = $marketingManagerUser['id']; } if ($taskTemplate['extend']['task_role'] == 3) { - $serviceManagerUser = User::where(['company_id'=>$taskTemplate['company_id'], 'group_id'=> 14])->find(); + $serviceManagerUser = (new User())->searchServiceManager($taskTemplate['company_id']); Log::info(['镇农科公司定时任务下发-服务部长user信息', $serviceManagerUser]); $directorUid = $serviceManagerUser['id']; } @@ -623,6 +623,11 @@ class TaskLogic extends BaseLogic } } + private static function countTownMasterTaskMoney() + { + + } + /** * 先判定任务是否已完成 再按每个任务对应的结算方式结算 * $taskSchedulePlan 包含 task_tempalte、task_schedule、task_schedule_plan 三张表的信息