From 35f6dcf59158eae47289bbf276bae77e170ddd1a Mon Sep 17 00:00:00 2001 From: chenbo <709206448@qq.com> Date: Mon, 20 Nov 2023 13:51:40 +0800 Subject: [PATCH] =?UTF-8?q?up=20=E4=BE=9B=E9=94=80=E5=AF=B9=E6=8E=A5?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E7=B3=BB=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/logic/task/TaskLogic.php | 37 ++++++++++++++--------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/app/common/logic/task/TaskLogic.php b/app/common/logic/task/TaskLogic.php index fe626ecde..130ca195c 100644 --- a/app/common/logic/task/TaskLogic.php +++ b/app/common/logic/task/TaskLogic.php @@ -1176,18 +1176,18 @@ class TaskLogic extends BaseLogic // 负责人任务类型id列表 $typeIds = []; $townMasterTaskTypeList = DictData::where(['type_value' => 'town_task_type_master', 'status' => 1])->column('value', 'id'); - foreach ($townMasterTaskTypeList as $item) { - if ($item['value'] == 'town_task_type_master_3') { - $typeIds[] = $item['id']; + foreach ($townMasterTaskTypeList as $k => $item) { + if ($item == 'town_task_type_master_3') { + $typeIds[] = $k; } - if ($item['value'] == 'town_task_type_master_4') { - $typeIds[] = $item['id']; + if ($item == 'town_task_type_master_4') { + $typeIds[] =$k; } - if ($item['value'] == 'town_task_type_master_5') { - $typeIds[] = $item['id']; + if ($item == 'town_task_type_master_5') { + $typeIds[] = $k; } - if ($item['value'] == 'town_task_type_master_8') { - $typeIds[] = $item['id']; + if ($item == 'town_task_type_master_8') { + $typeIds[] = $k; } } @@ -1205,7 +1205,6 @@ class TaskLogic extends BaseLogic } } } - // 下属小组服务公司有任务安排,也完成了任务 if ($isDone === 1 && $isTaskSchedule === 1) { // 做任务结算,分润 @@ -2255,18 +2254,18 @@ class TaskLogic extends BaseLogic // 负责人任务类型id列表 $typeIds = []; $townMasterTaskTypeList = DictData::where(['type_value' => 'town_task_type_master', 'status' => 1])->column('value', 'id'); - foreach ($townMasterTaskTypeList as $item) { - if ($item['value'] == 'town_task_type_master_3') { - $typeIds[] = $item['id']; + foreach ($townMasterTaskTypeList as $k=>$item) { + if ($item == 'town_task_type_master_3') { + $typeIds[] = $k; } - if ($item['value'] == 'town_task_type_master_4') { - $typeIds[] = $item['id']; + if ($item == 'town_task_type_master_4') { + $typeIds[] = $k; } - if ($item['value'] == 'town_task_type_master_5') { - $typeIds[] = $item['id']; + if ($item == 'town_task_type_master_5') { + $typeIds[] = $k; } - if ($item['value'] == 'town_task_type_master_8') { - $typeIds[] = $item['id']; + if ($item == 'town_task_type_master_8') { + $typeIds[] = $k; } } // 查询 镇农科公司负责人是否有对应的每日任务安排